A collection of Docker Compose files for managing self-hosted services. Each service is organized into its own directory with a dedicated Composefile, and a top-level Composefile ties them all together using the Compose include directive.
| Service | Description |
|---|---|
| gitd | Self-hosted Git forge (Forgejo) for repository management |
| grafana | Monitoring and visualization platform for metrics and dashboards |
| haproxy | Reverse proxy and load balancer for routing HTTP/HTTPS traffic |
| hass | Home automation system with an MQTT broker (Mosquitto) |
| hoarder | Bookmark and web hoarding service with full-text search (MeiliSearch) |
| jellyfin | Media server for streaming movies, TV shows, and music |
| jenkins | CI/CD server with build agent support |
| ollama | Local LLM inference engine with GPU acceleration |
| tavern | Interactive chat interface for conversational AI |
- Install
dockerorpodman. - Install
docker-compose.
-
Clone the repository:
git clone https://github.com/junland/selfhosted-compose.git cd selfhosted-compose -
Configure environment variables:
Copy the default environment file and edit it with your own values:
cp default.env .env
See
default.envfor available configuration keys. All variables are prefixed withSELFHOSTED_and are organized by service. -
Start all services:
docker compose -f Composefile up -d
To start a single service, use its Composefile directly:
docker compose -f ollama/Composefile up -d
.
├── Composefile # Top-level Compose include file
├── default.env # Default environment variable definitions
├── gitd/ # Forgejo Git forge
├── grafana/ # Grafana dashboards
├── haproxy/ # HAProxy reverse proxy (includes Containerfile and config)
├── hass/ # Home Assistant with Mosquitto MQTT broker
├── hoarder/ # Karakeep bookmarking service
├── jellyfin/ # Jellyfin media server (includes Containerfile)
├── jenkins/ # Jenkins CI/CD with agent images
├── ollama/ # Ollama LLM inference engine
└── tavern/ # SillyTavern chat interface
Below is a example of a systemd file if you want to put this as a service:
[Unit]
Description=Selfhosted Applications
Requires=docker.service
After=docker.service
[Service]
Type=simple
RemainAfterExit=true
WorkingDirectory=/etc/selfhosted-ng
ExecStartPre=/usr/bin/mkdir -p /var/run/haproxy
ExecStartPre=/usr/bin/docker compose -p selfhosted -f Composefile --env-file ./default_override.env build
ExecStart=/usr/bin/docker compose -p selfhosted -f Composefile --env-file ./default_override.env up --remove-orphans -d
ExecStopPost=/usr/bin/docker stop --filter 'name=-service$'
ExecStop=/usr/bin/ldocker compose -p selfhosted -f Composefile --env-file ./default_override.env down -t 120
[Install]
WantedBy=multi-user.target
This project is licensed under the MIT License.