Configure JWT authentication
This guidance is relevant only if your beacon node is connecting to your execution node over HTTP. If you're using IPC, you can ignore this. If you want to learn how to use IPC, see our Quickstart.
First, select a configuration:
- Operating system:
- Linux, MacOS, Arm64
- Windows
- Network:
- Mainnet
- Sepolia
- Holesky
- Execution client:
- Geth
- Nethermind
- Besu
- EN-BN connection:
- HTTP-JWT
- IPC
The HTTP connection between your beacon node and execution node needs to be authenticated using a JWT token. There are several ways to generate this JWT token:
- Use a utility like OpenSSL to create the token via command:
openssl rand -hex 32 | tr -d "\n" > "jwt.hex"
. - Use an execution client to generate the
jwt.hex
file. - Use Prysm to generate the
jwt.hex
file:
- Operating system:
- Linux, MacOS, Arm64
- Windows
Prysm will output a jwt.hex
file path.
Move your jwt.hex
file in your ethereum
directory:
📂ethereum
┣ 📂consensus
┣ 📂execution
┣ 📄jwt.hex
Ensure that the script, user, or terminal window used to create and access your JWT token has the permissions it needs. Windows users may need to run command windows as Administrator.
Configure an execution node
Your execution node needs to expose a new port and then use the JWT token to authenticate your beacon node's connection to that port.
Using the latest version of your execution client software, issue the following command to configure your execution node's JWT token and Engine API endpoint:
- Execution client:
- Nethermind
- Besu
- Geth
Download the latest stable release of Nethermind for your operating system from the Nethermind downloads page.
- JWT
- IPC
Extract the contents into your execution
folder. Run the following command to start your execution node by replacing <PATH_TO_JWT_FILE>
by the path to the JWT file generated during the previous step:
Extract the contents into your execution
folder. Run the following command to start your execution by replacing <PATH_TO_IPC_FILE>
by any empty path on your file system. The execution layer client will create an IPC file at this location:
- Windows
- Linux, MacOS, Arm64
- Mainnet
- Sepolia
- Holesky
- JWT
- IPC
nethermind --config mainnet --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.JwtSecretFile=<PATH_TO_JWT_FILE>
nethermind --config mainnet --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.IpcUnixDomainSocketPath=<PATH_TO_IPC_FILE>
- JWT
- IPC
nethermind --config sepolia --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true--JsonRpc.JwtSecretFile=<PATH_TO_JWT_FILE>
nethermind --config sepolia --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.IpcUnixDomainSocketPath=<PATH_TO_IPC_FILE>
- JWT
- IPC
nethermind --config holesky --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true--JsonRpc.JwtSecretFile=<PATH_TO_JWT_FILE>
nethermind --config holesky --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.IpcUnixDomainSocketPath=/path/to/<your.ipc>
- Mainnet
- Sepolia
- Holesky
- JWT
- IPC
./nethermind --config mainnet --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.JwtSecretFile=<PATH_TO_JWT_FILE>
./nethermind --config mainnet --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.IpcUnixDomainSocketPath=<PATH_TO_IPC_FILE>
- JWT
- IPC
./nethermind --config sepolia --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true--JsonRpc.JwtSecretFile=<PATH_TO_JWT_FILE>
./nethermind --config sepolia --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.IpcUnixDomainSocketPath=<PATH_TO_IPC_FILE>
- JWT
- IPC
./nethermind --config holesky --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true--JsonRpc.JwtSecretFile=<PATH_TO_JWT_FILE>
./nethermind --config holesky --JsonRpc.Enabled true --HealthChecks.Enabled true --HealthChecks.UIEnabled true --JsonRpc.IpcUnixDomainSocketPath=/path/to/<your.ipc>
See Nethermind's command-line options for parameter definitions.
Ensure that the latest 64-bit version of the Java JDK is installed. Download the latest stable release of Besu from the Besu releases page. OS-specific instructions are available on Besu's binary installation page.
Run the following command to start your execution node replacing <PATH_TO_JWT_FILE>
by the path to the JWT file generated during the previous step:
- Mainnet
- Sepolia
- Holesky
- JWT
- IPC
besu --network=mainnet --rpc-http-enabled --engine-jwt-enabled=true --engine-jwt-secret=<PATH_TO_JWT_FILE> --engine-host-allowlist="*"
Content under construction.
- JWT
- IPC
besu --network=sepolia --rpc-http-enabled --engine-jwt-enabled=true --engine-jwt-secret=<PATH_TO_JWT_FILE> --engine-host-allowlist="*"
Content under construction.
- JWT
- IPC
besu --network=holesky --rpc-http-enabled --engine-jwt-enabled=true --engine-jwt-secret=<PATH_TO_JWT_FILE> --engine-host-allowlist="*"
Content under construction.
See Besu's command-line options for parameter definitions.
Download and run the latest 64-bit stable release of Geth for your operating system from the Geth downloads page.
Move the geth
executable into your execution
directory.
- JWT
- IPC
Navigate to your execution
directory and run the following command to start your execution node by replacing <PATH_TO_JWT_FILE>
by the path to the JWT file generated during the previous step:
Navigate to your execution
directory and run the following command to start your execution node by replacing <PATH_TO_IPC_FILE>
by any empty path on your file system. The execution layer client will create an IPC file at this location:
- Windows
- Linux, MacOS, Arm64
- Mainnet
- Sepolia
- Holesky
- JWT
- IPC
geth --mainnet --http --http.api eth,net,engine,admin --authrpc.jwtsecret=<PATH_TO_JWT_FILE>
geth --mainnet --http --http.api eth,net,engine,admin --ipcpath=<PATH_TO_IPC_FILE>
- JWT
- IPC
geth --sepolia --http --http.api eth,net,engine,admin --authrpc.jwtsecret=<PATH_TO_JWT_FILE>
geth --sepolia --http --http.api eth,net,engine,admin --ipcpath=<PATH_TO_IPC_FILE>
- JWT
- IPC
geth --holesky --http --http.api eth,net,engine,admin --authrpc.jwtsecret=<PATH_TO_JWT_FILE>
geth --holesky --http --http.api eth,net,engine,admin --ipcpath=<PATH_TO_IPC_FILE>
- Mainnet
- Sepolia
- Holesky
- JWT
- IPC
./geth --mainnet --http --http.api eth,net,engine,admin --authrpc.jwtsecret=<PATH_TO_JWT_FILE>
./geth --mainnet --http --http.api eth,net,engine,admin --ipcpath=<PATH_TO_IPC_FILE>
- JWT
- IPC
./geth --sepolia --http --http.api eth,net,engine,admin --authrpc.jwtsecret=<PATH_TO_JWT_FILE>
./geth --sepolia --http --http.api eth,net,engine,admin --ipcpath=<PATH_TO_IPC_FILE>
- JWT
- IPC
./geth --holesky --http --http.api eth,net,engine,admin --authrpc.jwtsecret=<PATH_TO_JWT_FILE>
./geth --holesky --http --http.api eth,net,engine,admin --ipcpath=<PATH_TO_IPC_FILE>
See Geth's command-line options for parameter definitions.
The execution layer client cannot sync without an attached beacon node. We'll see how to setup a beacon node in the next step.
Configure beacon node
Next, we'll configure your beacon node to consume your JWT token so it can form an authenticated HTTP connection with your execution node.
In this step, you'll run a beacon node using Prysm.
There is two main ways to sync a beacon node: from genesis, and from a checkpoint. It is safer and a considerably faster to sync from a checkpoint. When syncing from a checkpoint, the simplest is to connect to a checkpoint sync endpoint. A non exhaustive list of checkpoint sync endpoints is available.
In the following examples, we'll use the checkpoint sync endpoint provided by beaconstate.info. Feel free to use the one you want.
- Windows
- Linux, MacOS, Arm64
- Mainnet
- Sepolia
- Holesky
- JWT
- IPC
Navigate to your consensus
directory and run the following command to start your beacon node that connects to your local execution node by replacing <PATH_TO_JWT_FILE>
by the path to the JWT file generated during the previous step:
prysm.bat beacon-chain --execution-endpoint=http://localhost:8551 --mainnet --jwt-secret=<PATH_TO_JWT_FILE> --checkpoint-sync-url=https://beaconstate.info --genesis-beacon-api-url=https://beaconstate.info
Navigate to your consensus
directory and run the following command to start your beacon node that connects to your local execution node by replacing <PATH_TO_IPC_FILE>
by the path to the IPC file the execution client created for you during the previous step:
prysm.bat beacon-chain --execution-endpoint=<PATH_TO_IPC_FILE> --mainnet --checkpoint-sync-url=https://beaconstate.info --genesis-beacon-api-url=https://beaconstate.info
- JWT
- IPC
prysm.bat beacon-chain --execution-endpoint=http://localhost:8551 --sepolia --jwt-secret=<PATH_TO_JWT_FILE> --checkpoint-sync-url=https://sepolia.beaconstate.info --genesis-beacon-api-url=https://sepolia.beaconstate.info
prysm.bat beacon-chain --execution-endpoint=<PATH_TO_IPC_FILE> --sepolia --checkpoint-sync-url=https://sepolia.beaconstate.info --genesis-beacon-api-url=https://sepolia.beaconstate.info
- JWT
- IPC
prysm.bat beacon-chain --execution-endpoint=http://localhost:8551 --holesky --jwt-secret=<PATH_TO_JWT_FILE> --checkpoint-sync-url=https://holesky.beaconstate.info --genesis-beacon-api-url=https://holesky.beaconstate.info
prysm.bat beacon-chain --execution-endpoint=<PATH_TO_IPC_FILE> --holesky --checkpoint-sync-url=https://holesky.beaconstate.info --genesis-beacon-api-url=https://holesky.beaconstate.info
- Mainnet
- Sepolia
- Holesky
- JWT
- IPC
Navigate to your consensus
directory and run the following command to start your beacon node that connects to your local execution node by replacing <PATH_TO_JWT_FILE>
by the path to the JWT file generated during the previous step:
./prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --mainnet --jwt-secret=<PATH_TO_JWT_FILE> --checkpoint-sync-url=https://beaconstate.info --genesis-beacon-api-url=https://beaconstate.info
Navigate to your consensus
directory and run the following command to start your beacon node that connects to your local execution node by replacing <PATH_TO_IPC_FILE>
by the path to the IPC file the execution client created for you during the previous step:
./prysm.sh beacon-chain --execution-endpoint=<PATH_TO_IPC_FILE> --mainnet --checkpoint-sync-url=https://beaconstate.info --genesis-beacon-api-url=https://beaconstate.info
- JWT
- IPC
./prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --sepolia --jwt-secret=<PATH_TO_JWT_FILE> --checkpoint-sync-url=https://sepolia.beaconstate.info --genesis-beacon-api-url=https://sepolia.beaconstate.info
./prysm.sh beacon-chain --execution-endpoint=<PATH_TO_IPC_FILE> --sepolia --checkpoint-sync-url=https://sepolia.beaconstate.info --genesis-beacon-api-url=https://sepolia.beaconstate.info
- JWT
- IPC
./prysm.sh beacon-chain --execution-endpoint=http://localhost:8551 --holesky --jwt-secret=<PATH_TO_JWT_FILE> --checkpoint-sync-url=https://holesky.beaconstate.info --genesis-beacon-api-url=https://holesky.beaconstate.info
./prysm.sh beacon-chain --execution-endpoint=<PATH_TO_IPC_FILE> --holesky --checkpoint-sync-url=https://holesky.beaconstate.info --genesis-beacon-api-url=https://holesky.beaconstate.info
Syncing from a checkpoint usually takes a couple of minutes. See Sync from a checkpoint for more information about this feature.
- Mainnet
- Sepolia
- Holesky
--checkpoint-sync-url
and --genesis-beacon-api-url
flags from the previous command. Syncing from genesis usually takes a couple days, but it can take longer depending on your network and hardware specs.--checkpoint-sync-url
and --genesis-beacon-api-url
flags from the previous command and add the --genesis-state=genesis.ssz
flag. Syncing from genesis usually takes a couple days, but it can take longer depending on your network and hardware specs. Download the Sepolia genesis.ssz from Github into your consensus
directory.--checkpoint-sync-url
and --genesis-beacon-api-url
flags from the previous command and add the --genesis-state=genesis.ssz
flag. Syncing from genesis usually takes a couple days, but it can take longer depending on your network and hardware specs. Download the Holesky genesis.ssz from Github into your consensus
directory.If you are planning to run a validator, it is strongly advised to use the --suggested-fee-recipient=<WALLET ADDRESS>
option. When your validator proposes a block, it will allow you to earn block priority fees, also sometimes called "tips".
Congratulations - you’re now running a full Ethereum node. To check the status of your node, visit Check node and validator status.
Congrats! You're now using JWT authentication.