Update the "Updating your instance" docs (#361)
[akkoma] / docs / docs / administration / updating.md
1 # Updating your instance
2
3 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.
4
5 Besides that, doing the following is generally enough:
6 ## Switch to the akkoma user
7 ```sh
8 # Using sudo
9 sudo -su akkoma
10
11 # Using doas
12 doas -su akkoma
13
14 # Using su
15 su -s "$SHELL" akkoma
16 ```
17
18 ## For OTP installations
19 ```sh
20 # Download latest stable release
21 ./bin/pleroma_ctl update --branch stable
22
23 # Stop akkoma
24 ./bin/pleroma stop # or using the system service manager (e.g. systemctl stop akkoma)
25
26 # Run database migrations
27 ./bin/pleroma_ctl migrate
28
29 # Update frontend(s). See Frontend Configuration doc for more information.
30 ./bin/pleroma_ctl frontend install pleroma-fe --ref stable
31
32 # Start akkoma
33 ./bin/pleroma daemon # or using the system service manager (e.g. systemctl start akkoma)
34 ```
35
36 If you selected an alternate flavour on installation,
37 you _may_ need to specify `--flavour`, in the same way as
38 [when installing](../../installation/otp_en#detecting-flavour).
39
40 ## For from source installations (using git)
41 Run as the `akkoma` user:
42
43 ```sh
44 # Pull in new changes
45 git pull
46
47 # Run with production configuration
48 export MIX_ENV=prod
49
50 # Download and compile dependencies
51 mix deps.get
52 mix compile
53
54 # Stop akkoma (replace with your system service manager's equivalent if different)
55 sudo systemctl stop akkoma
56
57 # Run database migrations
58 mix ecto.migrate
59
60 # Update frontend(s). See Frontend Configration doc for more information.
61 mix pleroma.frontend install pleroma-fe --ref stable
62
63 # Start akkoma (replace with your system service manager's equivalent if different)
64 sudo systemctl start akkoma
65 ```