Skip to content

Deploying Docmost with Docker Compose

Introduction

Docmost is an open-source collaborative documentation platform that is often compared to Notion or Confluence. It allows teams to create documentation, knowledge bases, project notes, and internal wikis using a modern web interface.

It is an excellent choice for homelab users who want to document servers, Docker containers, network diagrams, maintenance procedures, or anything else they need to remember.

Official Project:

In this guide we'll deploy Docmost using Docker Compose.


Prerequisites

Before starting you should have:

  • Docker installed
  • Docker Compose installed
  • A reverse proxy (recommended)

If you're new to reverse proxies, see the Topic page:

What is a Reverse Proxy?


Step 1 — Create a Docker Folder

Create a folder for Docmost.

mkdir -p /opt/docker/docmost
cd /opt/docker/docmost

Step 2 — Create docker-compose.yml

Create the following Docker Compose file.

services:

  docmost:
    image: docmost/docmost:latest
    depends_on:
      - db
      - redis

    environment:
      APP_URL: http://localhost:3000
      APP_SECRET: change_this_to_a_random_secret
      DATABASE_URL: postgresql://docmost:password@db:5432/docmost
      REDIS_URL: redis://redis:6379

    ports:
      - "3000:3000"

    restart: unless-stopped

    volumes:
      - docmost_storage:/app/data/storage


  db:
    image: postgres:18

    environment:
      POSTGRES_DB: docmost
      POSTGRES_USER: docmost
      POSTGRES_PASSWORD: password

    restart: unless-stopped

    volumes:
      - postgres_data:/var/lib/postgresql/data


  redis:
    image: redis:8

    command:
      - redis-server
      - --appendonly
      - yes

    restart: unless-stopped

    volumes:
      - redis_data:/data


volumes:
  docmost_storage:
  postgres_data:
  redis_data:

Step 3 — Start the Container

Start Docmost.

docker compose up -d

Check that everything is running.

docker ps

Step 4 — Access Docmost

Open your browser.

http://SERVER-IP:3000

On first launch you'll be asked to create the administrator account.


Step 5 — Configure a Reverse Proxy (Recommended)

Although Docmost works perfectly on a local network, it's much more convenient to access it through a reverse proxy.

For example:

https://docs.example.com

instead of

http://192.168.1.100:3000

Remember to set the APP_URL environment variable to your public URL.

Example:

APP_URL=https://docs.example.com

Updating Docmost

Updating is straightforward.

docker compose pull
docker compose up -d

Backing Up

At a minimum you should back up:

  • PostgreSQL database
  • Redis data
  • Uploaded files

If you're backing up your Docker folders regularly, restoring Docmost is very straightforward.


Advanced Example (Reference Only)

The following is my actual production deployment with passwords and secrets removed.

services:
  docmost:
    image: docmost/docmost:latest
    depends_on:
      - db
      - redis

    environment:
      APP_URL: "https://docmost.example.com"
      APP_SECRET: "<secret>"
      DATABASE_URL: "postgresql://docmost:<password>@db:5432/docmost"
      REDIS_URL: "redis://redis:6379"

    ports:
      - "4000:3000"

    restart: unless-stopped

    volumes:
      - docmost:/app/data/storage


  db:
    image: postgres:18

    environment:
      POSTGRES_DB: docmost
      POSTGRES_USER: docmost
      POSTGRES_PASSWORD: "<password>"

    restart: unless-stopped

    volumes:
      - db_data:/var/lib/postgresql/data


  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:

Final Thoughts

Docmost has quickly become one of my favourite self-hosted applications. It combines the ease of use of modern note-taking software with the control of self-hosting, making it ideal for documenting homelab servers, Docker deployments, and personal projects.

If you're looking for a clean, collaborative documentation platform that you fully control, Docmost is well worth trying.