Updating from an old container
Since v2.0.7, the Docker container no longer uses the root user by default and therefore old setups may break. You can either force the old behaviour by adding the
--user rootflag to
docker run, or make sure to change your config and data directories to ones accessible by the
parityuser (uid 1000) within the docker container or before adding the directories as volumes to docker.
Build and run Parity Ethereum anywhere with Docker:
Docker containers for Parity Ethereum are available via Docker Hub:
$ docker search parity/parity NAME DESCRIPTION STARS OFFICIAL AUTOMATED parity/parity Parity is Ethcore's initial fully-featured... 0 parity/rust Rust stable, beta and nightly for GitLab C... 0 [OK] parity/snapcraft Docker image for build snap application (U... 0 [OK] parity/rust-arm RUST for GitLab CI runner (ARM architecture) 0 [OK]
To get a list of available versions, use
$ curl -sS 'https://registry.hub.docker.com/v2/repositories/parity/parity/tags/' | jq '."results"["name"]' | sort "beta" "nightly" "stable" "v2.0.6" "v2.0.7" "v2.0.8" "v2.1.2" "v2.1.3" "v2.1.4" "v2.2.0-rc6"
To get the latest beta release, run:
$ docker pull parity/parity:v2.1.3
To run Parity Ethereum with an interactive pseudo-tty shell, run:
$ docker run -ti parity/parity:v2.1.3
Parity can be configured using either the CLI options or a config file. Should the CLI flags and the config file disagree about a setting, the CLI takes precedence. You can list all CLI options by running:
$ docker run parity/parity:v2.1.3 --help
For Docker specific options, please refer to the Docker documentation, or run
docker --help or
docker run --help.
To publish Parity Ethereum’s ports to the host machine, use the
$ docker run -ti -p 8545:8545 -p 8546:8546 -p 30303:30303 -p 30303:30303/udp parity/parity:v2.1.3 --ui-interface all --jsonrpc-interface all
For example, this will expose the HTTP and WebSockets JSONRPC APIs, and the listen port to the host. Now you can send RPC calls from the Docker host computer.
To enable external discovery (for example for PoA sealing nodes), specify the external IP by appending the flag
--nat extip:126.96.36.199, where
188.8.131.52 is to be replaced by your actual external IP of the host.
To pass further operating options to Parity Ethereum, simply append them to the
docker run command:
$ docker run -ti parity/parity:v2.1.3 --no-ui --no-dapps --no-discovery
In this case, it disables the Wallet, the DApps Server, and discovery.
For more complex node configurations, a TOML config file can be created and attached to the docker container.
$ mkdir -p ~/.local/share/io.parity.ethereum/docker/ $ touch ~/.local/share/io.parity.ethereum/docker/config.toml
You can use the Config File Generator to configure your Parity Ethereum node and save it on your host’s disk, i.e., at
~/.local/share/io.parity.ethereum/docker/config.toml. To mount the configuration, use the
docker run -v option:
$ docker run -ti -v ~/.local/share/io.parity.ethereum/docker/:/home/parity/.local/share/io.parity.ethereum/ parity/parity:v2.1.3 --config /home/parity/.local/share/io.parity.ethereum/config.toml
This will mount
~/.local/share/io.parity.ethereum/docker/ of the host machine at
/home/parity/.local/share/io.parity.ethereum/ inside the docker container. Therefore, the config file will be available via
In case you need to persist the blockchain files, keys etc., you should run the image with the
--base-path option and then mount it, e.g.:
$ docker run -ti -v ~/.local/share/io.parity.ethereum/docker/:/home/parity/.local/share/io.parity.ethereum/ parity/parity:v2.1.3 --base-path /home/parity/.local/share/io.parity.ethereum/
This will expose the whole data dir to the host machine at
Windows machines don’t support unix permissions, which means you will likely experience errors when mounting a local volume as a non-root user. One workaround for this is to create a volume using:
docker volume create --driver=local --opt o=uid=1000 --opt type=tmpfs --opt device=tmpfs paritydb
This ensures that the volume has the correct permissions to give the
parity user access to it.
Your can then mount the volume with:
$ docker run -ti -v paritydb:/home/parity/.local/share/io.parity.ethereum/ parity/parity:v2.1.3 --base-path /home/parity/.local/share/io.parity.ethereum/
To run a detached Parity Ethereum instance, use
docker run -d:
$ docker run -d parity/parity:v2.1.3 245f312f3f39ad0a518091b1ee4cdc0c1f6d74fb9609395ed3fdcf43acae4b62
It will run Parity Ethereum in background.
docker ps shows the instance:
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 245f312f3f39 parity/parity:v2.1.3 "/parity/parity" 7 seconds ago Up 6 seconds 8080/tcp, 8180/tcp, 8545/tcp epic_pike
To attach the container, use
$ docker attach --sig-proxy=false 245f312f3f39
Disabling the signal proxy allows to detach again with
A Parity Ethereum deployment script generator is available at paritytech/parity-deploy. It uses
docker-compose. On Ubuntu systems these will automatically be installed if not already present on the system.
Some examples of using the script are:
A single node instant seal node, accessible via Parity UI:
$ ./parity-deploy.sh --name testchain --config instantseal
A three node proof of authority chain (using the Aura consensus algorithm) with one client accessible via Parity UI:
$ ./parity-deploy.sh --name testchain --config aura --nodes 3
Once the configuration is created you just need to run the docker-compose command to launch the machine or machines. This can be done via:
$ docker-compose up -d
You will then be able to see the logs by running:
$ docker-compose logs -f
In these logs you should see a token being generated to login to Parity Ethereum. Alternatively you can run the command:
$ docker-compose logs | grep token
Once you are logged into the web interface if you go to Add Accounts, then select the option recovery phrase and enter the account recovery phrase as password. You now have an account with lots of ether to send around.
You can also include extra nodes (e.g. ethstats monitoring) by including the docker-compose configuration in
include/docker-compose.yml. To add Ethstats monitoring you would need to include this in the file:
monitor: image: buythewhale/ethstats_monitor volumes: - ./monitor/app.json:/home/ethnetintel/eth-net-intelligence-api/app.json:ro dashboard: image: buythewhale/ethstats volumes: - ./dashboard/ws_secret.json:/eth-netstats/ws_secret.json:ro ports: - 3001:3000