Install with Docker
Install Datum with Docker Compose on your own machine.
Overview
A self-hosted Datum installation uses two containers. Postgres 17 stores the data. The app container runs the website, API, CLI, connectors and background worker. The settings live in deploy/.env.
You need Docker, the Compose plugin and git. Run these commands from the repository root. The VPS installer completes these tasks on a fresh Ubuntu server.
Build the imagePrepare the app image
Clone the repository. Open its directory. Build the image with the following commands.
git clone https://github.com/OCMGR/ocmgr.git && cd ocmgr docker build -t ocmgr:local .Datum does not yet publish an image. The first build takes a few minutes.
Done whendocker image ls shows ocmgr:localWrite the settings fileGenerate deploy/.env
Run
ocmgr doctor --initto create the settings file.docker run --rm --user "$(id -u):$(id -g)" -v "$PWD/deploy:/env" \ --entrypoint ocmgr ocmgr:local \ doctor --init --out /env/.env --jsonThe command adds comments and random secret values. It preserves existing values when you run it again.
Keep the
--userflag. On Linux, the container user can differ from the owner ofdeploy/.Add
--public-url https://ocmgr.example.comif users will access that address. Otherwise, the command useshttp://localhost:3000.Copy
OCMGR_MASTER_KEYSinto your password manager. CopyOCMGR_AUTH_SECRETthere too. A restored database needs the master keys to decrypt source credentials.Done whendeploy/.env contains the database password, sign-in secret and master keyStart the stackStart Postgres and the app
Start the containers. Check the health endpoint.
docker compose -f deploy/docker-compose.yml up -d curl -s localhost:3000/healthzThe app applies database migrations before it serves requests. This makes the first start slower. The health endpoint returns
{"status":"ok","database":"ok",…}when the app is ready.Run
docker compose -f deploy/docker-compose.yml logs appif the health check fails.The app listens only on
127.0.0.1:3000. Add the TLS profile after this walkthrough to serve the app over HTTPS.Done when/healthz returns status okRun doctorCheck the installation
Run the installation checks.
docker compose -f deploy/docker-compose.yml exec -T app ocmgr doctor --jsonEach check reports
ok,failedorskipped. Doctor skips checks for services you have not configured, such as email, backups or source tokens. A skipped check does not indicate a failure.Follow each failed check’s
hint.Done whendoctor reports no failed checksCreate a workspaceCreate a workspace for your community
Create the workspace.
docker compose -f deploy/docker-compose.yml exec -T app \ ocmgr workspace create --name "My community" --jsonCopy the returned
id. AddOCMGR_WORKSPACE=<id>todeploy/.envto set the default workspace. Rundocker compose -f deploy/docker-compose.yml up -dto apply the setting.Recover an existing workspace ID with
docker compose -f deploy/docker-compose.yml exec -T app ocmgr workspace list --json.Until you set the default, pass
--workspace <id>with each command.Done whenThe command prints the workspace idCreate the first ownerCreate your owner account
Create the first owner from the terminal.
docker compose -f deploy/docker-compose.yml exec -T app \ ocmgr admin user create --email [email protected] --workspace <id> --jsonOpen the returned
signInUrlin your browser. Keep this link private. Anyone who has it can sign in. It expires shortly and works once. Without email, the command output contains the only copy.Invite subsequent users from Settings → Members, or from the terminal:
docker compose -f deploy/docker-compose.yml exec -T app \ ocmgr admin user invite --email [email protected] --role member --workspace <id> --jsonWithout email, share the returned
inviteUrlprivately. The recipient accepts in a browser.Done whenYou can sign in to your workspaceSet your teamExclude your staff from community counts
Open Settings → General. Add your company’s email domains under Team email domains before you connect sources.
You can also set and check the domains from the terminal. This replaces the complete domain list:
docker compose -f deploy/docker-compose.yml exec -T app \ ocmgr workspace settings set --team-domains example.com --workspace <id> --json docker compose -f deploy/docker-compose.yml exec -T app \ ocmgr workspace settings show --workspace <id> --jsonDatum uses these domains to exclude your staff from community counts.
Done whenSettings → General lists your company's domains