This page documents deployment options, configuration, and operational considerations for running Memos in production. The system is designed for radical simplicity, deploying as a single Go binary (~20MB Docker image) that includes all frontend assets. For database-specific configuration, see Database Configuration. For storage backend setup, see Storage Backends. For CI/CD implementation details, see CI/CD Pipeline.
Memos supports two primary deployment methods: Docker containers (recommended) and standalone binaries. The system uses a unified configuration profile that handles instance parameters like port, data directory, and database drivers.
| Feature | Docker Deployment | Binary Deployment |
|---|---|---|
| Platforms | linux/amd64, linux/arm64 | linux/macOS/windows on amd64/arm64 |
| Security | Non-root user (10001), automated permissions | Manual user management |
| Configuration | Env vars + CLI flags | Env vars or CLI flags |
| Updates | docker pull new image | Scripted or manual download |
| Database | Persistent volume at /var/opt/memos | Local filesystem access |
Sources: README.md28-52 scripts/Dockerfile29-56 AGENTS.md125-126
The following diagram bridges the high-level deployment concepts to the Go structures and CLI flags that implement them.
Sources: cmd/memos/main.go58-59 AGENTS.md58-66
The Dockerfile implements a multi-stage build to ensure a minimal runtime environment. It compiles the Go backend with embedded frontend assets into a static binary using Alpine Linux as the base.
Sources: scripts/Dockerfile1-57 AGENTS.md125-126
The Docker image is built for security and portability, supporting multiple architectures including amd64 and arm64.
entrypoint.sh before dropping privileges using su-exec.5230 and the timezone is set to UTC./etc/secrets to override UI settings.Sources: scripts/Dockerfile31-36 scripts/Dockerfile51-54 scripts/entrypoint.sh13-21 CHANGELOG.md31
For a standard production-ready deployment using the stable image:
For details on advanced container configuration, see Docker and Container Deployment.
Sources: README.md30-38
Memos provides a convenience script for native binary installation. The project also supports building from source using go build.
Sources: README.md40-44 scripts/build.sh28
When running the binary directly, the application defaults to using SQLite. The server can be started with specific flags to override default behavior.
Sources: AGENTS.md30 scripts/build.sh31-33
The backend supports several configuration flags and environment variables for runtime behavior.
| Flag / Env | Description |
|---|---|
--port / MEMOS_PORT | Port to listen on (default: 5230) |
MEMOS_DSN | Database connection string (supports _FILE suffix for secrets) |
MEMOS_INSTANCE_URL | Sets the public instance URL; if missing, instance runs in private mode |
Sources: CHANGELOG.md20 scripts/Dockerfile51-54 scripts/entrypoint.sh50
For evaluation or testing, Memos can be seeded with demo data. The project includes a SQL dump that creates NPC users and sample memos to demonstrate features like Markdown, tags, and visibility levels.
steven (ADMIN), alice, ben, and zoe.Sources: store/seed/sqlite/01__dump.sql1-43
Memos uses GitHub Actions for a robust delivery pipeline.
main branch.v0.30.0). This process builds binaries for Linux, macOS, and Windows across multiple architectures and generates checksums.release-please to manage versioning and CHANGELOG.md generation.Sources: .github/workflows/build-canary-image.yml1-11 .github/workflows/release.yml1-10 .release-please-manifest.json1-3 release-please-config.json1-13
Child Pages:
Refresh this wiki
This wiki was recently refreshed. Please wait 6 days to refresh again.