all repos — site @ cd2058c44a08f783e7004971ceacc613a1fd8227

source for my site, found at icyphox.sh

pages/blog/mastodon-to-pleroma.md (view raw)

 1---
 2template:
 3slug: mastodon-to-pleroma
 4title: Migrating from Mastodon to Pleroma
 5subtitle: Mastodon bad. Pleroma good.
 6date: 2020-09-04
 7---
 8
 9If you've been following me on the fediverse, you would've witnessed my
10numerous (failed) attempts at migrating from Mastodon to Pleroma,
11running on my Raspberry Pi. I finally got it working, and these are the
12steps I took. It's sort of a loose guide you could follow, but I can't
13promise it'll work for you.
14
15The Erlang and Elixir packages are pretty broken and outdated on
16Raspbian. So this time, I built them from source.[^1][^2] I also assume
17you have Mastodon and Pleroma (source, not OTP) installed -- probably at
18`/home/mastodon/live` and `/opt/pleroma`, respectively.
19
20Once you have Erlang and Elixir compiled and sitting in your `PATH`,
21pull [soapbox-pub/migrator](https://gitlab.com/soapbox-pub/migrator).
22Now read the readme and the `do_migration.sh` script to get an idea of
23what you're getting into.
24
25Move into the cloned directory and create a `.env`:
26
27```shell
28MASTODON_PATH=/home/mastodon/live
29PLEROMA_PATH=/opt/pleroma
30```
31
32Then, run:
33
34```console
35$ yarn   # install deps
36$ cp -r mastodon/* /home/mastodon/live
37$ cp -r pleroma/* /opt/pleroma
38$ RAILS_ENV=production yarn masto export
39```
40
41If you run into any permissions issues, `chown` and proceed. This should
42export all your Mastodon activity into `/home/mastodon/live/migrator`.
43Now, copy the `migrator` directory into your Pleroma installation path.
44
45```console
46$ cp -r migrator /opt/pleroma
47```
48
49You can then import all of it into Pleroma (possibly prefixed with `sudo
50-Hu pleroma`):
51```console
52$ MIX_ENV=prod mix migrator.import
53```
54
55If all went well, you would've successfully migrated from Mastodon to
56Pleroma. If not, well feel free to send me an email (or @ me on the fedi).
57I suppose you could also reach [Alex](https://alexgleason.me) -- he's
58the incredibly based guy who wrote the migrator,
59[soapbox-fe](https://soapbox.pub) and does some Elixir magic he keeps
60[posting about](https://gleasonator.com/@alex).
61
62Rest assured, the migrator has a 100% success rate -- Alex and I are
63apparently the only two who have it working. 2/2.
64
65## why should you migrate?
66
67Because Pleroma is cleaner, leaner[^3] and prettier looking[^4]. Oh, and we
68have chats.
69![screenshot of pleroma + soapbox-fe](https://cdn.icyphox.sh/l8g5y.png)
70
71[^1]: [Erlang install guide](http://erlang.org/doc/installation_guide/INSTALL.html)
72[^2]: [Elixir install guide](https://elixir-lang.org/install.html#compiling-from-source-unix-and-mingw)
73[^3]: Mastodon used about ~2.5 GB out of the 4 I have on my Pi. With
74      Pleroma, the total used RAM is only about ~700 MB. That's crazy!
75[^4]: ...with Soapbox. :^)
76