Linux

Where Does Self-Hosted Memos Store Data?

Self-hosted Memos keeps its SQLite database and uploads in /var/opt/memos, mapped to ~/.memos on the host.

Last updated

Memos stores everything, the SQLite database plus uploaded attachments, in /var/opt/memos inside its container. The official Docker command maps that to ~/.memos on your host, so that host folder is your entire instance.

Back up that folder and you hold notes, users, and files together. If you switched the database to MySQL or Postgres, or pointed attachments at S3, those live outside the folder and need their own backups. Keep attachments and database backups paired from the same moment.

Where Memos stores this, by platform

Linux
~/.memos/ (mounted as /var/opt/memos)

Host side of -v ~/.memos:/var/opt/memos. Holds the SQLite file and local uploads. Override with MEMOS_DATA or a full DSN via MEMOS_DSN for MySQL and Postgres. Runs as non-root in the container, so check ownership if writes fail.

Frequently asked questions

How do I back up self-hosted Memos?

Stop the container or accept a small risk, then copy ~/.memos elsewhere. That covers SQLite and local attachments. With external databases or S3 attachments, back those up separately and keep the copies from the same point in time.

Can Memos use MySQL or Postgres instead of SQLite?

Yes. Set MEMOS_DRIVER with a MEMOS_DSN connection string. SQLite suits single node simplicity. Managed databases suit bigger setups but move backup duty to your database tooling, so plan that before migrating.

Notice an outdated path? Let us know.