Skip to main content
Production deployments run from the dedicated deployment repository oasm-platform/oasm-docker. It packages the platform as ready-to-run container images — oasm/oasm-console, oasm/oasm-api, and oasm/oasm-worker — together with a compose file, a Makefile, an nginx configuration, and a .env.example that wires the whole stack together. The two repositories have different roles:
  • oasm-platform/open-asm is the source-code monorepo where the platform is developed. It is for building and running from source — see the Developer guide.
  • oasm-platform/oasm-docker is the deployment repository used to run the platform in production. Clone this repo, configure .env, and start the stack with make.
Deploying production from open-asm — cloning the dev repository and copying its compose file — is not the supported path. Always deploy from oasm-docker, which pins the runtime configuration, nginx routing, and image tags for production.

Prerequisites

  • Docker Engine with Compose V2 — included with Docker Desktop on Windows and macOS; install the standalone plugin on Linux servers. See the Docker installation guide.
  • Make — required: the repository’s Makefile drives pull, run, update, and cleanup.
    • Windows — use Git Bash or WSL, or install make via Chocolatey (choco install make).
    • macOS — brew install make.
    • Linux — sudo apt install make (Debian/Ubuntu) or sudo yum install make (RHEL-family).
  • Resources — at minimum 4 CPU cores, 4 GB RAM, and 20 GB free disk space. Scanning workloads benefit from more.
The stack runs eight services: console, core-api, migration, oasm-worker, postgres, redis, geo-ip-database, and rustfs. Give the stack a few minutes on first start while images are pulled and the database is initialized.

Deployment stack overview

Deploy with Docker Compose

1

Clone the deployment repository

2

Prepare the environment file

3

Generate the required secrets

From v0.10.0, core-api will not start until ENCRYPTION_KEYS and BETTER_AUTH_SECRET hold random values. Generate a separate value for each:
On Windows, openssl ships with Git for Windows — run it from Git Bash.Set them in .env:
Never reuse a value from documentation, examples, or another deployment. Anyone who knows these values can decrypt your stored credentials or forge sessions.
4

Replace the remaining defaults

Replace every default credential before going live:
  • OASM_CLOUD_APIKEY — set to your OASM Cloud API key (default change_me).
  • POSTGRES_PASSWORD — replace the default.
  • REDIS_PASSWORD — replace the default, and mirror the new value in REDIS_URL (redis://:PASSWORD@redis:6379/0).
  • RUSTFS_ACCESS_KEY and RUSTFS_SECRET_KEY — replace the defaults.
Optionally pin IMAGE_TAG to a specific release (for example v0.10.0) instead of latest so upgrades are deliberate. Keep the file out of version control.
5

Start the stack

The default target pulls the latest images and starts the stack. The equivalent manual commands are:
6

Wait for core-api to become healthy

The console depends on core-api being healthy, so it may take a moment to come online. Check the API health endpoint:
The console’s nginx routes /api/ to core-api, so this host port works even though the API container listens on the internal PORT. When it returns a healthy response, the stack is ready.
7

Open the console and bootstrap the admin

Open http://localhost:6276 in your browser. On first run, use the /init-admin route to bootstrap the initial admin account before signing in.
Running with the default secrets (change_me, the sample PostgreSQL, Redis, and RustFS passwords) exposes your deployment to credential abuse. Rotate every default before exposing the stack beyond localhost.

First-run admin setup

OASM exposes the /init-admin route for the initial admin bootstrap. The first account created through it receives admin privileges automatically. After the admin exists, invite additional members through the members flow — see Members.

Verify the deployment

After the stack is up, confirm each layer is healthy before relying on it:
  1. API health — curl http://localhost:6276/api/health returns a healthy response when the Core API is ready.
  2. Console — open http://localhost:6276; you should reach the login page and, on first run, the admin bootstrap flow.
  3. Workers — open the Workers section of the console: the oasm-worker instance should appear connected.
  4. Job execution — enqueue a small discovery job and watch it move from Queued to Completed in the job registry. This proves the full path from API to worker to tools.
These four checks cover the whole data path, so a deployment that passes them is ready for real scanning workloads.

Port reference

In the production oasm-docker stack the web console is on 6276. In the open-asm dev source tree the compose file maps the dev console to 3000 and the Vite dev server serves on 5173; neither applies to production. Keep the two deployment modes separate when troubleshooting.

Scaling workers

Workers connect to the Core API over gRPC and scale horizontally:
  • Default — the Compose stack runs WORKER_REPLICAS (default 3) oasm-worker replicas in node mode. Spawned connector containers join the connector network (WORKER_CONNECTOR_NETWORK) and dial each replica on its own address there, so nothing is published on the host and replicas never collide.
  • Per-worker concurrency — WORKER_MAX_CONCURRENCY (default 10) limits how many jobs a single worker executes at once. Raise it for faster throughput on capable hosts, lower it to reduce load.
  • Scope awareness — a worker runs under Workspace or Global scope, which determines which jobs it may pull. See Workers.
  • More workers — change WORKER_REPLICAS, or run docker compose up -d --scale oasm-worker=N. WORKER_MAX_CONCURRENCY applies per replica, so lower it when several replicas share one host. Workers on other hosts join with a one-time API key from the Connect worker dialog — see Workers.
The worker starts connector containers through the host’s Docker daemon (docker-outside-of-docker), which is why the socket is mounted. In the Compose file, DOCKER_GID must match the host’s Docker socket group or the worker gets permission denied when starting containers.
Workers cache built-in tool templates in the worker-tools-cache volume, so tool installation happens once per worker environment rather than once per job. Connector images are pulled on demand and cached by the Docker daemon.

Updates

  • make update — pulls the latest commit and images, then restarts the stack.
  • make update-main — refreshes the images and restarts the stack without pulling a new commit.
Migrations run automatically: the one-shot migration service applies TypeORM migrations before core-api starts (its depends_on requires service_completed_successfully), so upgrading the images applies schema changes in order. Watch the migration service log to confirm migrations applied, and check release notes for any manual steps before upgrading major versions.

Upgrading to v0.10.0

v0.10.0 changes how secrets are handled, so it needs three values in .env before you upgrade. Everything else is automatic.
1

Back up PostgreSQL

Adjust the user and database if you changed POSTGRES_USERNAME or POSTGRES_DB. Keep this backup: on its first successful start, v0.10.0 re-encrypts stored credentials in a format v0.9 cannot read, so restoring the backup is the only way back.
2

Set ENCRYPTION_KEYS

Check which key your stored credentials currently use:
Generate the new key with openssl rand -base64 32 and back it up.
3

Set BETTER_AUTH_SECRET and BASE_URL

Set BETTER_AUTH_SECRET to another openssl rand -base64 32 value, and BASE_URL to the public URL of the console if the stack is reachable from outside (leave it empty on localhost).
4

Update

If a required value is missing, core-api stops at once with a message naming it — before it touches any data — so set it and start again.
5

Check the core-api log

Expect “Re-encrypted with the active key …” followed by “Every stored secret now uses the active key”. If you added a new key after an old one, you can remove the old one now.
What users notice after the upgrade:
  • Everyone signs in again once — sessions were signed with the old default secret.
  • Public sign-up is closed by default — an admin can open it from Authentication once a mail server is set up. Accounts that sign up confirm their email and wait for an admin to approve them.
  • API clients send the workspace in the X-Workspace-Id header — a workspaceId query parameter is no longer accepted.
  • The first page load opens the first workspace, because no selection has been stored yet.
Workers from v0.9.x keep working; update them with the rest of the stack as usual.

Storage considerations

rustfs is the stack’s S3-compatible object store, reachable by the API at http://rustfs:9000 (internal). core-api writes scan artifacts there; they are stored in the rustfs-data volume. Losing it loses enrichment data, but the inventory itself survives; artifacts can be regenerated by rescanning. All other services are stateless or rebuildable, so the stack can be recreated from the compose files without data loss.

Encryption keys

OASM encrypts the credentials it stores — integration tokens, LLM and search API keys, tool secrets, and the mail server password. Each workspace has its own data key, and the keys in ENCRYPTION_KEYS protect those data keys.
  • ENCRYPTION_KEYS is a comma-separated list. The last key encrypts; earlier keys only decrypt.
  • core-api refuses to start unless the last key is random and at least 32 characters. Earlier keys may be anything.
  • Back the keys up outside the host. Losing every key makes the stored credentials unrecoverable; the database backup alone is not enough.

Rotate a key

1

Add the new key at the end

2

Restart core-api

On start, core-api re-encrypts every stored credential with the new key.
3

Remove the old key once the log allows it

When the log says “Every stored secret now uses the active key; earlier ENCRYPTION_KEYS entries are no longer needed”, the old key can go.
If the log reports “stored secret(s) could not be decrypted with ENCRYPTION_KEYS”, keep every key you have: those values are left untouched until a key in the list can open them.

Environment variables reference

All variables below come from the .env.example shipped with oasm-docker; defaults are shown.

Production checklist

Before exposing a deployment beyond your network, verify each item:
  • ENCRYPTION_KEYS and BETTER_AUTH_SECRET generated with openssl rand -base64 32, and ENCRYPTION_KEYS backed up outside the host
  • BASE_URL set to the public URL of the console
  • Default secrets replaced: OASM_CLOUD_APIKEY, POSTGRES_PASSWORD, REDIS_PASSWORD (mirrored in REDIS_URL), RUSTFS_ACCESS_KEY, RUSTFS_SECRET_KEY
  • IMAGE_TAG pinned to a specific release instead of latest
  • TLS termination configured in front of 6276
  • Postgres backups scheduled and a restore tested once
  • Upgrade path rehearsed with make update
  • docker compose ps shows every service up and the API health endpoint responds

Best practices

  • Secrets management — keep credentials in an environment file or secret manager, never commit them. Rotate the database and Redis passwords on a schedule and whenever access may have leaked.
  • TLS termination — terminate TLS at a reverse proxy (for example nginx, Caddy, or a load balancer) in front of the console on 6276. The compose stack does not serve HTTPS by itself.
  • Back up PostgreSQL — schedule regular backups of the pgdata volume. It holds assets, scan results, vulnerabilities, and system state — the rest of the stack can be rebuilt, the data cannot. Test a restore into a scratch environment periodically; an untested backup is a guess. Store encrypted backups off the host.
  • Upgrades — upgrade with make update (or make update-main to refresh images without pulling a new commit). Migrations apply automatically before the API starts; check release notes for manual steps before major versions.
  • Log retention — keep compose logs long enough to diagnose failed jobs. A failed scan is only debuggable while its worker and API logs still exist.

Quickstart

Create the first admin and workspace, and run your first discovery

Developer guide

Run and develop the platform from the source tree

Architecture

Understand the distributed system you are deploying

Troubleshooting

Resolve common deployment and runtime issues