Code Monkey home page Code Monkey logo

pleroma-docker's Introduction

Pleroma Docker Image

Run Pleroma with a pre-bundled Debian image.

Setup

Install Docker

Go through Docker's instructions for installing on your machine. If you want to use a different machine that has Docker, you can run export DOCKER_HOST=ssh://user@host to have your service run remotely.

Generate a Postgres password

Create a password (with openssl or however you like) for your database.

echo "POSTGRES_PASSWORD=$(openssl rand -base64 16)" >> .env

Cloudflare Tunnel

Note If you're more comfortable with Nginx, please open a pull request with instructions on setting that, so I can have instructions for that up as well as Cloudflare.

  1. Sign up for Cloudflare and configure the DNS for your site with them.
  2. Set up a free Zero Trust service.
  3. Create a tunnel under Access > Tunnels. When you're asked to route traffic, set the public subdomain and hostname to anything you like and set the service to http://pleroma.

Put the TUNNEL_TOKEN in the .env file.

# in your .env file, make a line like this.
TUNNEL_TOKEN=YOUR_TOKEN_VALUE

Configure Server

Generate the configuration files. Start by logging into the container. If you don't have the Docker images, they'll be downloaded automatically for you.

docker compose run --rm --entrypoint /bin/bash pleroma

Once inside the image, generate the Pleroma's configuration. You'll want to use the same domain/subdomain from the tunnel on this step.

/opt/pleroma/bin/pleroma_ctl instance gen \
  --output /mount/config/config.exs \
  --output-psql /mount/config/setup_db.psql \
  --dbhost "$POSTGRES_HOST" \
  --dbname "$POSTGRES_DB" \
  --dbuser "$POSTGRES_USER" \
  --dbpass "$POSTGRES_PASSWORD" \
  --rum N \
  --uploads-dir /mount/uploads \
  --static-dir /mount/static \
  --listen-ip 0.0.0.0 \
  --listen-port 4000 \
  --read-uploads-description Y \
  --strip-uploads-location Y \
  --dedupe-uploads N \
  --anonymize-uploads Y

Still in the image, you'll want to generate the database.

psql -f /mount/config/setup_db.psql "postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:5432"

Finally, you'll want to run pending migrations. When you upgrade the base Pleroma image, you'll want to re-run this command.

/opt/pleroma/bin/pleroma_ctl migrate

Optional

Add yourself as an admin.

./bin/pleroma_ctl user new <nickname> <email> --admin --password <password>

Start the server

Now you can start the service and begin receiving traffic!

docker compose up -d

pleroma-docker's People

Contributors

salvatoret avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.