- Decentralization Manager
- Get started
- Run with Docker
Run with Docker
Outcome
Section titled “Outcome”Run one Decentralization Manager node in a container with persistent state. Connect the node to Canton, and confirm that its identity survives a restart. You can then run a three-node mesh with Docker Compose.
This guide is for development. Production deployment covers orchestration, TLS, secrets, backups, monitoring and upgrades.
Before you begin
Section titled “Before you begin”- Docker Engine with BuildKit. The mesh also needs Docker Compose v2.
- Reachable Canton Admin and Ledger APIs.
- An identity provider for the operator UI: Keycloak or Auth0.
- A writable host directory for the node state.
The operator UI needs a configured identity provider. Without one, the API rejects every request except the first PUT /party-config on a fresh node. The UI then cannot load data. Local development has one exception. --insecure replaces the identity provider on devnet, against a participant with unsafe shared-secret authentication.
1. Choose an image
Section titled “1. Choose an image”| Image | Source | Runs as | DECPM_DIR | Mount the host directory at |
|---|---|---|---|---|
public.ecr.aws/dlc-link/decentralization-manager:<tag> | Release | uid 0 | / | /data |
public.ecr.aws/dlc-link/decentralization-manager:<tag>-nonroot | Release | uid 65532 | /home/nonroot | /home/nonroot/data |
dec-party-manager:dev | Built from development/Dockerfile | uid 0 | / | /data |
The node writes its state to $DECPM_DIR/data. Mount the host directory there. If you mount it at another path, the state stays inside the container. The state then disappears when you remove the container.
The release images are linux/amd64 images. Release tags have the form v<version>. Pull a release image:
docker pull public.ecr.aws/dlc-link/decentralization-manager:<tag>-nonrootTo build the development image from source instead:
git clone https://github.com/DLC-link/decentralization-manager.gitcd decentralization-managergit checkout <release-tag>
docker build --platform linux/amd64 -f development/Dockerfile -t dec-party-manager:dev .The development Dockerfile copies x86-64 system libraries into its runtime stage. Keep --platform linux/amd64 on an Arm host. The build fetches its Git dependencies over HTTPS from public repositories. It needs no SSH key.
2. Prepare persistent state
Section titled “2. Prepare persistent state”mkdir -p ./docker-node/dataFor the -nonroot image, give the directory to uid 65532:
sudo chown -R 65532:65532 ./docker-node/dataThe chown must be recursive. A directory that a root image wrote holds root-owned files, for example the mode-0600 Noise key. Uid 65532 cannot open those files.
After the first start, the mounted directory holds:
noise.key Noise identity of the nodedecpm.db SQLite database: peers, party credentials, workflow stateA new noise.key changes the peer identity. A deleted decpm.db removes the local peers, party credentials and workflow state.
3. Configure the container
Section titled “3. Configure the container”Create ./docker-node/node.env:
DECPM_PUBLIC_ADDRESS=<address-that-peers-dial>DECPM_CANTON_ADMIN_HOST=host.docker.internalDECPM_CANTON_ADMIN_PORT=5002DECPM_CANTON_LEDGER_HOST=host.docker.internalDECPM_CANTON_LEDGER_PORT=5001DECPM_CANTON_SYNCHRONIZER=globalDECPM_CANTON_NETWORK=devnetDECPM_KEYCLOAK_URL=https://<your-keycloak-host>DECPM_KEYCLOAK_REALM=<your-realm>DECPM_KEYCLOAK_CLIENT_ID=<frontend-client-id>host.docker.internalreaches Canton APIs on the Docker host. Use the participant host name when Canton runs elsewhere.- Replace the three Keycloak variables with
DECPM_AUTH0_DOMAIN,DECPM_AUTH0_CLIENT_IDandDECPM_AUTH0_AUDIENCEfor Auth0. - Add the Canton TLS variables when the participant serves TLS. Configuration reference lists them.
- Write the values without quotes. Docker
--env-filekeeps quotes as part of the value.
Pass settings with --env-file or -e. The image entrypoint passes no -d flag. The node therefore reads .env from its working directory. DECPM_DIR does not choose the .env location. The data mount does not cover the working directory. Do not store production credentials in the env file, and do not commit it.
4. Start one container
Section titled “4. Start one container”For the -nonroot release image:
docker run -d \ --name dec-party-manager \ --restart unless-stopped \ --env-file ./docker-node/node.env \ --add-host host.docker.internal:host-gateway \ -p 8080:8080 \ -p 9000:9000 \ -v "$(pwd)/docker-node/data:/home/nonroot/data" \ public.ecr.aws/dlc-link/decentralization-manager:<tag>-nonrootFor the root image or the development image, mount the directory at /data instead.
The HTTP port serves the operator UI. Expose the Noise port only to the intended peers. The command does not publish the metrics port 9464. The metrics listener has no authentication and binds to DECPM_HOST. To read metrics from the host, publish the port on the loopback address only: -p 127.0.0.1:9464:9464.
For insecure mode on devnet, leave out the identity-provider variables and add --insecure after the image name:
docker run -d \ --name dec-party-manager \ --env-file ./docker-node/node.env \ --add-host host.docker.internal:host-gateway \ -p 8080:8080 \ -p 9000:9000 \ -v "$(pwd)/docker-node/data:/home/nonroot/data" \ public.ecr.aws/dlc-link/decentralization-manager:<tag>-nonroot --insecureThe image entrypoint is dec-party-manager serve. Docker therefore passes --insecure to serve.
5. Verify startup and persistence
Section titled “5. Verify startup and persistence”docker ps --filter name=dec-party-managerdocker logs --tail 100 dec-party-managercurl -s http://localhost:8080/healthzls -la ./docker-node/data
docker restart dec-party-managerdocker logs --tail 100 dec-party-managerls -la ./docker-node/dataConfirm that:
/healthzreturns{"status":"ok"}.- The log shows
Noise listener started onandStarting HTTP server on. - The operator UI opens and uses the configured identity provider.
- The same
noise.keyanddecpm.dbremain after the restart. - The logs do not expose credentials or tokens.
The log is JSON by default. Add DECPM_LOG_FORMAT=text to the env file for the console format.
Run a three-node mesh with Docker Compose
Section titled “Run a three-node mesh with Docker Compose”development/docker-compose.yml starts three nodes from the development Dockerfile. Each node connects to its own Canton participant.
Copy the three environment templates:
Terminal window for n in 1 2 3; docp development/remote/participant-$n/.env.example development/remote/participant-$n/.envdoneEdit each
.envfile. Set the network and the identity-provider values. For insecure mode ondevnet, remove the#in front ofDECPM_INSECURE=trueinstead. The template also holdsDECPM_KEYCLOAK_USERNAME,DECPM_KEYCLOAK_PASSWORDandP<n>_*values. Only the integration test runner reads them.Make the APIs of the three participants reachable on the Docker host:
Node Operator UI Noise port Ledger API on the host Admin API on the host participant-1http://localhost:8081900050015002participant-2http://localhost:8082900150115012participant-3http://localhost:8083900250215022Start an SSH agent, then start the stack:
Terminal window eval "$(ssh-agent -s)"cd developmentdocker compose up --buildThe Compose file forwards the SSH agent socket into the build. The build fails when
SSH_AUTH_SOCKis unset. The agent needs no key.
Compose sets these values for each service:
DECPM_CANTON_ADMIN_HOSTandDECPM_CANTON_LEDGER_HOSTbecomehost.docker.internal.DECPM_PUBLIC_ADDRESSbecomes the service name. Peers dialparticipant-1,participant-2andparticipant-3on the shared bridge network.DECPM_DIRbecomes/app. Each node keeps its state indevelopment/remote/participant-<n>/data.
The stack publishes only the HTTP ports. The metrics listener of each node stays inside its container. Treat the participant count and the ports as development values, not as a production architecture.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check |
|---|---|
| The development build fails on an Arm host | Add --platform linux/amd64. |
docker compose fails with invalid empty ssh agent socket | Start an SSH agent so that SSH_AUTH_SOCK is set. |
The container exits with nothing accepts TCP connections there | The Admin API is not reachable from the container. Check --add-host, the host name and the port. |
The -nonroot container fails on a directory that a root image wrote | Run sudo chown -R 65532:65532 on the host directory. |
Every Canton call fails with transport error or BrokenPipe | The TLS setting does not match the endpoint. Check DECPM_CANTON_ADMIN_TLS and DECPM_CANTON_LEDGER_TLS. |
The UI loads, but every request returns 401 | Configure the identity provider, or use --insecure on devnet. |
| Login redirects repeatedly | Check the provider origin, redirect URI, client ID, realm or audience, and PKCE. |
| The peer identity changes after a restart | Check that the mount path matches $DECPM_DIR/data for the image. |
Technical sources
Section titled “Technical sources”- Release Dockerfile
- Release workflow
- Development Dockerfile
- Development Compose file
- Participant
.envtemplate - Startup and
.envloading - Operator guide
- Deployment guide
- Authentication middleware
Next step
Section titled “Next step”Form the development mesh: Connect peers.
Ask the docs
Answers come only from this documentation and can be wrong. Check the linked pages.
Ask a question about BitSafe, CBTC or the developer guides. For example: