2019-03-28 16:46:30 +00:00
# Updating your instance
2020-01-15 08:12:24 +00:00
2022-12-16 16:23:31 +00:00
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.
2020-01-15 08:12:24 +00:00
Besides that, doing the following is generally enough:
2022-12-14 03:03:08 +00:00
## Switch to the akkoma user
```sh
# Using sudo
sudo -su akkoma
2020-01-15 08:12:24 +00:00
2022-12-14 03:03:08 +00:00
# Using doas
doas -su akkoma
# Using su
su -s "$SHELL" akkoma
```
2020-01-15 08:12:24 +00:00
2022-12-14 03:03:08 +00:00
## For OTP installations
2020-01-15 08:12:24 +00:00
```sh
2022-12-14 03:03:08 +00:00
# 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)
2023-02-26 22:42:28 +00:00
# Update frontend(s). See Frontend Configuration doc for more information.
./bin/pleroma_ctl frontend install pleroma-fe --ref stable
2020-01-15 08:12:24 +00:00
```
2022-09-20 11:04:26 +00:00
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 ).
2020-01-15 08:12:24 +00:00
## For from source installations (using git)
2022-12-14 03:03:08 +00:00
Run as the `akkoma` user:
2020-01-15 08:12:24 +00:00
2022-12-14 03:03:08 +00:00
```sh
2022-12-29 15:42:25 +00:00
# fetch changes
git fetch
# check out the latest tag
git checkout $(git tag -l | grep -v 'rc[0-9]*$' | sort -V | tail -n 1)
2022-12-14 03:03:08 +00:00
# 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
2019-03-28 16:46:30 +00:00
2022-12-14 03:03:08 +00:00
# Run database migrations
mix ecto.migrate
# Start akkoma (replace with your system service manager's equivalent if different)
sudo systemctl start akkoma
2023-02-26 22:42:28 +00:00
2023-05-27 02:34:23 +00:00
# Update Akkoma-FE frontend to latest stable. For other Frontends see Frontend Configuration doc for more information.
2023-02-26 22:42:28 +00:00
mix pleroma.frontend install pleroma-fe --ref stable
2022-12-14 03:03:08 +00:00
```