pleroma/docs/docs/administration/updating.md
Norm 53f21489a2 Update the "Updating your instance" docs (#361)
This makes them consistent with the update instructions that are in the
release announcements.

Also adds in the command to update the frontend as well.

Co-authored-by: Francis Dinh <normandy@biribiri.dev>
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/361
Co-authored-by: Norm <normandy@biribiri.dev>
Co-committed-by: Norm <normandy@biribiri.dev>
2022-12-14 03:03:08 +00:00

1.7 KiB

Updating your instance

You should always check the release notes/changelog in case there are config deprecations, special update steps, etc.

Besides that, doing the following is generally enough:

Switch to the akkoma user

# Using sudo
sudo -su akkoma

# Using doas
doas -su akkoma

# Using su
su -s "$SHELL" akkoma

For OTP installations

# Download latest stable release
./bin/pleroma_ctl update --branch stable

# Stop akkoma
./bin/pleroma stop # or using the system service manager (e.g. systemctl stop akkoma)

# Run database migrations
./bin/pleroma_ctl migrate

# Update frontend(s). See Frontend Configuration doc for more information.
./bin/pleroma_ctl frontend install pleroma-fe --ref stable

# Start akkoma
./bin/pleroma daemon # or using the system service manager (e.g. systemctl start akkoma)

If you selected an alternate flavour on installation, you may need to specify --flavour, in the same way as when installing.

For from source installations (using git)

Run as the akkoma user:

# Pull in new changes
git pull

# Run with production configuration
export MIX_ENV=prod

# Download and compile dependencies
mix deps.get
mix compile

# Stop akkoma (replace with your system service manager's equivalent if different)
sudo systemctl stop akkoma

# Run database migrations
mix ecto.migrate

# Update frontend(s). See Frontend Configration doc for more information.
mix pleroma.frontend install pleroma-fe --ref stable

# Start akkoma (replace with your system service manager's equivalent if different)
sudo systemctl start akkoma