Self-host Memos

A self-hosted note-taking app that keeps short Markdown notes in a personal timeline, with optional sharing. Run your own Memos on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.

Updated November 23, 2026

Running your own Memos usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Memos behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.

Just ask your agent

Open a Hobby workspace, tap Launch to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:

Set up Memos on this workspace and give me the link. Follow https://envhaven.com/self-host/memos.md

Then open the link it sends and create your Memos account straight away, before anyone else finds the address. That is the whole request: the address in it is this page’s Markdown copy, and the agent follows the instructions for it further down, with every setting Memos’s docs require.

Or keep it private with Tailscale

The preview URL puts Memos on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Memos an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace’s Vars pane as TS_AUTHKEY, and ask the agent:

Set up Memos on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/memos.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
  • On Plus and Pro, a Tailscale container runs beside Memos, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
  • On Hobby, Tailscale runs in the workspace beside Memos; after a restart or an update, ask the agent to start both again.
  • Anything other services have to reach, such as a webhook, still needs a public address. Keep self-hosted apps private with Tailscale covers both, and what Tailscale’s free plan includes.
At a glance
What it isNotes, wikis and knowledge bases
LicenseMIT
Runs asDocker (neosmemo/memos:stable) or a native install
MemoryNot documented
Plan that fitsHobby or larger
Web port5230
Documentationusememos.com/docs/deploy

What your agent takes care of

  • Installing it. Memos runs from the official image, neosmemo/memos:stable, with its data in folders under ~/apps/memos, or without Docker on Hobby.
  • Putting it on an HTTPS address. The workspace’s preview URL serves it, and your own domain can too.
  • Locking it down first. What Memos’s docs say to set before it faces the internet, below.
  • Telling you what to back up: /var/opt/memos in the container (~/.memos on the host in the quick start): memos_prod.db (SQLite) and assets/ (uploaded files), the external MySQL or PostgreSQL database when MEMOS_DRIVER is mysql or postgres and the S3-compatible bucket when attachments use object storage (docs).

The settings it needs behind a proxy

  • MEMOS_INSTANCE_URL (flag --instance-url): Canonical external URL, absolute HTTP(S) without credentials, query or fragment; used for links and cookies behind a proxy. (docs)
  • MEMOS_INSTANCE_URL format: Example of the accepted value. (docs)
  • Forwarded headers (Host, X-Forwarded-Proto, X-Forwarded-For); no trusted-proxy setting is documented: The proxy must pass these so redirects, links and cookies use the public address. (docs)
  • HTTPS and cookies: The docs ask you to confirm cookies and auth flows work over HTTPS. (docs)
  • ACCESS instance setting (private or public): Controls anonymous access separately from the URL. (docs)

Before it faces the internet

  • The first account created becomes the host admin, so create it immediately after the first start. (docs)
  • Setting MEMOS_INSTANCE_URL on the very first start initializes public access; omitting it initializes private access. (docs)
  • Turn off user registration on a private instance. (docs)
  • Never run demo mode in production. (docs)
  • Terminate TLS in front of it. (docs)

Things to ask next

Everything after the install is one more sentence to the agent. Some that come up:

  • “Import this folder of Markdown notes, keeping the folder structure.”
  • “Turn off public sign-ups now that my account exists.”
  • “Move Memos to app.example.com.” Add the domain on the dashboard’s Domains page with a CNAME to domains.envhaven.app, and the agent changes Memos’s address settings to match.
  • “Update Memos to the latest release.” It pulls the new image and recreates the container, data kept.

Instructions for the agent

The agent reads these from the page’s Markdown copy. They also work pasted on their own, if you would rather give them in your own words.

Set up Memos on this workspace and serve it at my preview URL.
- Where Docker has a daemon (Plus and Pro), use Docker Compose with the official image, neosmemo/memos:stable, starting from the docs' compose file: https://github.com/usememos/memos/blob/26.11.2/scripts/compose.yaml. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- Keep the compose file in ~/apps/memos and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Memos's port 5230.
- Without Docker (on Hobby, where Docker has no daemon), install it as its docs describe, with the prebuilt binary, run as `./memos --port 5230 --data <folder>` (none documented; self-contained binary for Linux amd64, arm64 and armv7, macOS and Windows), into ~/apps/memos with its data, so it survives workspace updates; global installs and system paths do not. Run it in a tmux window named memos, listening on 0.0.0.0:5230, and point my preview URL at port 5230.
- The preview URL terminates HTTPS in front of Memos: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/memos.md for the preview URL, as Memos's docs describe for running behind a proxy; skip any that apply only when Memos serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/memos.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Memos up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.

What to know

  • In Docker, Memos’s containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
  • Without Docker, Memos runs as a process in the workspace, so after a restart or an update, ask the agent to start it again.
  • Default upload cap is 32 MiB per file (8 KiB per memo) until an admin sets Usage limits; any limit raised above 100 MB would still be cut off by the tunnel. (docs)
  • Attachments live in the database by default, which grows the database; local filesystem or S3-compatible storage are the alternatives. (docs)
  • The admin docs list SMTP delivery under optional notification settings; sign-in is by username and password or SSO, and no SMTP is documented as needed for sign-in. (docs)
  • AI is optional and uses external providers (OpenAI or Gemini) configured by an admin; nothing runs locally and no GPU is needed. (docs)
  • Docker and binary defaults differ: 5230 in the image, 8081 for the bare binary. (docs)
  • A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.

Without a workspace

The manual route, on a server you run:

  1. Rent a Linux VPS, secure SSH, and create a user for the app.
  2. Install Docker and write a compose file from the official image.
  3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
  4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
  5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Memos’s own documentation covers each step for its install methods.

Sources

Facts about Memos come from its own documentation, checked on 2026-11-23: