[How to] Exit an eth2 validator [Deprecated]

EDIT: New guide after 20/April/2023: How to Prepare for Withdrawals for Ethereum Stakers using Dappnode | by Pol Lanski | DAppNode | Apr, 2023 | Medium

The text below is deprecated :slight_smile:

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?


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.

1 Like


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.

1 Like

Hello. I have tried both commands to connect but can’t figure out what the password is. I have tried dappnode.s0 and the web UI pw I setup and am not aware of any other pw.

Permission denied, please try again.

Where can I find / reset the host credentials?

If dappnode.s0 doesn’t work as password you must have changed the node’s host password and possibly the username during initial installation. If so, you may need to recover the root password you must directly access the console of the DAppNode with a keyboard and monitor. Google instructions on how to recover/change root password on Debian; the instructions are pretty straightforward but require a reboot to the GRUB interface and you need to stop it from loading the OS from the drive. You need to enter recovery mode. From there the instructions will guide you to mount the filesystem manually and then you will eventually be able to access a location where you can use the passwd command to set a new root password. Once you do this obviously be sure to save the new root password you set offline, and then reboot the machine this time let it boot normally, you will then be able to use the new root password you just set to login to the console and from there you can see all user accounts including whatever you changed the host username to (if you only changed the password for the host not the username [default: dappnode] you can just use the same passwd command to reset the host password. One note to remember is that no matter what, the root account in DAppNode installed via ISO cannot be accessed over SSH, you can only access the root account over SSH by logging into the host account and then using su- to change user to the root, otherwise root account access is strictly limited to direct physical console access by the DAppNode OS.

Hi, is this still working ? And is there a possibility to create a voluntary exit validator file for exiting when we want even if the dappnode is offline ?
Thanks so much

Hey @AwAZ !
There’s a much more updated guide right here: How to Prepare for Withdrawals for Ethereum Stakers using Dappnode | by Pol Lanski | DAppNode | Apr, 2023 | Medium

Drop by discord if you have any doubts!

Oh nice, perfect… there is also a simple way to download an exit msg in order to have the power to exit my validator if stolen or offline. Thanks! :pray:

That’s right! You can use Wagyu to generate this message and submit it whenever it’s necessary to Beaconcha.in.