[How to] Exit an eth2 validator

One of the most common questions we get in the community is: how can I exit a validator?

First, you should know that this is an irreversible step, so here’s a necessary warning:

  1. You probably don’t want to exit. Like ever. Well, at least until phase 1.5 comes and you can exit and withdraw. Exiting means your ETH will be NOT validating and you will still NOT be able to retrieve it, so you get no ROI and you can’t touch it.

  2. If your validator runs into any trouble and loses balance due to inactivity leak, this inactivity leak is very small and it gives you more than enough time to fix whatever problem there is or put the validator somewhere else. This is NOT slashing.

  3. If you are slashed, you are forced to exit the validator set. So you’re screwed anyway and you have exited. You only get slashed once because then you get kicked out and forced to exit, so you don’t get a second chance.

That said, it is advisable to know how to do it and to practise on pyrmont.

Let’s get to it:

1. Connect to DAppNode’s terminal

Prysm’s UI does not include a way to exit. And that’s possibly a good thing, since someone could fuck up and exit without fully realizing the consequences. But the bad part about it is that we’re going to have to use the Command Line / Terminal in order to exit. You can do that by:

  1. Connecting a keyboard and screen to your DAppNode (don’t disconnect the ethernet from the router though!)

  2. Via ssh

To connect to your DAppNode via ssh you will need to open a terminal/console and type:

ssh dappnode@DAppNodeID.dyndns.dappnode.io, substituting DAppNodeID by the actual number you will find on the Identity pop-up of your AdminUI, at the top right:

Screenshot 2021-01-11 at 14.07.39

If you don’t get any response from the dyndns and you are in the same network, you will have to figure out the local IP of your DAppNode (you will find it in your router’s admin panel, under “network devices” or similar, YMMV). The command would look like this:

ssh dappnode@YOU.RLO.CAL.IP where YOU.RLO.CAL.IP is the actual number that appears on your router’s panel.

You will be prompted for a password. If you changed the host credentials, it will be whatever you decided. If you didn’t the default one will be dappnode.s0

If you’re a windows user you might need to activate the ssh client to do so - see this guide if ssh commands are not working for you.

2. Run the appropriate command within the right docker package

DAppNode uses docker as the building block to be able to be modular. Each DAppNode package runs one or more docker containers. We want to be able to pass the exit command to the validator service running within a docker container.

For testnet we will be looking at the docker container
and for mainnet the correct one would be

We can see a list of all running docker containers by typing docker ps in the terminal, but that’s not necessary.

Now we will open the interactive shell of the docker container like this:

docker exec -it DAppNodePackage-validator.prysm-pyrmont.dnp.dappnode.eth /bin/bash
changing the name of the package for the appropriate one if we wanted to do it on mainnet.

When we are inside the docker container running the validator, we can type:

cd /root/.eth2validators


validator accounts voluntary-exit –pyrmont --wallet-dir=/root/.eth2validators --wallet-password-file=/root/.eth2validators/walletpassword.txt --beacon-rpc-provider beacon-chain.prysm-pyrmont.dappnode:4000

If we were on mainnet we would

validator accounts voluntary-exit --wallet-dir=/root/.eth2validators --wallet-password-file=/root/.eth2validators/walletpassword.txt --beacon-rpc-provider beacon-chain.prysm.dappnode:4000

After that, we can simply close the terminal window. Your validator has now exited.


Is there a way to exit a validator if the node crashes?

If everything falls apart and you want to exit your validators in order to prevent them from being leaked to death, is there a way to do that from another server?

1 Like

Yup, absolutely. If the machine breaks down you just need to put the validator keystores into another DAppNode in another machine - no need to exit! BUT BE EXTREMELY CAREFUL! Make sure that the first machine is actually NOT turning on again and starting to validate… that would put you at risk of having two machines validating, which means double-signing: a slashing condition!

Reviewing these instructions, I get the impression that this command will cause ALL the validators in my wallet to exit. Is that correct?

Is there a command that can be used to exit validators selectively?

Say, for example, I want to exit 3 out of 10 validators so I can pay for the Lambo I ordered at my local dealership. But I want to keep my other 7 validators working, since I almost have enough money for the Martha’s Vineyard manse I’ve been eyeing.

Is it possible to exit three, while keeping seven validating?

Furthermore, is it possible to pick which three validators to exit? That way I could be sure which of my two mnemonics, and which three keystore slots I’m going to use to retrieve the deposited ETH?

I know this is just hypothetical at this point. Mostly because my Lambo won’t be ready for 18 months. But I would like to do a test exit, without forcing ALL my testnet validators to exit permanently.


While probably there’s a way with a beautiful CLI command to do exactly what you say, what I would do to ensure that I don’t fat-finger validators that I want to keep printing towards ensuring prime real estate (everyone knows that if you’ve got something east of Tisbury you’re not really in Martha’s Vineyard) is the following:

  1. Delete validator data
  2. Import the validators I want to exit via the UI
  3. Run the steps above

Once the exit has been processed (you’ll be in the exit queue with the desired validators):
4. Delete validator data
5. Import the remaining active validators and keep’em spinning

This has the added advantage that you can manually check with the pubkeys on the keystores that this is the validator you want to exit.

As I said, there is probably an elegant single command buried in prysm’s docs that will perform exactly what you asked, but if you don’t feel like digging, this solution will do it too.