Unofficial sourcehut docker port (Mostly a mirror of https://git.sr.ht/~comcloudway/docker-hut, but feel free to open issues and PRs if you want 💖)
This repository has been archived on 2025-01-22. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
  • Dockerfile 43.3%
  • Shell 36.9%
  • Python 19.8%
Find a file
Jakob Meier bfba7f1728
Automatically create databases when starting up
Makes it easier to enable services, that were previously disabled,
as missing databases will be created on startup.

Allows us to ship some services (i.e. paste) disabled by default in the future
2024-08-16 07:34:21 +02:00
base Uprade alpine linux version to 3.20 2024-08-11 17:07:51 +02:00
config service/paste.sr.ht: initial support 2024-08-11 15:36:59 +02:00
docs service/paste.sr.ht: initial support 2024-08-11 15:36:59 +02:00
services Automatically create databases when starting up 2024-08-16 07:34:21 +02:00
.gitignore Experimental builds.sr.ht support 2024-07-19 21:39:34 +02:00
compose.yaml Automatically create databases when starting up 2024-08-16 07:34:21 +02:00
LICENSE Added AGPL-3.0-or-later license 2023-03-30 16:12:11 +02:00
README.md docs: Move configuration guide & alpine setup guide into separate files 2024-07-21 21:00:38 +02:00

You probably don't want to use this in production

sourcehut ♥ docker

Unofficial Docker containers for hosting sourcehut.

This project was inspired by ulyc's sourcehut-docker project. But since I was unable to get their init.sh to work, I decided to write my own port.

Also, I wanted my compose.yaml to provide an image for each component instead of providing one image with preconfigurable components.

🔨 Building

You can manage this project with docker compose, but because my base image is not on docker-hub, you'll have to build it yourself.

To do so, simply navigate into the base directory, and run the following command: 1

sudo docker build . -t sr.ht-base

After the base container has been built, you can navigate back to the project root and use sudo docker compose build1 to build all the other containers.

▶ Starting the containers

Before you can start the services you have to configure them. See the Configuration section for more.

As mentioned above, you can use docker compose to manage the project.

Running the systems is as easy as running1:

sudo docker compose up

(You can also append -d to run them in the background)

👤 Manually creating new users

The meta container has to be running to be able to create an admin account See Starting the containers for more.

To create a new user simply run the following command1: sudo docker compose exec meta metasrht-manageuser -e <email> <user>

If you'd rather create an admin account, append -t admin: sudo docker compose exec meta metasrht-manageuser -t admin -e <email> <user>

🪛 Configuration

See the docs/CONFIGURATION.md file for a service by service configuration guide

🪚 Adding/Disabling services

To add or remove services, you can simply remove the given services from the compose.yaml (I recommend commenting out the services instead, because it makes re-adding them later easier).

Keep in mind, that you cannot remove every service, as some services may be required by others (or require additional configuration). It is best to consult the sourcehut documentation before removing services. A couple of good places to start, are the installation guide and the configuration guide.


  1. If you have configured docker/podman for non-sudo mode, you may run the command without the sudo. If you are using doas, you might have to replace sudo with doas ↩︎