Pleroma Archive =============== This is a tool for converting a [Pleroma] account backup into static HTML. I built this when retiring my self-hosted Pleroma instance to limit the number of links broken when turning it off. It also provides a place to search and view my old posts. My archive generated by this tool is at . Building -------- The `pleroma-archive` tool is implemented in Rust. Assuming [you have Rust installed][install-rust] compile it with: cargo build release --locked Usage ----- Generate and download an account backup from your Pleroma account: > Settings › Data import / export › Account backup › Create a new backup Once the backup is generated, download and extract it. Then run `pleroma-archive` on the archive. The tool takes two arguments: the path to the directory with the extracted account backup and the path to an output directory. E.g. target/release/pleroma-archive ~/Downloads/archive public The first time it runs `pleroma-archive` will make a `HEAD` request for each post in the archive to resolve the `id` into the public URL that Pleroma used for it. These mappings are written to `mappings.json` in the archive directory. The output directory will contain an `index.html` file with all the posts, as well as individual html pages for each post at paths that match their URL in Pleroma, but with `.html` appended. Deployment ---------- The generated files are expected to be hosted on a dedicated domain, most likely the domain that the Pleroma instance was running at. To make the URLs work I used the [Nginx] `try_files` directive to map a URL like `/notice/Abc4567` to `/notice/Abc4567.html`. ```nginx server { listen 80; listen [::]:80; server_name archive.decentralised.social www.archive.decentralised.social; root /usr/share/www/archive.decentralised.social; location / { try_files $uri $uri/index.html $uri.html =404; } } ``` Maintenance Status ------------------ This was a one-off tool I built to retire my own Pleroma instance. I'm publishing the code in case it's useful to others but maintenance will be limited. I'm unlikely to implement feature requests, but will review smaller contributions and bug reports. Licence ------- This project is dual licenced under either of: - Apache License, Version 2.0 ([LICENSE-APACHE](https://forge.wezm.net/wezm/pleroma-archive/src/branch/main/LICENSE-APACHE)) - MIT license ([LICENSE-MIT](https://forge.wezm.net/wezm/pleroma-archive/src/branch/main/LICENSE-MIT)) at your option. [install-rust]: https://www.rust-lang.org/tools/install [Pleroma]: https://pleroma.social/ [Nginx]: https://nginx.org/