A comprehensive guide for migrating an existing Rebased/Soapbox Pleroma installation to the main Pleroma repository while preserving all data and users. Includes backup procedures, step-by-step migration process, and troubleshooting tips.
Table of Contents
Ahoy, ye scurvy dogs! Abandon ship, or abandon hope!
I have only private git so I need to share this knowledge here. This guide describes how to migrate an existing Rebased/Soapbox Pleroma installation to the main Pleroma repository while preserving your data and users.
# Set proper Elixir version for new Pleroma (as pleroma user)export PATH="/var/lib/pleroma/.asdf/shims:$PATH"/var/lib/pleroma/.asdf/bin/asdf local elixir 1.14.5-otp-24
# Verify versionelixir --version
4. Install Dependencies
1
2
3
4
5
6
# Install Hex and Rebar (as pleroma user)mix local.hex --force
mix local.rebar --force
# Get Pleroma dependenciesmix deps.get
5. Copy Essential Configurations
1
2
3
4
5
6
7
8
9
10
# Create config directory if it doesn't existmkdir -p /opt/pleroma/config
# Copy critical configurations from old installationcp /opt/pleroma-old/config/prod.secret.exs /opt/pleroma/config/prod.secret.exs
# Copy uploadscp -r /opt/pleroma-old/uploads/* /opt/pleroma/uploads/
# Ensure correct file ownershipchown -R pleroma:pleroma /opt/pleroma/
6. Run Database Migrations
1
2
3
# Run migrationscd /opt/pleroma
MIX_ENV=prod mix ecto.migrate
# Add these lines to your existing configconfig :pleroma, :frontends,
primary: %{
"name"=>"pleroma-fe",
"ref"=>"stable" }
# Add this to acknowledge database schema changesconfig :pleroma, :i_am_aware_this_may_cause_data_loss, true# Make sure these paths are correctconfig :pleroma, :instance, static_dir: "/opt/pleroma/instance/static"config :pleroma, Pleroma.Uploaders.Local, uploads: "/opt/pleroma/uploads"
# Stop new installationsystemctl stop pleroma
# Restore old installationrm -rf /opt/pleroma
mv /opt/pleroma-old /opt/pleroma
# Restore database if neededpsql pleroma < pleroma_backup_YYYYMMDD.sql
# Start servicesystemctl start pleroma
Post-Migration Tasks
Monitor logs for any errors
Test all core functionality
Update your backup scripts if needed
Consider hardening your installation or migration to AKKOMA with downgrading DB schema to early 2022 Pleroma and than migrate to Akkoma. More info on web :)
Final Notes
Keep your backups until you’re confident everything is working :)