# Install the toolchain

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

This guide covers the installation of core dependencies for developing decentralized applications (DApps) on Midnight.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

Before you begin developing DApps on Midnight, ensure you have:

* Google Chrome browser
* Visual Studio Code
* Docker Desktop: <https://www.docker.com/products/docker-desktop/>

Development is supported on Linux and Mac. Windows is not supported natively at this time, if you are using Windows, development through WSL is recommended.

## Install Compact[​](#install-compact "Direct link to Install Compact")

[Compact](https://github.com/midnightntwrk/compact) is Midnight's dedicated smart contract language for creating DApps that allows developers to control the level of data protection in their applications.

Use the following command to install the pre-built binaries:

```
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/midnightntwrk/compact/releases/latest/download/compact-installer.sh | sh
```

### Update your shell PATH[​](#update-your-shell-path "Direct link to Update your shell PATH")

The installer script automatically adds Compact to your shell's `PATH`. However, you need to restart your terminal or reload your shell configuration for the changes to take effect.

To reload your shell configuration without restarting, run the following command:

```
source ~/.zshrc # for zsh

# or

source ~/.bashrc # for bash
```

**Manual PATH configuration** (only if needed): If Compact is not found after restarting, manually add it to your PATH:

```
export PATH="$HOME/.local/bin:$PATH"
```

Then reload your shell configuration as shown above.

### Update the compiler version[​](#update-the-compiler-version "Direct link to Update the compiler version")

Install the toolchain version listed for your target network in the [compatibility matrix](https://docs.midnight.network/relnotes/support-matrix.md), for example:

```
compact update 0.36.0
```

Replace the version with the one in the matrix. The command downloads that version of the Compact compiler and sets it as the default. A bare `compact update` installs the newest published release, which can target a ledger version that is not yet deployed on the public networks, so pin the version explicitly unless you are working against a pre-release network.

Every public network runs ledger 9

Since the ledger 9 network upgrade on 6 November 2026, Mainnet uses Compact toolchain 0.36.0 (language version 0.28.0, Compact runtime 0.21.0) and proof server 9.0.0. Preview relaunched on ledger 9 on 7 November 2026, and Preprod moved to ledger 9 on 9 November 2026. Both use the same versions as Mainnet, and so do the commands on this page. See [Ledger 9 upgrade](https://docs.midnight.network/relnotes/ledger-9.md).

### Verify the Compact installation[​](#verify-the-compact-installation "Direct link to Verify the Compact installation")

Run these commands to verify your installation:

```
compact --version # print the version of Compact

compact compile --version # print the version of the compiler

which compact     # print the installation path
```

**Verification**: These commands return the Compact version number, the compiler version number, and the installation path.

## Set up the proof server[​](#set-up-the-proof-server "Direct link to Set up the proof server")

The proof server is required to generate zero-knowledge proofs for transactions locally. This section walks you through the process of running the proof server.

### Docker Desktop[​](#docker-desktop "Direct link to Docker Desktop")

The proof server runs as a background service using Docker. Ensure the Docker engine is running for the following step.

### Run the proof server[​](#run-the-proof-server "Direct link to Run the proof server")

Use the following command to start the proof server in your terminal:

```
docker run -p 6300:6300 -e MIDNIGHT_PROOF_SERVER_VERBOSE=true midnightntwrk/proof-server:9.0.0
```

This command occupies the terminal window while running. The `MIDNIGHT_PROOF_SERVER_VERBOSE=true` setting turns on debug logs, which show the reason when the proof server rejects a request.

**Verification**: The terminal displays logs indicating the server is running and listening at <http://localhost:6300>.

note

To use a local proof-server with the Lace Midnight wallet, go to **Settings » Midnight** and select `Local (http://localhost:6300)`. The local proof server is currently the only option supported within Lace.

## Install the Compact VS Code extension[​](#install-the-compact-vs-code-extension "Direct link to Install the Compact VS Code extension")

The Compact VS Code extension provides helpful syntax highlighting and code snippet completion. To install it, follow these steps:

1

Download the [VSIX package](https://raw.githubusercontent.com/midnight-ntwrk/releases/gh-pages/artifacts/vscode-extension/compact-0.2.13/compact-0.2.13.vsix).

2

In VS Code, go to **Extensions**, then **Install from VSIX** and select the extension file.

**Verification**: You now see the Compact Language Support extension in your installed VS Code extensions.

## Install Complete[​](#install-complete "Direct link to Install Complete")

Your development environment is now configured. You are ready to start building and interacting with privacy-preserving applications on Midnight.

In order to deploy and interact with Midnight DApps, both a Midnight Node and Indexer are required. These are provided as RPC endpoints and can be found in the [Latest Stable Release](https://docs.midnight.network/relnotes/overview.md#environments). Subsequent Tutorials will demonstrate their use, alternatively, the [Examples](https://docs.midnight.network/category/examples) section provides complete DApp demonstrations.

## Troubleshoot[​](#troubleshoot "Direct link to Troubleshoot")

If your shell can't find the `compact` command, Docker isn't running, or port 6300 is already in use, see [Troubleshoot installation problems](https://docs.midnight.network/troubleshoot/installation-problems.md).

## Next steps[​](#next-steps "Direct link to Next steps")

Now that your development environment is set up, you can:

* [Create your first Midnight contract](https://docs.midnight.network/getting-started/hello-world.md)
* [Explore the Compact language](https://docs.midnight.network/compact.md)
