
Cloud-based documentation tools like Notion or Confluence store your sensitive data on third-party servers, often outside the EU. The solution? Self-hosting Docmost – an open-source platform that gives you full control. In this guide, we'll set up Docmost with Docker Compose and Traefik.
Docmost is a modern, open-source documentation and wiki platform. Think of it as a self-hosted alternative to Notion or Confluence. It offers:
Data Sovereignty: Your documentation contains sensitive business information. Self-hosting ensures this data never leaves your infrastructure.
GDPR Compliance: By hosting in Germany or the EU, you maintain full compliance with data protection regulations.
No Vendor Lock-in: You own your data and can migrate or back it up whenever you want.
Cost Savings: No per-user pricing. Host unlimited users on your own server.
Before we start, make sure you have:
For this tutorial, we'll use a Hetzner Cloud server, but any VPS provider works.
Our setup consists of four main components:
Here's how they work together:
Internet → Traefik (SSL) → Docmost → PostgreSQL/Redis
Traefik automatically obtains Let's Encrypt SSL certificates, so your documentation is always served over HTTPS.
First, connect to your server via SSH and create a directory for Docmost:
mkdir -p ~/docmost
cd ~/docmost
Traefik needs a shared network to communicate with Docmost:
docker network create web
Create a directory for Traefik and its configuration:
mkdir -p ~/traefik
cd ~/traefik
Create the Traefik configuration file traefik.yml:
entryPoints:
web:
address: ':80'
http:
redirections:
entryPoint:
to: websecure
scheme: https
websecure:
address: ':443'
certificatesResolvers:
letsencrypt:
acme:
email: your-email@example.com
storage: /letsencrypt/acme.json
httpChallenge:
entryPoint: web
providers:
docker:
exposedByDefault: false
network: web
Create the Traefik docker-compose.yml:
services:
traefik:
image: traefik:v3.6
container_name: traefik
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./traefik.yml:/etc/traefik/traefik.yml:ro
- ./letsencrypt:/letsencrypt
- /var/run/docker.sock:/var/run/docker.sock:ro
networks:
- web
networks:
web:
external: true
Create the Let's Encrypt storage file:
mkdir -p letsencrypt
touch letsencrypt/acme.json
chmod 600 letsencrypt/acme.json
Start Traefik:
docker compose up -d
Navigate back to the Docmost directory:
cd ~/docmost
Generate a secure secret key for your application:
openssl rand -hex 32
Create the docker-compose.yml for Docmost:
services:
docmost:
image: docmost/docmost:latest
depends_on:
- db
- redis
environment:
APP_URL: 'https://docs.your-domain.de'
APP_SECRET: 'REPLACE_WITH_LONG_SECRET'
DATABASE_URL: 'postgresql://docmost:STRONG_DB_PASSWORD@db:5432/docmost?schema=public'
REDIS_URL: 'redis://redis:6379'
restart: unless-stopped
volumes:
- docmost:/app/data/storage
networks:
- web
- internal
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.docmost.rule=Host(`docs.your-domain.de`)'
- 'traefik.http.routers.docmost.entrypoints=websecure'
- 'traefik.http.routers.docmost.tls.certresolver=letsencrypt'
- 'traefik.http.services.docmost.loadbalancer.server.port=3000'
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: docmost
POSTGRES_USER: docmost
POSTGRES_PASSWORD: STRONG_DB_PASSWORD
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql/data
networks:
- internal
redis:
image: redis:7.2-alpine
restart: unless-stopped
volumes:
- redis_data:/data
networks:
- internal
volumes:
docmost:
db_data:
redis_data:
networks:
web:
external: true
internal:
Replace REPLACE_WITH_LONG_SECRET with the secret key you generated using openssl rand -hex 32, and STRONG_DB_PASSWORD with a secure database password (you can generate one the same way).
Before starting Docmost, make sure your DNS is configured:
docs.your-domain.de to your server's IP addressStart all services:
docker compose up -d
Check if everything is running:
docker compose ps
You should see all three containers (docmost, db, redis) in a "running" state.
Open https://docs.your-domain.de in your browser. You'll be greeted by the Docmost setup wizard:
To update to the latest version:
cd ~/docmost
docker compose pull
docker compose up -d
While this tutorial gives you full control, setting up Docmost manually requires:
What if all of this could be automated?
With lowcloud, you can deploy Docmost – or any application with a Docker Compose file – with just a few clicks:
docker-compose.ymllowcloud automatically provisions your VM, sets up the reverse proxy with SSL, and keeps everything updated. Whether it's Docmost, n8n, or your own custom stack – if it runs with Docker Compose, lowcloud can deploy it. Your data stays on your own server in Germany, fully GDPR-compliant.
The result: All the benefits of self-hosting without the DevOps overhead.
Ready to simplify your deployment workflow? Get started with lowcloud and deploy Docmost in under 10 minutes.
For more information about Docmost, visit the official documentation. Questions about deployment? The lowcloud team is happy to help.
Docker Compose Tutorial: Managing Multi-Container Apps Made Easy
Learn Docker Compose from scratch - This tutorial explains how to manage multi-container applications with a single YAML file and why Docker Compose is essential for selfhosting.
What Is Kubernetes? A Practical Guide to Container Orchestration
What is Kubernetes and how does container orchestration work? Learn about K8s architecture, Pods, Services, auto-scaling, and when Kubernetes is the right fit for your project.