Tmux

Why tmux?

Running your node inside tmux allows you to disconnect from your cloud instance (i.e. AWS, Vultr) without shutting down your node on your cloud instance.

Tips:

Creating a session:

tmux new-session -s node

If you have done this correctly, your screen should be reset:

While connected to a live tmux session, you will see a green bar at the bottom of your screen.

If you see this

You already have a session running. Reattach to that session using the tips below.

Detaching from your session:

Press ctrl+b. Let go of those keys. Then press d. This will safely disconnect you from your cloud instance and shut down tmux while leaving your node running in your cloud instance.

<CTRL+b>
<d>

If you have done this correctly you should see [detached] printed onto your screen:

DO NOT EXIT A SESSION USING CTRL+C. This will only shut down your node and not close tmux. If you have already entered ctrl+c, you have shut down your node. You will need to restart your node using this command(while inside a tmux session):

sudo ./node.sh -t

Reattaching to your session:

You will first need to be inside a tmux session. If you need to, create a new tmux session using the code above. Then use:

tmux attach

If you have done this correctly, you should see a green bar at the bottom of your screen: