You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
5.6 KiB

# Pleroma-Docker (Unofficial)
5 years ago
[Pleroma]( is a selfhosted social network that uses OStatus/ActivityPub.
This repository dockerizes it for easier deployment.
#include <LICENSE>
* This repository comes with ABSOLUTELY NO WARRANTY
* I will happily help you with issues related to this script,
* but I am not responsible for burning servers, angry users, fedi drama,
4 years ago
* thermonuclear war, or you getting fired because your boss saw your NSFW posts.
* Please do some research if you have any concerns about the
* included features or software ***before*** using it.
4 years ago
5 years ago
4 years ago
## In the Wild
My own instance is managed by this script.
Take a look at [hosted/pleroma](/hosted/pleroma) if you get stuck or need some inspiration.
4 years ago
Does your instance use pleroma-docker?
4 years ago
Let me know and I'll add you to this list.
5 years ago
## Docs
5 years ago
4 years ago
These docs assume that you have at least a basic understanding
of the pleroma installation process and common docker commands.
If you have questions about Pleroma head over to
4 years ago
For help with docker check out
For other problems related to this script, contact me or open an issue :)
### Prerequisites
- ~1GB of free HDD space
4 years ago
- `git` if you want smart build caches
- `curl`, `jq`, and `dialog` if you want to use `./ mod`
- Bash 4+
4 years ago
- Docker 18.06+ and docker-compose 1.22+
4 years ago
### Installation
5 years ago
- Clone this repository
- Create a `config.exs` and `.env` file
- Run `./ build` and `./ up`
- [Configure a reverse-proxy](#my-instance-is-up-how-do-i-reach-it)
5 years ago
- Profit!
You can also use normal `docker-compose` commands to maintain your setup.
The only command that you cannot use is `docker-compose build` due to build caching.
### Configuration
All the pleroma options that you usually put into your `*.secret.exs` now go into `config.exs`.
`.env` stores config values that need to be known at orchestration/build time.
Documentation for the possible values is inside of that file.
4 years ago
### Updates
Run `./ build` again and start the updated image with `./ up`.
4 years ago
You don't need to stop your pleroma server for either of those commands.
5 years ago
4 years ago
### Maintenance
4 years ago
Pleroma maintenance is usually done with mix tasks.
You can run these tasks in your running pleroma server using `./ mix [task] [arguments...]`.
4 years ago
For example: `./ mix pleroma.user new sn0w ...`
4 years ago
If you need to fix bigger problems you can also spawn a shell with `./ enter`.
### Customization
Add your customizations (and their folder structure) to `custom.d/`.
They will be copied into the right place when the container starts.
You can even replace/patch pleroma’s code with this,
because the project is recompiled at startup if needed.
In general: Prepending `custom.d/` to pleroma’s customization guides should work all the time.
4 years ago
Check them out in the [pleroma documentation](
For example: A custom thumbnail now goes into `custom.d/` + `priv/static/instance/thumbnail.jpeg`.
### Patches
Works exactly like customization, but we have a neat little helper here.
Use `./ mod [regex]` to mod any file that ships with pleroma, without having to type the complete path.
### My instance is up, how do I reach it?
4 years ago
To reach Gopher or SSH, just uncomment the port-forward in your `docker-compose.yml`.
4 years ago
To reach HTTP you will have to configure a "reverse-proxy".
4 years ago
Older versions of this project contained a huge amount of scripting to support all kinds of reverse-proxy setups.
4 years ago
This newer version tries to focus only on providing good pleroma tooling.
That makes the whole process a bit more manual, but also more flexible.
You can use Caddy, Traefik, Apache, nginx, or whatever else you come up with.
Just modify your `docker-compose.yml` accordingly.
One example would be to add an [nginx server]( to your `docker-compose.yml`:
# ...
image: nginx
init: true
restart: unless-stopped
- server
- ./my-nginx-config.conf:/etc/nginx/nginx.conf:ro
- "80:80"
- "443:443"
Then take a look at [the pleroma nginx example]( for hints about what to put into `my-nginx-config.conf`.
Using apache would work in a very similar way (see [Apache Docker Docs]( and [the pleroma apache example](
The target that you proxy to is called `http://server:4000/`.
This will work automagically when the proxy also lives inside of docker.
4 years ago
If you need help with this, or if you think that this needs more documentation, please let me know.
Something that uses is simple port-forwarding of the `server` container to the host's ``.
From there on, the natively installed nginx server acts as a proxy to the open internet.
You can take a look at cofe's [compose yaml](/hosted/pleroma/src/branch/master/docker-compose.yml) and [proxy config](/hosted/pleroma/src/branch/master/proxy.xconf) if that setup sounds interesting.
### Attribution
4 years ago
Thanks to [Angristan]( and [RX14]( for their dockerfiles, which served as an inspiration for the early versions of this script.
The current version is based on the [offical install instructions](
4 years ago
Thanks to all people who contributed to those.