---
# System prepended metadata

title: How to setup a wasp access node (IotaEVM)

---

## 1. Clone Repository

```bash
git clone https://github.com/iotaledger/node-docker-setup
cd iota
```

## 2. Create DNS for your Server (needed for SSL)

## 3. Create Environment File

generate a password for hornet dashboard
```bash
docker compose run hornet tools pwd-hash
```

Create the `.env` and replace values with your own

```
COMPOSE_FILE=docker-compose.yml:docker-compose-https.yml

ACME_EMAIL=YOUR-EMAIL

NODE_HOST=YOUR-FQDN

HORNET_CONFIG_FILE=config.json

COMPOSE_PROFILES=monitoring,wasp

DASHBOARD_PASSWORD=YOUR_PW_HASH
DASHBOARD_SALT=YOUR_PW_SALT
```

## 4. Change in the `docker-compose.yml`:

```diff
--- a/iota/docker-compose.yml
+++ b/iota/docker-compose.yml
@@ -24,6 +24,7 @@ services:
     ports:
       - "15600:15600/tcp"
       - "14626:14626/udp"
+      - "127.0.0.1:14265:14265/tcp"
     labels:
       - "traefik.enable=true"
       - "traefik.http.routers.hornet.service=hornet"
@@ -304,7 +305,7 @@ services:
 
   wasp:
     container_name: wasp
     image: iotaledger/wasp:1.3
     stop_grace_period: 5m
     restart: unless-stopped
     depends_on:
@@ -322,6 +323,7 @@ services:
       - "traefik.http.middlewares.rewrite-wasp-api.stripprefix.prefixes=/wasp/api"
     ports:
       - "4000:4000/tcp" # Peering
+      - "127.0.0.1:9090:9090/tcp"
     volumes:
       - ./data/wasp:/app/waspdb
     command:
```

We expose Hornet and Wasp to the `localhost:14265` and `:9090` for easier administration with `wasp-cli`

## 5. Prepare Installation

This will create the data directories with the correct permissions

```bash
sudo ./prepare_docker.sh
```

## 6. Download the chain state

You can configure how much of the state you wish to keep on your node, using the following setting: `stateManager.pruningMinStatesToKeep`. The default value is `10000` blocks.

If you wish to run a non-archive node (only keep the last N blocks), you must add `snapshots.networkPaths` to your config:

Edit `docker-compose.yml`:
```diff
@@ -337,6 +339,7 @@ services:
       - "--wal.path=/app/waspdb/wal"
       - "--prometheus.enabled=true"
       - "--prometheus.bindAddress=wasp:9312"
+      - "--stateManager.pruningMinStatesToKeep=10000"
+      - "--snapshots.networkPaths=https://files.stardust-mainnet.iotaledger.net/?prefix=wasp_snapshots/iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5/"
     profiles:
       - wasp
```

---


If you wish to have a full archive node you need to set `stateManager.pruningMinStatesToKeep` to `0` and download the historical state.

Edit `docker-compose.yml`:
```diff
@@ -337,6 +339,7 @@ services:
       - "--wal.path=/app/waspdb/wal"
       - "--prometheus.enabled=true"
       - "--prometheus.bindAddress=wasp:9312"
+      - "--stateManager.pruningMinStatesToKeep=0"
     profiles:
       - wasp
```


download the historical state into the correct directory:

```bash
wget https://files.stardust-mainnet.iotaledger.net/dbs/wasp/latest-wasp_chains_wal.tgz -O - | tar xzv -C data/wasp
```
(this will take a while!)


NOTE: operating as a full archive node require a lot of disk space, we recomment at least 500Gb of free space for now, to operate without issues


## 7. Run Everything


```bash
docker compose up -d
```

It will take a few minutes until the hornet node is synced

You can check the sync status by following the logs with `docker logs -f hornet`, or in the web dashboard.


## 8. Download a Wasp-Cli fitting your Wasp Version

You can download and extract Wasp-Cli with:

```bash
# source: https://github.com/iotaledger/wasp/releases/
curl -sL https://github.com/iotaledger/wasp/releases/download/v1.3.0/wasp-cli_1.3.0_Linux_x86_64.tar.gz | tar xzv
```


## 10. Use Wasp-Cli to obtain peering info

`cd` into the newly-downloaded wasp-cli directory:
```bash
cd wasp-cli_1.3.0_Linux_x86_64/
```

Then:

```bash
# set L1 address
$ ./wasp-cli set l1.apiaddress http://localhost:14265

# set wasp address
$ ./wasp-cli wasp add my-node http://localhost:9090

# login
$ ./wasp-cli login
Username: wasp
Password: (default is wasp)
Successfully authenticated

# obtain peering info
$ ./wasp-cli peering info
PubKey: 0x20a56daa0b5e86b196c37f802089a2b6007a655a12337d287f7313a214af2ec0
PeeringURL: 0.0.0.0:4000
```


Please note the `PubKey: 0x20a56daa0b5e86b196c37f802089a2b6007a655a12337d287f7313a214af2ec0` output.

**Send it together with your Ipv4 to the IF.**


## 9. Wait for the other party to peer

... wait ...

## 10. Use wasp-cli to add nodes as peers


```bash
# trust peers
$ ./wasp-cli peering trust peer1 <pubkey> <URL>

$ ./wasp-cli peering trust peer2 <pubkey> <URL>

# add chain
$ ./wasp-cli chain add iota-evm iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5

# activate
$ ./wasp-cli chain activate --chain iota-evm

# add peers as access nodes of the chain
$ ./wasp-cli chain access-nodes add --peers=peer1,peer2
```

## 11. Check if Wasp synced

You can follow the progress by doing `docker logs -f wasp`. If you chose to create a full-archive node, this will take a long time (several minutes, maybe hours).
 
## 12. It's ready!

You should have a working EVM JSON-RPC endpoint on:
```
<NODE_HOST>/wasp/api/v1/chains/iota1pzt3mstq6khgc3tl0mwuzk3eqddkryqnpdxmk4nr25re2466uxwm28qqxu5
/evm
```
