Docs: split wall of install commands, fix downloading OTP bundle

Bundle could not be downloaded, because sudo does not cope with the
previous syntax that double quoted the whole command, and the download
link was single quoted.
This commit is contained in:
Phantasm 2026-08-13 23:37:34 +02:00
commit 5ecc936444
No known key found for this signature in database
GPG key ID: 2669E588BCC634C8
3 changed files with 93 additions and 46 deletions

View file

@ -0,0 +1 @@
Docs: Fixed OTP install links in documentation, broke up wall of install commands into smaller chunks, fixed sudo commands execution

View file

@ -76,35 +76,51 @@ $EDITOR /etc/pleroma/config.exs
``` ```
## Installing the release ## Installing the release
Before proceeding, get the flavour from [Detecting flavour](otp_en.md#detecting-flavour) section in OTP installation guide. Before proceeding, get the flavour from [Detecting flavour](otp_en.md#detecting-flavour) section in OTP installation guide.
Delete all files in pleroma user's directory:
```sh ```sh
# Delete all files in pleroma user's directory
rm -r ~pleroma/* rm -r ~pleroma/*
```
# Set the flavour environment variable to the string you got in Detecting flavour section. Set the flavour environment variable to the string you got in Detecting flavour section.
# For example if the flavour is `amd64-musl` the command will be For example if the flavour is `amd64-musl` the command will be:
```sh
export FLAVOUR="amd64-musl" export FLAVOUR="amd64-musl"
```
# Clone the release build into a temporary directory and unpack it Clone the release build into a temporary directory and unpack it.
# Replace `stable` with `unstable` if you want to run the unstable branch Replace `stable` with `develop`, if you want to run the develop branch.
sudo -Hu pleroma "
curl 'https://git.pleroma.social/api/packages/pleroma/generic/pleroma-otp-stable-$FLAVOUR/latest/pleroma.zip' -o /tmp/pleroma.zip
unzip /tmp/pleroma.zip -d /tmp/
"
# Move the release to the home directory and delete temporary files ```sh
sudo -Hu pleroma " sudo -Hu pleroma curl "https://git.pleroma.social/api/packages/pleroma/generic/pleroma-otp-stable-$FLAVOUR/latest/pleroma.zip" -o /tmp/pleroma.zip
mv /tmp/release/* ~pleroma/ sudo -Hu pleroma unzip /tmp/pleroma.zip -d /tmp/
rmdir /tmp/release ```
rm /tmp/pleroma.zip
"
# Start the instance to verify that everything is working as expected Move the release to the home directory and delete temporary files:
```sh
sudo -Hu pleroma mv /tmp/release/* ~pleroma/
sudo -Hu pleroma rmdir /tmp/release
sudo -Hu pleroma rm /tmp/pleroma.zip
```
Start the instance to verify that everything is working as expected:
```sh
sudo -Hu pleroma "./bin/pleroma daemon" sudo -Hu pleroma "./bin/pleroma daemon"
```
# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly:
```sh
sleep 20 && curl http://localhost:4000/api/v1/instance sleep 20 && curl http://localhost:4000/api/v1/instance
```
# Stop the instance Stop the instance:
```sh
sudo -Hu pleroma "./bin/pleroma stop" sudo -Hu pleroma "./bin/pleroma stop"
``` ```

View file

@ -130,60 +130,90 @@ Restart PostgreSQL to apply configuration changes:
``` ```
### Installing Pleroma ### Installing Pleroma
Create a Pleroma user:
```sh ```sh
# Create a Pleroma user
adduser --system --shell /bin/false --home /opt/pleroma pleroma adduser --system --shell /bin/false --home /opt/pleroma pleroma
```
# Set the flavour environment variable to the string you got in Detecting flavour section. Set the flavour environment variable to the string you got in Detecting flavour section. For example if the flavour is `amd64-musl` the command will be:
# For example if the flavour is `amd64-musl` the command will be
```sh
export FLAVOUR="amd64-musl" export FLAVOUR="amd64-musl"
```
# Clone the release build into a temporary directory and unpack it Clone the release build into a temporary directory and unpack it:
sudo -Hu pleroma "
curl 'https://git.pleroma.social/api/packages/pleroma/generic/pleroma-otp-stable-$FLAVOUR/latest/pleroma.zip' -o /tmp/pleroma.zip
unzip /tmp/pleroma.zip -d /tmp/
"
# Move the release to the home directory and delete temporary files ```sh
sudo -Hu pleroma " sudo -Hu pleroma curl "https://git.pleroma.social/api/packages/pleroma/generic/pleroma-otp-stable-$FLAVOUR/latest/pleroma.zip" -o /tmp/pleroma.zip
mv /tmp/release/* /opt/pleroma sudo -Hu pleroma unzip /tmp/pleroma.zip -d /tmp/
rmdir /tmp/release ```
rm /tmp/pleroma.zip
"
# Create uploads directory and set proper permissions (skip if planning to use a remote uploader)
# Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later
Move the release to the home directory and delete temporary files:
```sh
sudo -Hu pleroma mv /tmp/release/* /opt/pleroma
sudo -Hu pleroma rmdir /tmp/release
sudo -Hu pleroma rm /tmp/pleroma.zip
```
Create uploads directory and set proper permissions (skip if planning to use a remote uploader).
Note: It does not have to be `/var/lib/pleroma/uploads`, the config generator will ask about the upload directory later.
```sh
mkdir -p /var/lib/pleroma/uploads mkdir -p /var/lib/pleroma/uploads
chown -R pleroma /var/lib/pleroma chown -R pleroma /var/lib/pleroma
```
# Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.) Create custom public files directory (custom emojis, frontend bundle overrides, robots.txt, etc.)
# Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later Note: It does not have to be `/var/lib/pleroma/static`, the config generator will ask about the custom public files directory later.
```sh
mkdir -p /var/lib/pleroma/static mkdir -p /var/lib/pleroma/static
chown -R pleroma /var/lib/pleroma chown -R pleroma /var/lib/pleroma
```
# Create a config directory Create a config directory:
```sh
mkdir -p /etc/pleroma mkdir -p /etc/pleroma
chown -R pleroma /etc/pleroma chown -R pleroma /etc/pleroma
```
# Run the config generator Run the config generator:
```sh
sudo -Hu pleroma "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql" sudo -Hu pleroma "./bin/pleroma_ctl instance gen --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql"
```
# Create the postgres database Create the postgres database and schema:
```sh
sudo -u postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql" sudo -u postgres -s $SHELL -lc "psql -f /tmp/setup_db.psql"
# Create the database schema
sudo -Hu pleroma "./bin/pleroma_ctl migrate" sudo -Hu pleroma "./bin/pleroma_ctl migrate"
```
# If you have installed RUM indexes uncommend and run (Optional) If you have installed RUM indexes:
# sudo -Hu pleroma "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
# Start the instance to verify that everything is working as expected ```sh
sudo -Hu pleroma "./bin/pleroma_ctl migrate --migrations-path priv/repo/optional_migrations/rum_indexing/"
```
Start the instance to verify that everything is working as expected:
```sh
sudo -Hu pleroma "./bin/pleroma daemon" sudo -Hu pleroma "./bin/pleroma daemon"
```
# Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly Wait for about 20 seconds and query the instance endpoint, if it shows your uri, name and email correctly, you are configured correctly:
```sh
sleep 20 && curl http://localhost:4000/api/v1/instance sleep 20 && curl http://localhost:4000/api/v1/instance
```
# Stop the instance Stop the instance:
```sh
sudo -Hu pleroma "./bin/pleroma stop" sudo -Hu pleroma "./bin/pleroma stop"
``` ```