This repository holds the server side of Sesame. The servers here never receive a vault password, an encryption key, a TOTP seed, a recovery kit or an unencrypted vault. When someone turns on Sync, the server stores their vault encrypted, together with the signed version history and device list that their devices use to check it.
It contains two separate servers that share no data:
- The hosted service at usesesame.app, with website accounts, beta invitations, download and release information, support requests and desktop linking. It is a Go API with an account portal in
web/accountand an administration portal inweb/admin, and it runs on PostgreSQL. DEPLOYMENT.md covers production. - The self-hosted server,
sesame-server, which you run yourself to pair your desktops and optionally sync encrypted vaults. It is one program with SQLite and a browser console inweb/console. To run one, follow SELF-HOSTING.md.
You need Node and Docker with the Compose plugin, and Go for the tests. From a fresh clone:
npm ci
npm run setup
npm run compose:upnpm run setup writes local secrets to deploy/compose/.env, which git ignores, and keeps existing values when you run it again. npm run compose:up starts PostgreSQL, applies the migrations and runs the API, both portals and a local mail inbox:
| Service | Address |
|---|---|
| Account portal | http://localhost:4175 |
| Administration portal | http://localhost:4174 |
| API | http://localhost:8787 |
| Mail inbox | http://localhost:8025 |
Create the first administrator, which prints a one-time setup link:
npm run admin:bootstrap -- bootstrap you@example.comRegistration is invite-only by default. You can change the registration mode or send invitations from the administration portal.
This stack is for development and runs over plain HTTP, and DEPLOYMENT.md covers running the hosted service publicly. If you put the local stack behind TLS, set SESAME_API_ORIGIN and each portal origin to its HTTPS address in deploy/compose/.env, set SESAME_SESSION_SECURE and SESAME_ADMIN_SESSION_SECURE to true, and run npm run compose:up again so the portals pick up the new API address. Every API setting is listed in .env.example.
The API does not migrate the database itself, and it exits when the schema is out of date, so several replicas never race to migrate. Compose runs the migrate service before it starts the API, and in production the release deploy tool uses the same service, as DEPLOYMENT.md describes.
npm ci
npm run ciThat runs the root checks, and .github/workflows/ci.yml has the full set a pull request must pass, including the portal tests and the self-hosting jobs. npm run verify runs every one of those checks that needs no Docker, in the order CI runs them, and it needs SESAME_TEST_DATABASE_URL, network access and the age v1.3.2 tools on your path. The PostgreSQL tests run only when SESAME_TEST_DATABASE_URL points at a test database, which CI provides, and they fail instead of skipping when the CI variable is set without it. After changing a route, run npm run openapi:generate to rebuild openapi/openapi.json, and see API.md for the rules each route follows.
- SECURITY.md explains how to report a security problem.
- SUPPORT.md describes the support service.