Skip to main content

03. Installation on Linux and in containers

What this covers / audience​

How to run One CommandCenter on a Linux server with systemd, and as a container image: building the image, its environment variables, volumes, health checks and non-root user, and the three compose files (single server, SQL Server, SaaS region). For Linux administrators and platform engineers.

Runners that use the screen stay on Windows. Headless runners (web services, files, data) can also run on Linux.

Contents​

  1. What runs on Linux
  2. The Linux package with systemd
  3. The systemd unit explained
  4. Building the container image
  5. Running the image: environment variables
  6. Volumes and the data folder
  7. Health checks
  8. Running ooa commands in the container
  9. Compose files
  10. Orchestrators (ECS, Container Apps, Kubernetes, Cloud Run)
  11. Limits on Linux

1. What runs on Linux​

ComponentLinuxNotes
One CommandCenterYesPackage with systemd, or the container image
SaaS region and directoryYesContainer image recommended (region start, directory start)
Headless runnerYesooa agent register and ooa agent start; screen agents are refused
Runner for screen agentsNoWindows only
Windows sign-in to SQL ServerNoUse SQL logins or PostgreSQL

2. The Linux package with systemd​

The customer zip (ooa-customer-<version>.zip) contains bin/ooa, lib/, linux/ooa-command-center.service and sbom.cdx.json. It needs Java 21 installed.

sudo useradd --system --home /var/lib/ooa --shell /usr/sbin/nologin ooa
sudo mkdir -p /opt/ooa /var/lib/ooa /etc/ooa
sudo chown ooa:ooa /var/lib/ooa
sudo unzip ooa-customer-<version>.zip -d /tmp/ooa
sudo cp -r /tmp/ooa/ooa-customer-<version>/* /opt/ooa/
sudo chmod 755 /opt/ooa/bin/ooa

# secrets: readable by root only; systemd passes them to the service
echo "OOA_MASTER_KEY=<from your secret store>" | sudo tee /etc/ooa/ooa.env
sudo chmod 600 /etc/ooa/ooa.env

# check, then install the unit
sudo -u ooa /opt/ooa/bin/ooa check --data /var/lib/ooa
sudo cp /opt/ooa/linux/ooa-command-center.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now ooa-command-center

With SQL Server or PostgreSQL, run the database commands as the ooa user before starting, with the same vault key in the environment (the stored passwords are encrypted with it):

sudo -u ooa env OOA_MASTER_KEY=... /opt/ooa/bin/ooa db configure --engine postgresql --host db01 --user ooa_app --setup-user ooa_setup --data /var/lib/ooa

and the other ooa db steps in 05. Databases. Alternatively keep the passwords out of the file entirely: put password=env:OOA_DB_PASSWORD in config/ooa-db.properties and the variable in /etc/ooa/ooa.env.

First sign-in: the one-time admin password is in the journal (journalctl -u ooa-command-center).

3. The systemd unit explained​

LineEffect
User=ooa, Group=ooaRuns as the unprivileged ooa account
EnvironmentFile=-/etc/ooa/ooa.envReads OOA_MASTER_KEY (or OOA_MASTER_KEY_SOURCE) and database passwords; optional file
Environment=JAVA_OPTS=-Xmx2g -XX:+ExitOnOutOfMemoryError -Djava.awt.headless=true2 GB heap; exits on out-of-memory so systemd restarts it
ExecStart=/opt/ooa/bin/ooa control-room --host 0.0.0.0 --port 8720 --data /var/lib/ooaOne CommandCenter only, on all interfaces
After=/Wants=network-online.targetStarts after the network is up
Restart=on-failure, RestartSec=10Restarted 10 seconds after a failure
NoNewPrivileges=trueNo privilege escalation
ProtectSystem=strict, ReadWritePaths=/var/lib/ooaThe file system is read-only except the data folder
ProtectHome=true, PrivateTmp=trueNo access to home folders; a private /tmp

Because the unit listens on 0.0.0.0, turn on HTTPS (ooa tls, see 04) or restrict the port to the load balancer with the host firewall. A backup folder outside /var/lib/ooa must be added to ReadWritePaths.

4. Building the container image​

From the platform folder of a source checkout, on a build machine with Docker:

gradlew :cli:installCustomerDist
docker build -f docker/Dockerfile -t ooa-command-center:0.2.0 .

The image:

PropertyValue
Baseeclipse-temurin:21-jre-jammy
Program/opt/ooa, owned by root, read-only to the service user (customer distribution, no vendor tools)
Userooa (system user and group, no login shell, home /data)
DataVOLUME /data, owned by ooa
PortEXPOSE 8720 (OOA_PORT)
Entry point/opt/ooa/docker-entrypoint.sh
Health checkEvery 30 s, timeout 5 s, start period 60 s, 3 retries: GET /api/health must answer 200
Java options-Xmx2g -XX:+ExitOnOutOfMemoryError -Djava.awt.headless=true

Push it to your registry (Amazon ECR, Azure Container Registry, Google Artifact Registry).

5. Running the image: environment variables​

docker run -d -p 8720:8720 -v ooa-data:/data -e OOA_MASTER_KEY=... ooa-command-center:0.2.0
docker run -d -p 8720:8720 -v ooa-data:/data -e OOA_MASTER_KEY=... \
-e OOA_DB_URL="jdbc:sqlserver://sql01:1433;databaseName=ooa_command_center;encrypt=true" \
-e OOA_DB_USER=ooa_app -e OOA_DB_PASSWORD=... ooa-command-center:0.2.0
VariableDefaultMeaning
OOA_PORT8720Port inside the container
OOA_MASTER_KEY-Vault key, 32 random bytes in Base64. Without it (and without a key source) a key file is made in /data.
OOA_MASTER_KEY_SOURCE-azure-keyvault:..., aws-secrets:..., gcp-secret:... (not prompt in a container)
OOA_DB_URL-JDBC address of SQL Server or PostgreSQL. Without it the embedded evaluation database in /data is used.
OOA_DB_USER-Runtime account
OOA_DB_PASSWORD-Its password, read from the environment by the server (never on a command line)
JAVA_OPTSSee aboveJava options
AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN-Credentials for a key source when no managed identity or task role is available

When OOA_DB_URL is set, the entry point starts ooa control-room --host 0.0.0.0 --port $OOA_PORT --data /data --db-url ... --db-user ... --db-password-env OOA_DB_PASSWORD. The schema is created and upgraded at start by that account, so for a container the account needs rights to change tables (or run ooa db migrate with a setup account before rolling out a new image). The SaaS region variables are in 09.

TLS: put it on the load balancer or ingress (port 8720 behind it). The proxy must send X-Forwarded-Proto: https so the session cookie is marked Secure and HSTS is sent; set public_url to the HTTPS address. List the ingress or balancer addresses in Settings > Security > Trusted proxies (trusted_proxies) so the allow list, rate limits and audit trail see each client's address from X-Forwarded-For.

6. Volumes and the data folder​

PathContentsStorage
/dataconfig/ (TLS, database settings), repo-files/, backups/, logs/, audit-checkpoints.log, audit-archive/, master.key if no key is given, the embedded database for evaluationA persistent disk (EBS, managed disk, persistent disk). For several nodes put repository files on shared storage (EFS, Azure Files, Filestore) and point repo_files_folder at it.

Never store master.key on the same volume as backups you send elsewhere; prefer OOA_MASTER_KEY from a secret store.

7. Health checks​

AddressAnswersUse
GET /api/health200 {"status":"ok"} while the process serves requestsLiveness; the image's own HEALTHCHECK
GET /api/health/ready200 when ready, 503 when not; JSON with status (ready or not_ready) and checks: database, schema, vault, disk, runners_onlineReadiness for load balancers and monitoring
GET /healthz{"status":"ok"} on a SaaS region's own addressRegion load balancer

Readiness fails when the database does not answer, the schema is not the version this release needs, the vault key cannot encrypt and decrypt, or less than 200 MB is free. Health routes are never blocked by the IP allow list.

8. Running ooa commands in the container​

With arguments the entry point runs that ooa command instead of the server. For backup it adds --data /data and the database options from the environment:

docker exec <container> /opt/ooa/docker-entrypoint.sh backup now
docker run --rm -v ooa-data:/data -v /backups:/backups -e OOA_MASTER_KEY=... -e OOA_DB_URL=... \
-e OOA_DB_USER=... -e OOA_DB_PASSWORD=... ooa-command-center:0.2.0 backup restore /backups/FILE
docker run --rm ooa-command-center:0.2.0 region token

Stop One CommandCenter container before a restore.

9. Compose files​

All three read secrets from a .env file next to the compose file. Never commit it.

docker/compose.yaml: One CommandCenter with SQL Server 2022​

docker compose -f docker/compose.yaml up -d
ServiceWhat it does
sqlmcr.microsoft.com/mssql/server:2022-latest, data in volume sql-data, health check with sqlcmd
ooa-db-initRuns once: creates ooa_command_center with READ_COMMITTED_SNAPSHOT ON and the login ooa_app, then exits
command-centerThe image on port 8720, data in volume ooa-data, restart: unless-stopped

.env: SA_PASSWORD, OOA_DB_PASSWORD, OOA_MASTER_KEY. For the test set-up the init step makes ooa_app a db_owner and the connection trusts the server certificate (trustServerCertificate=true); for production use a data-only account and a trusted certificate (see 05).

Single container without a database server​

docker run as in section 5 without OOA_DB_URL: embedded database in the volume. Evaluation only.

docker/compose.saas.yaml: one SaaS region with PostgreSQL 16​

ServiceWhat it does
dbpostgres:16, database ooa, user ooa_region, volume region-db
regionThe image with region start --data /data, region in, domain in.localtest.me, volume region-data

.env: OOA_DB_PASSWORD, OOA_MASTER_KEY, OOA_OPERATOR_TOKEN_SHA256 (from ooa region token). Tenants answer at NAME.in.localtest.me:8720. See 09 for production.

Document Automation: compose.docflow.yaml and compose.saas.docflow.yaml​

These are optional add-on files. Each one adds the DocFlow service (AI > Document Automation) and its own PostgreSQL database to the file it extends:

docker compose -f docker/compose.yaml -f docker/compose.docflow.yaml up -d
docker compose -f docker/compose.saas.yaml -f docker/compose.saas.docflow.yaml up -d
ServiceWhat it does
docflow-dbpostgres:16-alpine, database and user docflow, volume docflow-db
docflowDocFlow at the version this release is tested with (built from its v4.2.0 tag, or DOCFLOW_IMAGE). It runs in managed mode, uses volume docflow-data and publishes no port
command-center / regionGets OOA_DOCFLOW_URL and OOA_DOCFLOW_TOKEN, so Document Automation works with no further set-up

Add these to .env:

  • DOCFLOW_TOKEN: the shared service token (openssl rand -hex 32);
  • DOCFLOW_DB_PASSWORD;
  • for SaaS only, DOCFLOW_PLATFORM_URL with {tenant}, for example https://{tenant}.in.example.com;
  • engine keys, only for the cloud and AI engines a customer chooses. Each engine stays off while its key is empty.

Managed mode means DocFlow won't start without the token and never updates itself. On premises, Settings > Document Automation still overrides the address and token. Offline sites build or pull the image elsewhere, load it with docker load, and set DOCFLOW_IMAGE. The full agreement between the two services is in the Document Automation contract.

10. Orchestrators​

PlatformNotes
Amazon ECS (EC2 or Fargate)Task role for aws-secrets: key source; EFS for the shared repository folder; ALB with an ACM certificate
Azure Container Apps or AKSManaged identity for azure-keyvault:; Azure Files for shared storage; Application Gateway or ingress for TLS
Google GKE or Cloud RunService account for gcp-secret:; Filestore for shared storage; HTTPS load balancer. Cloud Run: minimum instances at least 1 and CPU always allocated.
Kubernetes in generalLiveness probe /api/health, readiness probe /api/health/ready; a PersistentVolumeClaim for /data; a NetworkPolicy for egress (required for SaaS)

Never let One CommandCenter scale to zero: schedules, triggers and queues run in the background.

10.1 The Helm chart​

platform/deploy/helm/oneofficeautomation installs One CommandCenter on any Kubernetes, and headless runners too when you want them. Build the image from platform/docker/Dockerfile, push it to your registry, and make the Secrets first:

kubectl create secret generic ooa-master-key --from-literal=key=$(openssl rand -base64 32)
kubectl create secret generic ooa-db --from-literal=password=...
helm install ooa platform/deploy/helm/oneofficeautomation \
--set image.repository=registry.example.com/ooa-command-center \
--set masterKey.existingSecret=ooa-master-key \
--set database.url="jdbc:sqlserver://sql.example.com:1433;databaseName=ooa_command_center;encrypt=true" \
--set database.existingSecret=ooa-db \
--set ingress.enabled=true --set ingress.host=ooa.example.com --set ingress.tlsSecret=ooa-tls
ValueDefaultMeaning
replicaCount1More than one needs database.url and masterKey.existingSecret; the chart refuses otherwise. The nodes share the database and elect a leader for schedules and triggers
masterKey.existingSecret, .keynoneThe vault key from a Secret. Without it the key is a file on the data volume (evaluation only)
database.url, .user, .existingSecret, .passwordKeybuilt-in databaseSQL Server or PostgreSQL. Without it the evaluation database on the volume is used, one pod at a time
persistence.*10Gi, ReadWriteOnceThe /data volume, kept when the release is uninstalled
ingress.*, service.*off, ClusterIP 8720How people reach it
networkPolicy.enabled, .extraEgressPortsoffAllow in 8720; allow out DNS, 443, 1433 and 5432 only (add 587 for e-mail, 514 for syslog)
podDisruptionBudget.*, resources, nodeSelector, tolerations, affinity, extraEnvAs usual
runners.enabled, .replicas, .existingSecret, .urloff, 2Headless runners for agents that need no screen. Each pod registers with a registration key from a Secret (make it a Temporary runner key, so pods that go away are cleaned up)

The pods run as user 10001, not root, with every capability dropped, and the probes check /api/health (started, alive) and /api/health/ready (ready for work). The first administrator's one-time password is in the first pod's log. The chart is linted and rendered by CI (helm lint, helm template) on every push; runners that need a desktop stay on Windows machines (Runner guide).

11. Limits on Linux​

  • ooa service and ooa agent install-task are Windows only; use systemd on Linux.
  • Windows sign-in to SQL Server (--windows-auth) is Windows only.
  • Runner proxy passwords: ooa agent network --proxy-user USER --proxy-password-env VAR works on Linux and macOS. The password is stored in the file proxy-password next to the runner's agent.json, readable by its owner only (mode 600); the config then says "proxy_password": "file:PATH". Run the command as the runner's account. On a file system that cannot keep the file private, put "proxy_password": "env:NAME" (with proxy_user) in agent.json instead and set NAME for the runner.
  • Runner self-update is Windows only; update Linux runners by replacing the package.