> For the complete documentation index, see [llms.txt](https://docs.viction.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.viction.xyz/masternode/run-a-full-node/docker.md).

# Docker

To achieve that, you just need to run our `tomochain/node` docker image.

This image runs the [Viction go client](https://github.com/BuildOnViction/tomochain) with some automation added on top.

### Tags <a href="#tags" id="tags"></a>

| Environment | Tag        |
| ----------- | ---------- |
| Testnet     | `:testnet` |
| Mainnet     | `:stable`  |

### Environment variables <a href="#environment-variables" id="environment-variables"></a>

| Variable        | Required | Default         | Example                                    | Description                                                                                                        |
| --------------- | -------- | --------------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
| `IDENTITY`      | False    | Random name     | `my-super-node`                            | The name of your asternode                                                                                         |
| `PASSWORD`      | False    | Random password | `S5G@fS3A8+*g-)ftYc`                       | The password used by the the client to localy encrypt its account                                                  |
| `PRIVATE_KEY`   | False    | Random account  | `0xa3f5195...`                             | The private key of the account who will identify the node and receive txs fees                                     |
| `BOOTNODES`     | True     | None            | `enode://4d3...@1.2.3.4:30301,enode://...` | The comma separated list of bootnodes. Find them [here](/general/network-information/viction-mainnet.md#bootnodes) |
| `VERBOSITY`     | False    | 3               | `4`                                        | The level of logging (default one should be enough)                                                                |
| `NETWORK_ID`    | False    | 89              | `88`                                       | The network id of the join your node is joining. Find them [here](https://docs.viction.xyz/general/networks/)      |
| `WS_SECRET`     | False    | None            | `d$M4J4\5gLAz%Zjn>%`                       | The password to send data to the stats website                                                                     |
| `NETSTATS_HOST` | False    | netstats-server | `https://stats.tomochain.com`              | The stats website to report to, regarding to your environment                                                      |
| `NETSTATS_PORT` | False    | 3000            | `443`                                      | The port used by the stats website (usually 443)                                                                   |
| `ANNOUNCE_TXS`  | False    | None            | `True`                                     | Enable reporting transactions via RPC/WS                                                                           |

### Ports <a href="#ports" id="ports"></a>

| Exposed | Protocol | Description             |
| ------- | -------- | ----------------------- |
| `30303` | tcp      | Viction client p2p port |
| `30303` | udp      | Viction client p2p port |
| `8545`  | tcp      | Blockchain RPC          |
| `8546`  | tcp      | Blockchain WS           |

### Filesystem <a href="#filesystem" id="filesystem"></a>

| Path                | Content   |
| ------------------- | --------- |
| `/tomochain/data`   | Chaindata |
| `/Viction/keystore` | Accounts  |

### Examples <a href="#examples" id="examples"></a>

`docker run`

```
docker run -d --name masternode \
  -e IDENTITY=$MASTERNODE_NAME \
  -e PRIVATE_KEY=$MASTERNODE_PK \
  -e BOOTNODES=$BOOTNODES \
  -e NETSTATS_HOST=stats.viction.xyz \
  -e NETSTATS_PORT=443 \
  -e WS_SECRET=$STATS_WS_SECRET \
  -p 30303:30303 \
  -p 30303:30303/udp \
  -v chaindata:/tomochain/data \
  Viction/node:stable
```

`docker-compose.yml`

```
version: "3.4"
services:
  masternode:
    image: tomochain/node:stable
    environment:
      IDENTITY: $MASTERNODE_NAME
      PRIVATE_KEY: $MASTERNODE_PK
      BOOTNODES: $BOOTNODES
      NETSTATS_HOST: stats.viction.xyz
      NETSTATS_PORT: 443
      WS_SECRET: $STATS_WS_SECRET
    ports:
      - 30303:30303
      - 30303:30303/udp
    volumes:
      - chaindata:/tomochain/data
```


---

# 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.viction.xyz/masternode/run-a-full-node/docker.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.
