- Decentralization Manager
- Get started
- Run locally
Run locally
What you will do
Section titled “What you will do”- Check out a release tag.
- Generate the frontend types.
- Create a data directory and a
.envfile. - Start one Decentralization Manager node.
- Open the operator UI and check the node.
This guide starts one node. A Decentralized Party needs other nodes. Run a second node on the same host explains the ports that each extra node needs.
1. Check out the source
Section titled “1. Check out the source”git clone https://github.com/DLC-link/decentralization-manager.gitcd decentralization-managergit checkout <release-tag>Release tags have the form v<version>. The build fetches its Git dependencies over HTTPS from public repositories. It needs no SSH key.
2. Generate the frontend types
Section titled “2. Generate the frontend types”The frontend imports TypeScript types that the gen-types binary generates from the Rust code. The repository does not track the generated file. A fresh checkout therefore does not build without this step:
DECMAN_SKIP_FRONTEND=1 cargo run -p decman --features typegen --bin gen-typesThe command writes crates/decman/frontend/src/types.generated.ts. Run it again after you check out a different commit. If you installed just, just gen-types runs the same command.
3. Prepare a data directory
Section titled “3. Prepare a data directory”mkdir -p ./development/participant-1The node reads an optional .env file from the -d or --dir directory. Without -d, the node reads .env from the working directory. The file belongs at the root of the -d directory, not in its data/ subdirectory.
4. Choose an authentication path
Section titled “4. Choose an authentication path”Option A: insecure mode, for local development only
Section titled “Option A: insecure mode, for local development only”Use this path only against a Canton participant that uses unsafe shared-secret (HS256) authentication. Insecure mode starts only on devnet. The network defaults to devnet when DECPM_CANTON_NETWORK is unset.
Create ./development/participant-1/.env:
DECPM_PORT=8081DECPM_NOISE_PORT=9001DECPM_PUBLIC_ADDRESS=127.0.0.1DECPM_CANTON_ADMIN_HOST=localhostDECPM_CANTON_ADMIN_PORT=5002DECPM_CANTON_LEDGER_HOST=localhostDECPM_CANTON_LEDGER_PORT=5001DECPM_CANTON_SYNCHRONIZER=globalDECPM_CANTON_NETWORK=devnetDECPM_LOG_FORMAT=textThe node signs its Canton token with these defaults:
| Variable | Default | Must match on the Canton participant |
|---|---|---|
DECPM_CANTON_HMAC_SECRET | unsafe | The unsafe auth-service secret |
DECPM_CANTON_HMAC_AUDIENCE | https://canton.network.global | The target audience |
DECPM_CANTON_HMAC_SUBJECT | ledger-api-user | The Ledger API user |
Add these variables to .env only when your participant uses other values.
Start the node with --insecure:
cargo run -p decman --bin dec-party-manager -- -d ./development/participant-1 serve --insecureOption B: an identity provider
Section titled “Option B: an identity provider”Use the same .env file, and add the settings of one identity provider:
# KeycloakDECPM_KEYCLOAK_URL=https://<your-keycloak-host>DECPM_KEYCLOAK_REALM=<your-realm>DECPM_KEYCLOAK_CLIENT_ID=<frontend-client-id>
# Or Auth0# DECPM_AUTH0_DOMAIN=<your-tenant-domain># DECPM_AUTH0_CLIENT_ID=<spa-client-id># DECPM_AUTH0_AUDIENCE=<api-identifier>Start the node without --insecure:
cargo run -p decman --bin dec-party-manager -- -d ./development/participant-1 serveFor a release build:
cargo build --release -p decman./target/release/dec-party-manager -d ./development/participant-1 serveAuthentication and operator roles explains the identity-provider clients. Do not put production credentials in .env, and do not commit the file.
5. Open the operator UI and check the node
Section titled “5. Open the operator UI and check the node”Open http://localhost:8081. Complete the login when the node uses an identity provider.
Check the HTTP listener and the metrics listener:
curl -s http://localhost:8081/healthzcurl -s http://localhost:9464/metrics | headThe first command returns {"status":"ok"}.
Expected result
Section titled “Expected result”The node does these steps on a successful start:
- It reads
.envfrom the-ddirectory, or from the working directory. - It reads its participant ID from the Canton Admin API. If the Admin API is unreachable, the process exits with an error.
- It creates or opens the SQLite database and runs the database migrations.
- It generates a Noise key on the first start, or loads the existing key.
- It starts the metrics listener, the Noise listener and the HTTP listener.
The log shows Serving metrics on, Noise listener started on and Starting HTTP server on. In insecure mode, the log also shows INSECURE MODE ENABLED.
Verify persistent files
Section titled “Verify persistent files”The data directory holds the node state under data/:
participant-1/├── .env└── data/ ├── noise.key Noise identity of the node └── decpm.db SQLite database: peers, party credentials, workflow stateRestart the process with the same data directory. Confirm that the Noise public key stays the same. Do not delete or replace noise.key after peers register it.
Run a second node on the same host
Section titled “Run a second node on the same host”Each node opens three listeners: HTTP, Noise and metrics. Two nodes on one host need different values for all three. Each node also needs its own data directory and its own Canton participant.
Create ./development/participant-2/.env:
DECPM_PORT=8082DECPM_NOISE_PORT=9002DECPM_METRICS_PORT=9465DECPM_PUBLIC_ADDRESS=127.0.0.1DECPM_CANTON_ADMIN_HOST=localhostDECPM_CANTON_ADMIN_PORT=5012DECPM_CANTON_LEDGER_HOST=localhostDECPM_CANTON_LEDGER_PORT=5011DECPM_CANTON_SYNCHRONIZER=globalDECPM_CANTON_NETWORK=devnetDECPM_LOG_FORMAT=textReplace the Canton ports with the ports of your second participant. Start the node with -d ./development/participant-2.
The metrics port defaults to 9464 on every node. The listeners react differently to a port that is already in use:
| Listener | Variable | Result of a port collision |
|---|---|---|
| HTTP | DECPM_PORT | The process exits. |
| Noise | DECPM_NOISE_PORT | The node logs Failed to bind Noise listener and retries every 5 seconds. |
| Metrics | DECPM_METRICS_PORT | The node logs binding the metrics port failed; this node reports no metrics. It keeps running without metrics. |
Set DECPM_METRICS_PORT to a free port on every extra node. Set it to 0 to turn off metrics on that node. A metrics port that equals the HTTP port or the Noise port of the same node gives the error metrics_port collides with another listener.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Likely check |
|---|---|
The frontend build fails with Cannot find module './types.generated' | Run the type generation in step 2. |
cargo run says that it could not determine which binary to run | Add --bin dec-party-manager. |
unexpected argument '-d' found | Put -d before serve. |
The process exits with nothing accepts TCP connections there | The Admin API is down, or its host or port is wrong. |
Every Canton call fails with transport error or BrokenPipe | The TLS setting does not match the endpoint. Set DECPM_CANTON_ADMIN_TLS or DECPM_CANTON_LEDGER_TLS to true or false. |
The process exits with only permitted on the devnet network | Insecure mode starts only on devnet. Set DECPM_CANTON_NETWORK=devnet. |
| The UI does not open | Check DECPM_PORT, the process log and the local firewall. |
| Login fails | Check the provider URL, realm or audience, public client, redirect URI, web origin, PKCE and token claims. |
/metrics does not answer on a second node | Set a distinct DECPM_METRICS_PORT. |
| Peers cannot connect later | Check the Noise port, DECPM_PUBLIC_ADDRESS, the peer record and the Noise public key. |
| State disappears after restart | Use the same -d directory, and keep it writable. |
Next steps
Section titled “Next steps”- Connect peers.
- Create a Decentralized Party.
- Complete your first governance action.
- Move to Production deployment after you understand the local workflow.
Technical sources
Section titled “Technical sources”- Repository README
- Operator guide
- Command-line flags
- Startup and
.envloading - Server startup and listeners
- Network defaults
- Frontend build script
justfile- Participant
.envtemplate
Related pages
Section titled “Related pages”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: