How to: update Pleroma

Pleroma is an ActivityPub server running on both dunwich and

The process for updating is the same for both.

  1. Stop pleroma:

    ! systemctl stop pleroma
  2. Run the update script:

    ! -upleroma /srv/pleroma/ $VERSION
  3. Start pleroma:

    ! systemctl start pleroma

The manual way

Instead of step 2 above:

  1. Become the pleroma user:

    ! -upleroma bash
  2. Change to the pleroma directory:

    cd /srv/pleroma
  3. (optional) Take a database backup:

    pg_dump pleroma_dev | gzip -9 > `date +"%Y-%m-%d"`.sql.gz
  4. Pull the update:

    cd pleroma
    git stash
    git fetch --prune --all
    git checkout $VERSION
    git stash pop
  5. Build the update:

    MIX_ENV=prod mix clean
    MIX_ENV=prod mix deps.get
    MIX_ENV=prod mix compile
  6. Run any database migrations:

    MIX_ENV=prod mix ecto.migrate

Then exit the sudo shell and start pleroma again as above.