Skip to main content

Docmost

Use these steps to download the official Docmost Docker Compose file, configure it, and start the service.

Create the Docmost Directory​

Create a dedicated folder for Docmost and move into it:

mkdir docmost
cd docmost

Download the Compose File​

Download the official docker-compose.yml file from Docmost:

curl -O https://raw.githubusercontent.com/docmost/docmost/main/docker-compose.yml

Edit the Compose File​

Open docker-compose.yml:

vim docker-compose.yml

Use this Compose configuration:

services:
docmost:
image: docmost/docmost:latest
depends_on:
- db
- redis
environment:
APP_URL: ${APP_URL}
APP_SECRET: ${APP_SECRET}
DATABASE_URL: ${DATABASE_URL}
REDIS_URL: ${REDIS_URL}
ports:
- "3000:3000"
restart: unless-stopped
volumes:
- docmost:/app/data/storage

db:
image: postgres:18
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
restart: unless-stopped
volumes:
- db_data:/var/lib/postgresql

redis:
image: redis:8
command: ["redis-server", "--appendonly", "yes", "--maxmemory-policy", "noeviction"]
restart: unless-stopped
volumes:
- redis_data:/data

volumes:
docmost:
db_data:
redis_data:

Create the Environment File​

Create a .env file in the same directory as docker-compose.yml:

APP_URL=http://localhost:3000
APP_SECRET=replace-with-a-long-random-secret
DATABASE_URL=postgresql://docmost:replace-with-a-strong-database-password@db:5432/docmost
REDIS_URL=redis://redis:6379
POSTGRES_DB=docmost
POSTGRES_USER=docmost
POSTGRES_PASSWORD=replace-with-a-strong-database-password

Start Docmost​

Run Docker Compose from the docmost directory:

docker compose up -d

Docmost will be available at http://localhost:3000.

Reverse Proxy / HTTPS​

If you need public HTTPS access, put Docmost behind a reverse proxy like Nginx Proxy Manager.