Skip to content

OTP release

href requested to merge href/pleroma:otp-release into develop

Based on the work by @lupine (!142 (closed)) and @eal (!168 (closed))! thanks

You can build a release with MIX_ENV=prod mix release. You'll find your release in _build/prod/pleroma/releases/0.9.0/pleroma.tar.gz. It includes an Erlang runtime so the building server needs to be approximately the same as the target server. But the target server now only has a single requirement: PostgreSQL. Installing Elixir and Erlang is not your problem anymore.

A release can be started in daemon with ./bin/pleroma start (it also has ping, stop, restart), detached with ./bin/pleroma console; and you can attach a remote console to a running daemon with ./bin/pleroma remote_console.

Notables changes besides OTP release:


Most of the configuration is now accessed at run-time (which gives you the power of re-configuring the instance live, e.g. by attaching a remote console on the running instance).

Configuring a release is different thing. I chose to pick bitwalker/conform to make a user-friendly pleroma.conf file (which uses a schema). While it requires managing a schema, it's way better than what it looks without, and some of the configuration options don't work on runtime, so the schema at least only contains what you can change.


Most of the Mix commands targeting users (rm_user, deactivate_user, generate_password_reset, moderator, register_user) is now the universal mix user or ./bin/pleroma user. It's mostly 1:1 feature-side, besides register which changed:

- register [username] [email] <password>
  If password is empty, a reset link will be generated
- reset-password [username]
- moderator [username] <true|false>
- deactivate [username]
- delete [username]

mix fix_ap_users is exposed as ./bin/pleroma fix-ap-users.

Migrations are executed at startup and can be done as ./bin/pleroma migrate


For now on this complicates (a bit) the configuration of the FE: priv/static is now in ./lib/pleroma-0.9.0/priv/static/ and it's not good hygeine in releases to edit files in lib. Moving the fe config to the application environment would help,such as !156 (closed)

Build-wise nothing should change.

Migrating an instance to it

Convert your config/prod.secret.exs to the new pleroma.conf;

in a shell, assuming your classic pleroma was in ~/pleroma and you uploaded the release at ~/pleroma.tar.gz

mkdir server
cd server
tar xvzf ../pleroma.tar.gz
# Copy your old uploads to ~/server
cp -R ../pleroma/uploads uploads
# make your config
mv pleroma.conf.sample pleroma.conf
$EDITOR pleroma.conf
./bin/pleroma start

to upgrade, just re-extract the new release tarball in ~/server and ./bin/pleroma/restart

There's build from the latest commit of the PR:

Edited by href

Merge request reports