Skip to content
testnetradar

Linux basics for node runners

published:

SSH, systemd, tmux and ufw — the four Linux skills every testnet guide on this site assumes you already have.

Every guide on this site assumes you can already do four things: connect to a remote machine over SSH, keep a program running after you disconnect with systemd, keep a terminal session alive across disconnects with tmux, and open exactly the network port a node needs with ufw. If any of those are new to you, this page is Step 0 — read it once, and every guide after it moves faster.

None of this is testnet-specific. It is the same four skills you would need to run any long-lived program on a rented Linux server.

SSH: connecting to a remote machine

SSH (Secure Shell) is how you get a terminal on a machine that is not in front of you — a rented VPS, a mini PC on your home network, anything with no screen attached. The official reference for the protocol and the OpenSSH client/server pair used on almost every Linux distribution is maintained at openssh.com.

bash
ssh username@server-ip-address

The first time you connect to a new server, SSH asks you to confirm its fingerprint. Say yes only if you just created this server yourself — a fingerprint that changes on a server you have connected to before is a warning sign, not a formality to click through.

systemd: keeping a program running

A program you launch directly in a terminal stops the moment that terminal closes. systemd is the service manager built into every modern Ubuntu release; it starts your node on boot, restarts it if it crashes, and lets you check its status with one command. The canonical reference for the unit file format is the systemd.unit(5) manual page, mirrored at man7.org.

A minimal unit file looks like this:

bash
sudo tee /etc/systemd/system/example-node.service > /dev/null <<'UNIT'[Unit]Description=Example nodeAfter=network-online.target[Service]ExecStart=/usr/local/bin/example-node startRestart=on-failureUser=nodeuser[Install]WantedBy=multi-user.targetUNITsudo systemctl daemon-reloadsudo systemctl enable --now example-node

The three commands you will run constantly:

bash
systemctl status example-nodejournalctl -u example-node -n 50 --no-pagersudo systemctl restart example-node

status tells you if it is running right now. journalctl -u <name> shows its recent log output — the first place to look when something is wrong. restart is the fix for most "it stopped working" situations, once you have read the log and understand why it stopped.

tmux: sessions that survive disconnects

SSH connections drop — your laptop sleeps, your Wi-Fi hiccups, your ISP does something inexplicable. Anything running directly in that terminal dies with the connection. tmux is a terminal multiplexer: it runs a session on the server itself, detached from any one SSH connection, so you can disconnect and reconnect without losing what was running. The project's own documentation is at the tmux GitHub wiki.

bash
tmux new -s node

Run whatever you were going to run inside that session. To detach without stopping it, press Ctrl+b, then d. Reconnect later, from the same SSH session or a fresh one, and pick the session back up:

bash
tmux attach -t node

ufw: opening exactly one port

A firewall's job is to block everything by default and let through only what you explicitly allow. ufw ("uncomplicated firewall") is Ubuntu's front end for the kernel's netfilter firewall, and its own documentation lives on the Ubuntu Community Help Wiki.

Check its current state before changing anything:

bash
sudo ufw status

A safe baseline for a fresh server keeps your SSH session alive while you enable the firewall — allow SSH before you turn ufw on, not after:

bash
sudo ufw allow OpenSSHsudo ufw enable

From there, open only the specific port your node's guide tells you to — usually one TCP or UDP port for peer-to-peer traffic:

bash
sudo ufw allow 30303/tcpsudo ufw status

FAQ

Do I need to know Linux before I run a testnet node?
You need these four things: connect over SSH, keep a program running with systemd, keep a session alive with tmux, and open one port with ufw. Nothing else on this page is required to follow a guide.
Which Linux distribution do the guides on this site assume?
Ubuntu Server, the most common choice for both rented VPS instances and home hardware. The commands below are Ubuntu/Debian-flavored (apt, systemd, ufw); other distributions use different package managers and firewall tools.
Is it safe to run commands as root?
Prefer a non-root user with sudo. Every command on this site is written to work either way, but a mistake typed as root has no safety net. Create a sudo user during initial server setup, covered in the Ubuntu Server setup guide.
What happens if I close my laptop while a command is still running?
If you ran it directly over SSH with no tmux session, it dies — SSH disconnects, and everything attached to that terminal goes with it. tmux exists specifically to prevent this; see the tmux section below.

Next testnet, in your inbox

One email when a new testnet opens, with the guide already written. No spam, unsubscribe in one click.