Testing and Networks¶
Nube is designed to operate seamlessly across both local subnetworks and remote cloud servers. This guide explains how to test Nube across different network topologies and configure headless remote environments.
Local Subnet Testing (LAN)¶
When running Nube on multiple computers within the same Local Area Network (LAN):
mDNS Auto-Discovery: Nube automatically starts multicast DNS (mDNS) discovery on start. Nodes on the same local subnet will automatically discover, advertise, and connect to each other.
Verification: Start the daemon on both computers using
nube startand runnube statuson either computer to verify that the peer counts are incremented.
Remote Server Testing (Headless WAN)¶
Because multicast traffic (mDNS) does not cross WAN or standard routing boundaries, remote servers will not automatically discover your local computer or each other. You must establish the connection either manually or via bootstrapping.
Headless Running¶
The Nube daemon (nube start) runs completely headlessly. It does not require X11, Wayland, or a display environment to run. You can safely run it on remote VPS instances or headless servers.
All file operations, sync tasks, and database storage occur in userspace using FUSE, which can be managed natively from any shell terminal.
SSH Port Forwarding¶
Since the Nube Web UI and REST API default to loopback (127.0.0.1:9090), you can securely manage a headless remote daemon by forwarding the loopback port over SSH to your local computer:
ssh -L 9090:127.0.0.1:9090 user@remote-server-ip
Once connected, open your local browser and navigate to http://127.0.0.1:9090. The web dashboard will operate directly on the remote server’s virtual storage.
Manual Swarm Connections¶
If you want to manually connect two remote nodes:
Retrieve Multiaddress: On the destination remote server, run
nube statusto get its P2P listening address (which defaults to port6600). It will look like:/ip4/<remote-server-ip>/tcp/6600/p2p/<remote-peer-id>Connect from CLI/API: Extract the session token on the connecting node and trigger a POST request to /api/v1/swarm/connect:
TOKEN=$(cat ~/.local/share/nube/session) curl -X POST -H "X-Nube-Token: $TOKEN" \ "http://127.0.0.1:9090/api/v1/swarm/connect?peer=/ip4/<remote-server-ip>/tcp/6600/p2p/<remote-peer-id>"