Adventures in upgrading Pleroma 👩🏾‍💻
Just upgraded #Pleroma, which I’d been putting off for a while.
I had been using the packaged, “OTP”, version of Pleroma, but it turned out the package is ancient, and it required an older cryptography library. Because I’d upgraded to a newer version of #Ubuntu, the older crypto library had been removed and replaced with a newer version.
I found all this out when I tried to upgrade and got an error, searched for the error text, and found the bug report with a detailed explanation of the problem and solution.
So, I just backed up my instance, removed the OTP version of Pleroma, and re-installed it directly from the source repository.
The whole process took maybe half an hour, and no more than 10 or so commands. Basically:
sudo systemctl stop pleroma
.mkdir -p ~/backup/pleroma
. I made it (temporarily!) world-writable to make things easier: chmod 777 ~/backup/pleroma
.sudo -Hu postgres pg_dump -d pleroma --format=custom -f /home/saria/backup/pleroma/pleroma.pgdump
.sudo cp /etc/pleroma/config.exs /home/saria/backup/pleroma
.sudo mv /opt/pleroma /home/saria/backup/pleroma/old-installation
and sudo mv /etc/pleroma /home/saria/backup/pleroma/old-configuration
.sudo usermod -d /var/lib/pleroma pleroma
(Here I got an error that the pleroma user was still running process 758. No problem, just sudo kill 758
, then retry.)sudo mkdir - /opt/pleroma /var/lib/pleroma
. (I think /var/lib/pleroma
already existed, and was storing images and uploads, which was fine.)sudo chown -R pleroma: /opt/pleroma /var/lib/pleroma
.cd /opt/pleroma
.sudo -Hu pleroma git clone -b stable https://git.pleroma.social/pleroma/pleroma /opt/pleroma
.sudo -Hu pleroma mix deps.get
.sudo -Hu pleroma MIX_ENV=prod mix pleroma.instance gen
.sudo -Hu pleroma mv config/generated_config.exs config/prod.secret.exs
.config/prod.secret.exs
, copying all the important stuff (passwords, salts, personal settings) from the old file at /home/saria/backup/pleroma/old-configuration/config.exs
.sudo -Hu pleroma MIX_ENV=prod mix ecto.migrate
.sudo systemctl start pleroma
. I discovered (using sudo systemctl status pleroma
) that Pleroma would not start. I realised that was because the systemd service file was still trying to start the old, OTP version. So I replaced the service file with the one from the source installation (sudo cp -f /opt/pleroma/installation/pleroma.service /etc/systemd/system/pleroma.service
) and tried again. Now I got an error from systemd because the service file had changed, telling me I had to do systemd daemon-reload
. So I did sudo systemd daemon-reload
, and tried to start Pleroma again. Success! 🦸🏾‍♀️As you can see, I ran into some hiccups, but the documentation and error messages were clear enough that I was able to fix stuff and move on.
Now, I am no expert on any of this stuff! I know literally nothing about Erlang or Elixir (the languages/tools/whatever that Pleroma is made with). But as you can see, if you take the time to carefully read the documentation, and understand what each step is actually doing, it’s really not that hard! 💪🏾
@bitzero
#pleroma FTW.
What's the drama with mastodon?
Wondering if someone could point me to any info on the topic of Akkoma's/Pleroma's "database issues?" I hear it mentioned as one of the downsides to running it as an instance that causes issues over time, but it's always vague.
The best I can gather is the schema sucks, but I'd like to know details on which parts are bad and why.
Hide muted #threads in #pleroma
https://pleroma.p4g.club/users/coloco