> For the complete documentation index, see [llms.txt](https://docs.bitsafe.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitsafe.finance/decentralization-manager/get-started/run-locally.md).

# Run locally

[Decentralization Manager overview](/decentralization-manager/overview.md) · [Decentralization Manager prerequisites](/decentralization-manager/get-started/prerequisites.md)

### What you will do

1. Check out an approved repository tag.
2. Create a local data directory and configuration file.
3. Start one Decentralization Manager instance.
4. Open the web interface.
5. Verify persistent files and Canton connectivity.

This guide starts one node. Creating a Decentralized Party requires other participating nodes and is covered separately.

### 1. Check out the source

```bash
git clone <https://github.com/DLC-link/decentralization-manager.git>
cd decentralization-manager
git checkout <approved-release-tag>
```

Do not use a release candidate or `main` unless the environment owner explicitly approved it for testing.

### 2. Prepare a data directory

```bash
mkdir -p ./development/participant-1
```

Decentralization Manager loads an optional `.env` file from the directory passed through `--dir` or `DECPM_DIR`. The configuration file belongs at the directory root, not inside its `data/` subdirectory.

### 3. Add minimum development configuration

Create `./development/participant-1/.env` with placeholders for the selected environment:

```bash
DECPM_PORT=8081
DECPM_NOISE_PORT=9001
DECPM_CANTON_ADMIN_HOST=localhost
DECPM_CANTON_ADMIN_PORT=5002
DECPM_CANTON_LEDGER_HOST=localhost
DECPM_CANTON_LEDGER_PORT=5001
DECPM_CANTON_SYNCHRONIZER=global
DECPM_CANTON_NETWORK=devnet
```

Add the approved authentication settings for your environment. Do not place production credentials in this file or commit it to source control.

### 4. Start the application

```bash
cargo run -p decman -- -d ./development/participant-1 serve
```

For a release build:

```bash
cargo build --release -p decman
./target/release/dec-party-manager -d ./development/participant-1 serve
```

### 5. Open the interface

Open:

```
<http://localhost:8081>
```

Complete the configured identity-provider login where required.

### Expected result

A successful first start should:

* Serve the web interface on the configured HTTP port.
* Generate or load a persistent Noise identity.
* Create or open the SQLite operational database.
* Create the local DAR storage directory when needed.
* Attempt Canton Admin and Ledger API connections using the selected settings.
* Expose a clear error if authentication, TLS, or Canton connectivity is misconfigured.

### Verify persistent files

The selected data directory should contain application-managed state under `data/`, including the Noise key, SQLite database, and DAR storage as they are created.

Restart the process with the same data directory and confirm that its identity remains stable. Do not delete or replace the Noise key after peers have registered it.

### Development-only insecure mode

The repository includes an insecure mode for isolated development against a Canton participant configured with unsafe shared-secret authentication.

{% hint style="info" %}
Never enable insecure mode in a shared, externally reachable, staging, or production environment. It disables normal authentication boundaries and is not a shortcut for identity-provider setup.
{% endhint %}

### Troubleshooting

| Symptom                             | Likely check                                                                                            |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------- |
| Build cannot fetch `canton-lib`     | Confirm a GitHub-registered SSH key is available to the build path.                                     |
| UI does not open                    | Check the configured HTTP port, process logs, and local firewall.                                       |
| Login fails                         | Check provider URL, realm or audience, public client, redirect URI, web origin, PKCE, and token claims. |
| Every Canton call fails immediately | Check host, port, and whether the client TLS setting matches what the endpoint serves.                  |
| Peers cannot connect later          | Check the Noise port, public address, peer entry, and persistent public key.                            |
| State disappears after restart      | Confirm the same data directory is used and remains writable.                                           |

### Next steps

* Run a second and third development instance with separate ports and data directories.
* [Connect Decentralization Manager peers](/decentralization-manager/get-started/connect-peers.md).
* [Create a Decentralized Party](/decentralization-manager/get-started/create-a-decentralized-party.md).
* [Complete the first governance action](/decentralization-manager/get-started/complete-your-first-governance-action.md).
* Move to [Decentralization Manager production deployment](/decentralization-manager/get-started/production-deployment.md) only after the local workflow is understood.

### Technical sources

* [Repository README](https://github.com/DLC-link/decentralization-manager/blob/main/README.md)
* [Operator guide](https://github.com/DLC-link/decentralization-manager/blob/main/USER_GUIDE.md)
* [Development setup](https://github.com/DLC-link/decentralization-manager/tree/main/development)

### Related pages

* [Run Decentralization Manager with Docker](/decentralization-manager/get-started/run-with-docker.md)
* [Connect Decentralization Manager peers](/decentralization-manager/get-started/connect-peers.md)
* [Create a Decentralized Party](/decentralization-manager/get-started/create-a-decentralized-party.md)
* [Complete the first governance action](/decentralization-manager/get-started/complete-your-first-governance-action.md)
* [Decentralization Manager production deployment](/decentralization-manager/get-started/production-deployment.md)

### Next step

👉 **Form the mesh:** [Connect Decentralization Manager peers](/decentralization-manager/get-started/connect-peers.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.bitsafe.finance/decentralization-manager/get-started/run-locally.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
