Deploy the server
Run your own Baalda server in one click on Railway, no technical setup. Or, for developers, with Docker, Compose or Coolify.
You don't need a server to use Baalda. The desktop app works fully offline, and the managed service at baalda.com handles sync for you. Run your own server when you want your team's notes on infrastructure you control. The server is open source, has no paid tier and no vault or member limits.
The easy way: one click on Railway
No terminal, no code and nothing to configure. Railway sets up the database, creates the secret keys, prepares everything and gives you a web address for your server.
Deploy on Railway- 1Click Deploy on Railway and sign in, or create a Railway account. Railway bills you for what the server uses.
- 2Click Deploy and wait a few minutes until both services show as active.
- 3Open the
baaldaservice and copy its web address. It looks likehttps://something.up.railway.app. - 4Open the Baalda desktop app. Before your first sign-in it asks where your notes live. Choose your own server and paste the address.
- 5Invite your team by sending them
https://<your-address>/open/connect. One click connects their app to your server.
https://<your-address>/health in your browser. If it shows a version number, your server is running.For developers
The server is one Node service plus Postgres. Attachment bytes can live in Postgres too, so a working deployment can be two containers. The options below are for running it on your own machine or platform.
Ports
| Variable | Default | What it serves |
|---|---|---|
PORT | 3010 | The REST and auth API, the per-note sync WebSocket at /sync, and the vault channel at /vault-sync. This is the only port a deployment needs to expose. |
HOCUSPOCUS_PORT | 3011 | A legacy dedicated port for the editing socket, used in local development and by much older clients. Not required in production. |
Plain Docker
Build the image from the repository root, not from the server directory. The server is one workspace of a pnpm monorepo and needs the workspace root's package.json, pnpm-lock.yaml and pnpm-workspace.yaml to resolve its dependencies.
docker build -f app/apps/server/Dockerfile -t baalda-server .
docker run -p 3010:3010 \
-e DATABASE_URL=postgres://… \
-e JWT_SECRET="$(openssl rand -base64 32)" \
-e BETTER_AUTH_URL=https://notes.example.com \
baalda-serverThe server does not run migrations on start. Before the first start, and after every upgrade, run them once with the same environment: docker run --rm -e DATABASE_URL=postgres://… baalda-server node dist/db/migrate.js. Without them every sign-in fails with HTTP 500. Compose, Coolify and Railway run this step for you.
Docker Compose
The bundle in deploy/compose brings up the server and Postgres together, and its README covers TLS, backups and upgrades.
cd deploy/compose
cp .env.example .env # POSTGRES_PASSWORD, JWT_SECRET, BETTER_AUTH_URL
docker compose up -dCoolify
For a self-managed platform. Same image, same variables, with the deployment document covering the specifics of wiring the database and the healthcheck.
After it is up
- 1Check
GET /health. It answers with the version and the feature list the desktop app reads. - 2Set the server URL in the app, or send your team
https://<your-server>/open/connect. - 3Decide where attachment bytes live before people upload much: Postgres needs nothing, S3 needs a bucket and a CORS policy.
- 4Set up outbound email if you want password reset, verification and mailed invitations.
This page is written from docs/DEPLOY.md and README.md in the repository. Those documents go further, and they are the ones that change first.
Read it on GitHubWas this page helpful?
