Skip to content

Setup Docmost

No Longer Active

Overview

Docmost is an open-source collaborative wiki and documentation software. It is an open-source alternative to Confluence and Notion.

Important Docker Files

.env file

.env
NAME=docmost
SUB=docs
DOMAIN=
TZ=America/New_York
APPDATA=
URL=https://${SUB}.${DOMAIN}
PORT=3000
SECRET=
DB_USER=
DB_PASS=
DB_NAME=

SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
SMTP_FROM=
SMTP_FROM_NAME=DocMost

S3_ACCESS_KEY=
S3_SECRET=
S3_REGION=
S3_BUCKET=
S3_ENDPOINT=

docker-compose.yml file

docker-compose.yml
services:
  docmost:
    image: docmost/docmost
    container_name: ${NAME}
    restart: unless-stopped
    depends_on:
      - ${NAME}-db
      - ${NAME}-redis
    environment:
      APP_URL: ${URL}
      APP_SECRET: ${SECRET}
      DATABASE_URL: "postgresql://${DB_USER}:${DB_PASS}@${NAME}-db:5432/${DB_NAME}?schema=public"
      REDIS_URL: "redis://${NAME}-redis:6379"
      MAIL_DRIVER: smtp
      SMTP_HOST: ${SMTP_HOST}
      SMTP_PORT: ${SMTP_PORT}
      SMTP_USERNAME: ${SMTP_USER}
      SMTP_PASSWORD: ${SMTP_PASS}
      MAIL_FROM_ADDRESS: ${SMTP_FROM}
      MAIL_FROM_NAME: ${SMTP_FROM_NAME}
      STORAGE_DRIVER: s3
      AWS_S3_ACCESS_KEY_ID: ${S3_ACCESS_KEY}
      AWS_S3_SECRET_ACCESS_KEY: ${S3_SECRET}
      AWS_S3_REGION: ${S3_REGION}
      AWS_S3_BUCKET: ${S3_BUCKET}
      AWS_S3_ENDPOINT: ${S3_ENDPOINT}
    volumes:
      - ${APPDATA}/${NAME}/data:/app/data/storage
    networks:
      - proxy
      - internal-db
    labels:
      swag: enable
      swag_address: ${NAME}
      swag_port: ${PORT}
      swag_proto: http
      swag_url: ${SUB}.${DOMAIN}
      com.centurylinklabs.watchtower.enable: true
  docmost-db:
    image: postgres:17-alpine
    container_name: ${NAME}-db
    environment:
      TZ: ${TZ}
      POSTGRES_DB: ${DB_NAME}
      POSTGRES_USER: ${DB_USER}
      POSTGRES_PASSWORD: ${DB_PASS}
    restart: unless-stopped
    volumes:
      - ${APPDATA}/${NAME}/${NAME}-db:/var/lib/postgresql/data
    networks:
      - internal-db
    labels:
      com.centurylinklabs.watchtower.enable: true
  docmost-redis:
    image: redis:7.2-alpine
    restart: unless-stopped
    container_name: ${NAME}-redis
    volumes:
      - ${APPDATA}/${NAME}/${NAME}-redis:/data
    networks:
      - internal-db
    labels:
      com.centurylinklabs.watchtower.enable: true
networks:
  proxy:
    external: true
  internal-db:
    external: true

Start the Container

Start the Container
docker compose up -d