Exit a VM SSH connection without having to quit processes

Hello, so I am new to cloud VMs. I have an Azure VM that I am accessing through SSH from Windows Terminal. I start running the cardano-node but when I close the connection, I get logged out of the VM and all the processes get stopped.
So my question is how can I keep the VM running while I am not logged in via my SSH connection.
Sorry if this is a noob question.

Hi!

either by wrapping the cardano-node run command with nohup

nohup cardano-node run --topology configs/mainnet-topology_new.json --database-path storage/ --socket-path storage/node.socket --host-addr 0.0.0.0 --port 3001 --config ../config.json --shelley-kes-key kes.skey --shelley-vrf-key pool-keys/vrf.skey --shelley-operational-certificate node.cert  > nohup.out 2>&1 &

or by creating a system service:
https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node#7-create-startup-scripts

I am trying out nohup.
Thanks for the quick reply!

1 Like