X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=docs%2Fdocs%2Fadministration%2Fupdating.md;h=6cea56e5c42ba4b4d083bc31d5f12d47bac26ebd;hb=cb28b8f0fea6fba2e5370dec6e35da1e022a93bd;hp=6f7ffcd6308599fb9f28a300632d7f146269f830;hpb=d2a185c01385ef53c712c8d315c69d5deb044e2f;p=akkoma diff --git a/docs/docs/administration/updating.md b/docs/docs/administration/updating.md index 6f7ffcd63..6cea56e5c 100644 --- a/docs/docs/administration/updating.md +++ b/docs/docs/administration/updating.md @@ -1,27 +1,67 @@ # Updating your instance -You should **always check the [release notes/changelog](https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/CHANGELOG.md)** in case there are config deprecations, special update steps, etc. +You should **always check the [release notes/changelog](https://akkoma.dev/AkkomaGang/akkoma/src/branch/stable/CHANGELOG.md)** in case there are config deprecations, special update steps, etc. Besides that, doing the following is generally enough: +## Switch to the akkoma user +```sh +# Using sudo +sudo -su akkoma -## For OTP installations +# Using doas +doas -su akkoma + +# Using su +su -s "$SHELL" akkoma +``` +## For OTP installations ```sh -# Download the new release -su akkoma -s $SHELL -lc "./bin/pleroma_ctl update" +# 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 + +# Start akkoma +./bin/pleroma daemon # or using the system service manager (e.g. systemctl start akkoma) -# Migrate the database, you are advised to stop the instance before doing that -su akkoma -s $SHELL -lc "./bin/pleroma_ctl migrate" +# Update frontend(s). See Frontend Configuration doc for more information. +./bin/pleroma_ctl frontend install pleroma-fe --ref stable ``` +If you selected an alternate flavour on installation, +you _may_ need to specify `--flavour`, in the same way as +[when installing](../../installation/otp_en#detecting-flavour). + ## For from source installations (using git) +Run as the `akkoma` user: + +```sh +# fetch changes +git fetch +# check out the latest tag +git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1) + +# Run with production configuration +export MIX_ENV=prod -1. Go to the working directory of Akkoma (default is `/opt/akkoma`) -2. Run `git pull` [^1]. This pulls the latest changes from upstream. -3. Run `mix deps.get` [^1]. This pulls in any new dependencies. -4. Stop the Akkoma service. -5. Run `mix ecto.migrate` [^1] [^2]. This task performs database migrations, if there were any. -6. Start the Akkoma service. +# Download and compile dependencies +mix deps.get +mix compile -[^1]: Depending on which install guide you followed (for example on Debian/Ubuntu), you want to run `git` and `mix` tasks as `akkoma` user by adding `sudo -Hu akkoma` before the command. -[^2]: Prefix with `MIX_ENV=prod` to run it using the production config file. +# Stop akkoma (replace with your system service manager's equivalent if different) +sudo systemctl stop akkoma + +# Run database migrations +mix ecto.migrate + +# Start akkoma (replace with your system service manager's equivalent if different) +sudo systemctl start akkoma + +# Update Pleroma-FE frontend to latest stable. For other Frontends see Frontend Configuration doc for more information. +mix pleroma.frontend install pleroma-fe --ref stable +```