This testing was done with Pleroma 2.4.1, in environment Rocky Linux 8

(Before starting, be sure docker and docker-compose are installed, as well as git, and NGINX.)

Fetch and prepare the source code:

  • git clone -b stable --depth=10 "" && cd pleroma
  • git fetch --depth=20 "" "feature/docker-compose":"feature/docker-compose" && git -c "" -c "" merge --no-commit "feature/docker-compose"
  • read -p "Enter your domain name: " pleroma_domain

Build it:

  • mkdir -vp uploads && sudo chown -vR 911:911 config uploads && sudo chmod -v g+s config uploads
  • time docker-compose build
    (takes about 6 mins on my 2-core VPS)

While you're waiting for it to build, prepare the NGINX reverse proxy:
(Skip this if you otherwise know how you're preparing the frontend)

  • sed "s/example.tld/${pleroma_domain:?pleroma_domain}/g" < installation/pleroma.nginx | sudo tee /etc/nginx/sites-available/pleroma
  • sudo ln -vs ../sites-available/pleroma /etc/nginx/sites-enabled/

Configure a TLS cert:
(Obviously, also skip this if you know you’re doing it otherwise)

  • sudo dnf install -y epel-release && sudo dnf install certbot
  • sudo certbot certonly --standalone -d ${pleroma_domain:?pleroma_domain}
  • sudo service nginx start
  • If you're going to be retrying these instructions from scratch multiple times, and don't want to get ratelimited by Let's  Encrypt:
    • sudo tar c -vpPJf le.txz /etc/letsencrypt
    • Save that file somewhere
    • sudo tar x -vpPJf le.txz

Set it up:

  • firewall-cmd --add-port=5432/tcp --zone=docker && firewall-cmd --add-port=5432/tcp --zone=docker --permanent
    • NB: this kinda… just… doesn't work (even on latest releases of docker and docker-compose). The easiest workaround is to just disable firewalld [#9284] (and then reboot)
  • docker-compose run --rm web /opt/pleroma/bin/pleroma_ctl instance gen --force --domain "${pleroma_domain:?pleroma_domain}" --db-configurable y --dbhost db --dbname pleroma --dbuser pleroma --listen-ip --listen-port 4000 --uploads-dir /var/lib/pleroma/uploads --static-dir /var/lib/pleroma/static --output-psql /var/lib/pleroma/config/setup_db.psql --output /var/lib/pleroma/config/secret.exs
  • docker-compose up db -d --wait
  • docker-compose exec -T db psql -U postgres < config/setup_db.psql
  • docker-compose run --rm web /opt/pleroma/bin/pleroma_ctl migrate
  • docker-compose up web -d --wait
  • docker-compose exec web /opt/pleroma/bin/pleroma_ctl user new "lain" "webmaster@${pleroma_domain:?pleroma_domain}" --admin -y

Leave a Reply

Your email address will not be published. Required fields are marked *

Warning: This site uses Akismet to filter spam. Until or unless I can find a suitable replacement anti-spam solution, this means that (per their indemnification document) all commenters' IP addresses will be sent to Automattic, Inc., who may choose to share such with 3rd parties.
If this is unacceptable to you, I highly recommend using an anonymous proxy or public Wi-Fi connection when commenting.