Skip to content

Commit 648af0a

Browse files
authored
Update production-setup.md
1 parent ecd76db commit 648af0a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

docs/production-setup.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ ZKEVM_NET=mainnet
2626
ZKEVM_DIR=./path/to/install # CHANGE THIS
2727
ZKEVM_CONFIG_DIR=./path/to/config # CHANGE THIS
2828
curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip
29-
cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env
29+
mkdir -p $ZKEVM_CONFIG_DIR && cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env
3030

3131
# EDIT THIS env file:
3232
nano $ZKEVM_CONFIG_DIR/.env
@@ -35,18 +35,21 @@ nano $ZKEVM_CONFIG_DIR/.env
3535
docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d
3636
```
3737

38-
Explained step by step:
38+
### Explained step by step:
3939

4040
1. Define network: `ZKEVM_NET=testnet` or `ZKEVM_NET=mainnet`
4141
2. Define installation path: `ZKEVM_DIR=./path/to/install`
4242
3. Define a config directory: `ZKEVM_CONFIG_DIR=./path/to/config`
4343
4. It's recommended to source this env vars in your `~/.bashrc`, `~/.zshrc` or whatever you're using
44-
5. Download and extract the artifacts: `curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip`. Note you may need to install `unzip` for this command to work. Also take into account this works for the latest release, in case you want to deploy a pre-release you should get the artifacts directly for that release and not using the "latest" link depicted here. [Here](https://github.com/0xPolygonHermez) you can check the node version deployed for each network.
45-
6. Copy the file with the env parameters: `cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env`
44+
5. Download and extract the artifacts: `curl -L https://github.com/0xPolygonHermez/zkevm-node/releases/latest/download/$ZKEVM_NET.zip > $ZKEVM_NET.zip && unzip -o $ZKEVM_NET.zip -d $ZKEVM_DIR && rm $ZKEVM_NET.zip`. Note you may need to install `unzip` for this command to work.
45+
46+
> **NOTE:** Take into account this works for the latest release (mainnet), in case you want to deploy a pre-release (testnet) you should get the artifacts directly for that release and not using the "latest" link depicted here. [Here](https://github.com/0xPolygonHermez) you can check the node release deployed for each network.
47+
48+
6. Copy the file with the env parameters into config directory: `mkdir -p $ZKEVM_CONFIG_DIR && cp $ZKEVM_DIR/$ZKEVM_NET/example.env $ZKEVM_CONFIG_DIR/.env`
4649
7. Edit the env file, with your favourite editor. The example will use nano: `nano $ZKEVM_CONFIG_DIR/.env`. This file contains the configuration that anyone should modify. For advanced configuration:
4750
1. Copy the config files into the config directory `cp $ZKEVM_DIR/$ZKEVM_NET/config/environments/testnet/* $ZKEVM_CONFIG_DIR/`
4851
2. Make sure the modify the `ZKEVM_ADVANCED_CONFIG_DIR` from `$ZKEVM_CONFIG_DIR/.env` with the correct path
49-
3. Edit the different configuration files
52+
3. Edit the different configuration files in the $ZKEVM_CONFIG_DIR directory and make the necessary changes
5053
8. Run the node: `docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml up -d`. You may need to run this command using `sudo` depending on your Docker setup.
5154
9. Make sure that all components are running: `docker compose --env-file $ZKEVM_CONFIG_DIR/.env -f $ZKEVM_DIR/$ZKEVM_NET/docker-compose.yml ps`. You should see the following containers:
5255
1. zkevm-rpc

0 commit comments

Comments
 (0)