Why self-host Memos?
Memos is an open-source note-taking application for quick writing, Markdown content and sharing with a chosen audience. Self-hosting lets you choose its server location, manage accounts and decide how its data is backed up. It suits a personal notebook or a small team's running record of work. Explore the official Memos project.
Capture a useful detail
Save a troubleshooting note, a command explanation or a decision while its context is fresh.
Find it again
Use consistent tags, searchable text and focused notes to build a reference you can return to.
Choose the audience
Keep personal notes private or use a Space for a shared project, with access reviewed before inviting people.
Version 26.11.1 arrived on 16 November 2026. Its Markup tools support drawings and image annotations, while attachment ordering and searchable emoji reactions improve everyday use. This guide pins that release so you can plan subsequent upgrades. Read the 26.11.1 release notes.
Choose a VPS and prepare the hostname
Our starting recommendation for a personal instance or a few modest users is about 2 vCPU and 2 GB RAM. This is HYEHOST's initial sizing guidance. Monitor the workload and leave room for updates, attachments and growth. Attachment-heavy use needs attention to disk capacity and monthly transfer.
Use a current Ubuntu LTS server with Docker Engine, the Compose plugin, SSH access and an administrator who can run Docker commands and use sudo. This guide runs Caddy directly on the host and SQLite in persistent storage. Prepare a subdomain such as memos.example.com for HTTPS.
1. Create the deployment directory
For a fresh installation, create a dedicated folder and a restricted environment file. Leave the instance URL empty during setup, then configure the HTTPS address after checking access settings.
docker version
docker compose version
umask 077
mkdir -p ~/memos/data
cd ~/memos
printf '%s\n' 'MEMOS_INSTANCE_URL=' > .env
chmod 600 .env
MEMOS_INSTANCE_URL defines the canonical address. A fresh instance with an empty URL initializes private access. Memos stores that access policy separately, so explicitly review it before publishing the hostname. Review the runtime settings.
2. Run Memos with Docker Compose
Save this as compose.yaml in the same directory. The host port binds to loopback, and ./data preserves the database and local files when the container is replaced. Review the official Compose deployment guide.
services:
memos:
image: neosmemo/memos:26.11.1
restart: unless-stopped
ports:
- "127.0.0.1:5230:5230"
volumes:
- ./data:/var/opt/memos
env_file:
- .env
environment:
MEMOS_PORT: "5230"
MEMOS_DRIVER: sqlite
MEMOS_DATA: /var/opt/memos
docker compose config --quiet
docker compose pull
docker compose up -d
docker compose ps
docker compose logs --tail=100 memos
curl --fail --retry 12 --retry-connrefused --retry-delay 5 \
http://127.0.0.1:5230/healthz
Wait for the health check to succeed before signing in. Use a current Docker Engine for localhost publishing. The container entrypoint adjusts mounted-volume ownership for its application user. Inspect startup logs and permissions if it reports a storage error. Read the container deployment notes. Review Docker port publishing.
3. Set up the administrator and private access
On your computer, open this SSH tunnel with your connection details. Keep the terminal open and visit http://localhost:5230.
ssh -N -L 5230:127.0.0.1:5230 admin@YOUR_VPS_IP
Create an account with a unique password. The first account becomes the instance administrator, so complete this step before adding public access. Keep its details in your password manager. Review account roles.
- Open Settings, then System, then Access and policies.
- Turn off Allow public access.
- Turn on Disallow user registration, then save.
- Choose Private visibility for personal notes and review settings before publishing the hostname.
The access policy and the external URL serve different purposes. Changing an existing instance's URL preserves its saved access policy. Review the instance settings.
4. Publish Memos through Caddy HTTPS
Create an A record for memos.example.com pointing to the VPS. Add an AAAA record when IPv6 works. Edit .env to use your HTTPS hostname.
MEMOS_INSTANCE_URL=https://memos.example.com
Apply the updated configuration.
docker compose config --quiet
docker compose up -d memos
Install Caddy from its official Ubuntu package instructions. Add this site block to /etc/caddy/Caddyfile, retaining existing sites and replacing the example hostname. Follow Caddy installation.
memos.example.com {
reverse_proxy 127.0.0.1:5230
}
sudo caddy validate --config /etc/caddy/Caddyfile
sudo systemctl reload caddy
Allow inbound TCP 80 and 443 through the applicable firewalls and restrict SSH to your administrators. Caddy serves HTTPS and forwards requests to the local application. Keep port 5230 bound to localhost. Review the HTTPS reverse proxy.
Visit the HTTPS hostname and sign in. In a separate signed-out browser, verify that ordinary note pages require sign-in and that registration is closed. Complete these checks through the public hostname before depending on the instance.
5. Write, tag and share your first memo
Create a short note, check its visibility and add a tag you will use consistently. Markdown supports headings, checklists, links and code blocks. Switch to Markdown mode to edit the underlying text. Review the writing guide.
## Deployment checklist
- [x] Verify the HTTPS hostname
- [ ] Test a backup restore
#operations #memos
Upload a small image and confirm it opens after refreshing. Try Markup with a drawing or annotation, then review the saved attachment. Keep the test note recognisable for your restore test.
On a shared instance, PROTECTED content is readable by signed-in users, while SPACE content follows active membership of its assigned Space. Share links create separate access and can expose a private memo to someone holding the link. Review and revoke them deliberately. Review visibility and sharing.
Active instance administrators can read and manage individual private and Space-only memos. Choose who administers a shared server with that responsibility in mind. Read the administration overview.
Back up SQLite and attachments together
For this single-container setup, an offline copy of the complete data directory captures SQLite and local attachments together. This script also retains deployment files and the Caddy configuration. Save it as backup-memos.sh in ~/memos. Run bash backup-memos.sh during a short maintenance window.
#!/usr/bin/env bash
set -e
cd "$HOME/memos"
umask 077
backup_dir="$HOME/memos-backups"
mkdir -p "$backup_dir"
archive_path=$(mktemp "$backup_dir/memos-XXXXXXXX")
sudo -v
resume_memos() {
backup_status=$?
trap - EXIT
if ! docker compose start memos; then
printf '%s\n' 'Memos restart failed. Review the service logs.' >&2
if [ "$backup_status" -eq 0 ]; then
backup_status=1
fi
fi
exit "$backup_status"
}
trap resume_memos EXIT
docker compose stop memos
sudo tar -czf - compose.yaml .env data \
-C /etc/caddy Caddyfile > "$archive_path"
printf 'Backup archive created at %s\n' "$archive_path"
The exit handler attempts to start Memos after the copy, including after a backup-command failure, and retains the failure status. Check script success and service status. Treat a failed archive as incomplete. Keep encrypted copies away from the live VPS and test an isolated restore. Review backup and restore guidance.
An administrator's account export provides portable memos and attachments. Full-instance recovery also needs accounts, settings and storage configuration. Read the export guide.
Plan updates around a recoverable backup
Record the running image tag, create a verified backup and read the release notes before updating. Edit the pinned tag, pull and recreate the service, then inspect startup logs, sign-in, memos and attachments.
docker compose config --quiet
docker compose pull memos
docker compose up -d memos
docker compose logs --tail=100 memos
Memos applies migrations during startup. Recovery after a migration uses a compatible pre-upgrade backup. Existing installations must follow the documented intermediate versions and review configuration changes. Fresh installations can begin at 26.11.1. Check the upgrade instructions.
Older declarative deployments moving to 26.11.1 must remove the retired MEMO_RELATED setting. Its attachment-index migration requires stopping every database writer before starting one updated instance. Review those instructions when adapting this guide to an existing or replicated deployment. Read this release's migration notes.
Common Memos Docker setup problems
The container cannot write its data
Check the bind mount, free disk space and startup logs. Inspect directory permissions and the container user's requirements before changing ownership.
The HTTPS page does not load
Check DNS, inbound ports, Caddy validation and the instance URL. Confirm Memos is running and reachable through its localhost port.
A note has the wrong audience
Review the instance ACCESS policy, memo visibility, Space membership and share links. Test with a separate account or a signed-out browser.
Keep the error message and running version when investigating a failure. Start with application logs and change one setting at a time to identify which adjustment resolves it. Use the troubleshooting guide.
Self-hosted Memos FAQ
Is Memos free to self-host?
Memos is open-source software under the MIT licence. You can run it on your own VPS and manage its users, storage and access settings. Your hosting and any optional external services have their own costs.
How much RAM should I choose for a small Memos VPS?
Our starting recommendation for a small personal instance is about 2 GB RAM and 2 vCPU. This is HYEHOST sizing guidance. Monitor memory and disk use as your notes, attachments and integrations grow.
How do I make my Memos instance private?
Under Settings, System, Access and policies, turn off Allow public access and turn on Disallow user registration, then save. Use Private visibility for personal notes and review any explicit share links you create.
Where does this Docker setup store Memos data?
The Compose file maps the local data directory to /var/opt/memos inside the container. With SQLite, the database is data/memos_prod.db. Keep the whole data directory and deployment configuration in your recovery plan.
Can I upgrade an older Memos instance directly to 26.11?
Older releases can require intermediate upgrades. Read the official upgrade path and back up the database, attachments and configuration before updating. Use the pre-upgrade backup with the previous image version for rollback.
What does a Memos account export include?
An administrator can export an account's memos and attached files as a ZIP for portability. Use database, attachment-storage and deployment-configuration backups to recover the entire instance, including its accounts and settings.

