Tutorial: Connect Two Devices
In this tutorial you’ll connect your laptop and a second machine (server, desktop, or Raspberry Pi) so they can reach each other directly over a private encrypted connection.
Time: about 10 minutes Difficulty: beginner
What you’ll need
- A running control plane (see Install the Control Plane)
- Two machines with the Rabtly daemon installed (see Installation)
- Both machines connected to the internet
Steps
Start the control plane
Make sure your control plane is running and you can open the dashboard at http://your-server:3000.
Connect machine 1 (your laptop)
Open a terminal on your laptop:
sudo rabtly-daemon \
--server http://your-server:8080 \
--name laptopLeave this running (or set it up as a service — see macOS or Linux).
Connect machine 2
Open a terminal on the second machine:
sudo rabtly-daemon \
--server http://your-server:8080 \
--name server-1Check the dashboard
Go to the dashboard → Nodes. Both devices should appear with a green Online badge and private IP addresses like 100.64.0.1 and 100.64.0.2.
Ping across the tunnel
On your laptop, ping the second machine using its Rabtly IP:
ping 100.64.0.2You should see replies. The traffic is going through the encrypted WireGuard tunnel — not over the public internet.
Try SSH (optional)
If the second machine has SSH enabled, you can now connect to it using the Rabtly IP:
ssh user@100.64.0.2This works even if the machine is behind a NAT or firewall, because Rabtly handles the connection automatically.
Rabtly IPs always start with 100.64.. You can find each device’s IP in the dashboard Nodes page.
What’s happening behind the scenes?
- Each daemon registered with the control plane and received a unique IP address.
- The control plane sent each daemon the WireGuard public key of its peers.
- The daemons established a direct encrypted tunnel using WireGuard.
- If direct connection fails (strict firewall), traffic automatically routes through the relay server.