Deploying
Today, self-hosting runs the database and storage in Docker, and runs the app from source against them.
1. Get the code and configure
Clone the repository, then copy the example environment file and fill it in:
cp .env.example .envThe defaults are set up for self-hosting. See Configuration for what each value does. At minimum, set a strong BETTER_AUTH_SECRET.
2. Start the database and storage
Bring up Postgres and MinIO with Compose:
docker compose -f docker/docker-compose.yml up -dThis starts Postgres on port 5432 and MinIO on ports 9000 and 9001, with their data kept in named volumes.
3. Install, migrate, and run
Install dependencies, apply the database schema, then build and start the app:
pnpm install
pnpm db:migrate
pnpm build
pnpm startThe app is served on port 3000, with the editor at /editor.
Prebuilt container image
A prebuilt web container, so you can run everything with Compose alone, is on the Roadmap. Until then, run the app from source as above.
4. Behind a domain
Put the app behind a reverse proxy with HTTPS, and set APP_URL and BETTER_AUTH_URL to your public URL. A proxy such as Caddy, Nginx, or a platform like Coolify works well.