Host your own Mastodon archive.
- Clone or download this repository,
- In your terminal
cd
to the folders of the project. - Download your mastodon archive and put the resulting
archive-xxxxxx.tar.gz
in the projectsarchive
folder. You can have multiple archives in that folder, we will always use the newest. - Adopt settings in
_data/meta.json
. - Make sure you have Node.js installed on your system.
- Install all dependencies by running
npm ci
. - Build the website by calling
npm run build
. - Copy everything from the
_site
folder to a static webserver or simply enable GitHub Pages for thegh-pages
branch.
Like everything in this universe Mastodon servers are ephemeral. They often come to life in a highly energetic moment, glow for some time and than vanish out of existence again because some update goes wrong or human things happen. If you want your toots to be hosted after your server is long gone you could use this repository to generate a static website with your content.
I used the wonderful static page generator 11ty for this. Eleventy was a perfect fit for this! Not only does it support multiple templating languages and other nice features, it also supports dynamic JS data files so the content can directly get pulled out of the zipped archive.
- ✨tweetback✨ by @zachleat
- mastodon-data-viewer.py by @blackle
- mastodon-archive-viewer by @kit-ty-kate
- mastodon-archive-viewer by @dizzy-labs
Copyright 2022 by Alexander Wunschik.
Licensed under a AGPL-3.0-or-later license.
If you change the code you are legally required to publish it!
This is the idea of #OpenSource, please respect it!