Skip to content

Commit ec42aa7

Browse files
fix Fuji Subnet RPC example
1 parent eadcde3 commit ec42aa7

File tree

1 file changed

+18
-16
lines changed

1 file changed

+18
-16
lines changed

README.md

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -154,24 +154,26 @@ mkdir -p ~/.avalanchego/staking; docker run -it -d \
154154
#### Fuji Subnet RPC
155155

156156
```bash
157-
const dockerCommand = (subnetID: string, chainID: string) => `mkdir -p ~/.avalanchego_rpc/staking; docker run -it -d \\
158-
--name rpc \\
159-
--network host \\
160-
-v ~/.avalanchego_rpc/:/home/avalanche/.avalanchego \\
161-
-e AVAGO_NETWORK_ID=fuji \\
162-
-e AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK=true \\
163-
-e AVAGO_TRACK_SUBNETS=REPLACE_THIS_WITH_YOUR_SUBNET_ID \\
164-
-e AVAGO_HTTP_PORT=8080 \\
165-
-e AVAGO_STAKING_PORT=9653 \\
166-
-e AVAGO_HTTP_ALLOWED_HOSTS="*" \\
167-
-e AVAGO_HTTP_HOST=0.0.0.0 \\
168-
-e AVAGO_PUBLIC_IP_RESOLUTION_SERVICE=ifconfigme \\
169-
-e AVAGO_PLUGIN_DIR=/avalanchego/build/plugins/ \\
170-
-e HOME=/home/avalanche \\
171-
--user $(id -u):$(id -g) \\
172-
avaplatform/subnet-evm:v0.7.1`;
157+
mkdir -p ~/.avalanchego_rpc/staking; docker run -it -d \
158+
--name rpc \
159+
--network host \
160+
-v ~/.avalanchego_rpc/:/home/avalanche/.avalanchego \
161+
-e AVAGO_NETWORK_ID=fuji \
162+
-e AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK=true \
163+
-e AVAGO_TRACK_SUBNETS=REPLACE_THIS_WITH_YOUR_SUBNET_ID \
164+
-e AVAGO_HTTP_PORT=8080 \
165+
-e AVAGO_STAKING_PORT=9653 \
166+
-e AVAGO_HTTP_ALLOWED_HOSTS="*" \
167+
-e AVAGO_HTTP_HOST=0.0.0.0 \
168+
-e AVAGO_PUBLIC_IP_RESOLUTION_SERVICE=ifconfigme \
169+
-e AVAGO_PLUGIN_DIR=/avalanchego/build/plugins/ \
170+
-e HOME=/home/avalanche \
171+
--user $(id -u):$(id -g) \
172+
avaplatform/subnet-evm:v0.7.1
173173
```
174174

175175
- `AVAGO_STAKING_PORT` is set to `9653` in case you want to run this on the same machine as the validator.
176176
- `AVAGO_HTTP_PORT` is set to `8080` instead of `9650` to avoid conflicts with the validator.
177177
- `AVAGO_HTTP_ALLOWED_HOSTS` and `AVAGO_HTTP_HOST` are required to allow the RPC server to be accessed from outside. You'll need to secure it with HTTPS; Caddy is recommended.
178+
179+
RPC example uses another folder `~/.avalanchego_rpc` to avoid conflicts with the validator if you want to run both on the same machine.

0 commit comments

Comments
 (0)