This testing was done with Pleroma 2.2.0, in environment CentOS 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 "" "features/docker-compose":"features/docker-compose" && git -c "" merge --no-commit "features/docker-compose"
  • sudo chown -vR 911 config uploads ; sudo chmod -v g+s config uploads
  • read -p "Enter your domain name: " pleroma_domain

Build it:

  • time docker-compose build
    (takes about 5½ 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}/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}
  • 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:

  • docker-compose run --rm pleroma /opt/pleroma/bin/pleroma_ctl instance gen --domain ${pleroma_domain} --db-configurable y --dbhost db
  • mv -v config/generated_config.exs config/prod.secret.exs && ln -sfv prod.secret.exs config/docker.exs
  • docker-compose exec -T db psql -U postgres < config/setup_db.psql
  • docker-compose up -d
  • docker-compose exec pleroma ./bin/pleroma_ctl user new "james" "" --admin
    • type y at the prompt
    • If you get an RPC error, wait a few seconds and try again [#8003]
  • Reboot the server before resetting the password

Leave a Reply

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