Memos
Deploy

Docker Compose

Deploy Memos with Docker Compose for repeatable local or small production setups.

Docker Compose is a good default when you want a checked-in deployment file, predictable restarts, and easier upgrades than a one-off docker run command.

Basic setup

services:
  memos:
    image: neosmemo/memos:stable
    container_name: memos
    restart: unless-stopped
    ports:
      - "5230:5230"
    volumes:
      - ./data:/var/opt/memos
    environment:
      MEMOS_PORT: 5230
      MEMOS_DRIVER: sqlite
      MEMOS_INSTANCE_URL: https://memos.example.com

Run it with:

docker compose up -d

Why Compose is often better than raw Docker

  • declarative configuration you can review in git
  • easier upgrades and restarts
  • cleaner environment variable management
  • straightforward volume and network definitions

Common operational commands

docker compose logs -f
docker compose down
docker compose pull
docker compose up -d

Production notes

  • keep your data directory on persistent storage
  • place Memos behind a reverse proxy for HTTPS
  • set MEMOS_INSTANCE_URL to the public URL
  • back up both the database and any local assets if you do not use database-backed attachment storage

When to add more services

Compose becomes more useful when you also want:

  • a reverse proxy container
  • a dedicated MySQL or PostgreSQL container for local evaluation
  • explicit secret and environment file handling

On this page