Skip to main content

Configuration

Settings live in canton-deploy.config.js at the project root or a parent directory. Select a named network with --network.

Run:

dpm canton-deploy init

or copy canton-deploy.config.example.js.

If the nearest package.json contains "type": "module", use canton-deploy.config.cjs instead.

Example Configuration​

module.exports = {
defaultNetwork: 'localnet',

networks: {
localnet: {
host: 'localhost',
adminPort: 5002,
ledgerPort: 5001,
httpPort: 7575,
vetOnUpload: true,
excludePackages: ['./tests', 'my-app-tests'],
additionalDars: [],
parties: ['Alice', 'Bob'],
users: [{
userId: 'ledger-api-user',
parties: ['Alice', 'Bob'],
rights: ['CanActAs', 'CanReadAs'],
}],
},

devnet: {
host: 'validator.example.com',
adminPort: 5002,
ledgerPort: 5011,
httpPort: 8080,
token: process.env.DEVNET_JWT_TOKEN,
vetOnUpload: true,
parties: ['Operator'],
users: [{
userId: 'app-operator',
parties: ['Operator'],
rights: ['CanActAs', 'CanReadAs'],
}],
},
},
};

Configuration Keys​

KeyWhat it controls
hostValidator host or IP
adminPortAdmin gRPC port (default 5002)
ledgerPortLedger gRPC port (default 5001)
httpPortHTTP JSON API port (default 7575)
grpcAuthoritygRPC :authority for the Ledger API when a proxy routes on name
adminGrpcAuthoritySame for the Admin API
httpHostHTTP Host header for the JSON API
httpUseTlsUse https for JSON API calls
token / tokenFile / tokenCommandJWT source (see Authentication)
tls / tlsCertFileTLS for gRPC; optional CA file
synchronizerIdLogical synchronizer ID (namespace::fingerprint). Required when the participant has more than one synchronizer.
vetOnUploadVet during upload. Defaults on for localnet, off otherwise. Override with --vet / --no-vet.
additionalDarsExtra DAR paths uploaded before project DARs
includePackages / excludePackagesFilter packages from daml.yaml / multi-package.yaml
partiesDisplay names allocated on deploy (skipped if they already exist)
usersUsers created on deploy with CanActAs / CanReadAs for their parties
scriptUserId--user-id passed to dpm script (otherwise JWT sub)

Vendored DARs go in additionalDars or --dar. Data dependencies are not uploaded on their own.

DAR upload uses the Admin API, so adminPort must be reachable.

Configuration Precedence​

CLI flags override environment variables, which override the config file.

Authentication​

The JWT is resolved in this order:

  1. --token
  2. CANTON_DEPLOY_TOKEN
  3. config token
  4. config tokenCommand (a shell command whose stdout is the token)
  5. config tokenFile
  6. LocalNet development HMAC (network name localnet only)

Synchronizer ID​

When a participant has more than one synchronizer, synchronizerId is required.

Use the logical ID from status in the form:

namespace::fingerprint

Do not use a trailing ::NN-N suffix.