Running on Docker

If you already use Docker, the easiest way to get your Nuts Node up and running for development or production is using Docker. This guide helps you to configure the Nuts node in Docker. To use the most recent master build use nutsfoundation/nuts-node:master (for production environments it’s advised to use a specific version or the latest build).

First determine the working directory for the Nuts node which will contain configuration and data. These which will be mounted into the Docker container. Follow the configuration to setup the configuration of your node.


Using this guide the following resources are mounted:

  • Readonly PEM file with TLS certificate and private key. They can be separate but in this example they’re contained in 1 file.

  • Readonly PEM file with TLS truststore for the particular network you’re connecting to.

  • Readonly nuts.yaml configuration file.

  • Data directory where data is stored.

Docker run

If you want to run without Docker Compose you can use the following command from the working directory:

docker run --name nuts -p 5555:5555 -p 1323:1323 \
  --mount type=bind,source="$(pwd)"/certificate-and-key.pem,target=/opt/nuts/certificate-and-key.pem,readonly \
  --mount type=bind,source="$(pwd)"/truststore.pem,target=/opt/nuts/truststore.pem,readonly \
  --mount type=bind,source="$(pwd)"/nuts.yaml,target=/opt/nuts/nuts.yaml,readonly \
  --mount type=bind,source="$(pwd)"/data,target=/opt/nuts/data \
  -e NUTS_CONFIGFILE=/opt/nuts/nuts.yaml \

This setup uses the following nuts.yaml configuration file:

strictmode: false
datadir: /opt/nuts/data
  truststorefile: /opt/nuts/truststore.pem
  certfile: /opt/nuts/certificate-and-key.pem
  certkeyfile: /opt/nuts/certificate-and-key.pem


The command above uses pwd and bash functions, which do not work on Windows. If running on Windows replace it with the path of the working directory.

You can test whether your Nuts Node is running properly by visiting http://localhost:1323/status/diagnostics. It should display diagnostic information about the state of the node.

Docker Compose

Copy the following YAML file and save it as docker-compose.yaml in the working directory.

version: "3.7"
    image: nutsfoundation/nuts-node:master
      NUTS_CONFIGFILE: /opt/nuts/nuts.yaml
      - 5555:5555
      - 1323:1323
      - "./certificate-and-key.pem:/opt/nuts/certificate-and-key.pem:ro"
      - "./truststore.pem:/opt/nuts/truststore.pem:ro"
      - "./nuts.yaml:/opt/nuts/nuts.yaml:ro"
      - "./data:/opt/nuts/data:rw"

Start the service:

docker compose up