Create your tailnet
Sign up for Tailscale with the account you will use on your trusted devices.
Using Swarm
Hosting Swarm Agent is a great way to isolate the agent from your personal machine. You can connect to Swarm Agent over SSH in your terminal, open the server-hosted Desktop in a browser on your local machine through an SSH tunnel, or use Tailscale for private access.
Hosting Swarm Agent introduces security risks. It is critical to take the following steps to secure your machine before installing Swarm Agent.
Start with a Linux x86_64 server that you administer over SSH. Apply operating-system security updates, use key-based SSH authentication, and restrict inbound traffic before installing Swarm.
Treat an agent host like any other privileged development machine: it can read the workspaces and use the credentials you authorize. Start with a dedicated, supported VPS, install security updates, create a non-root administrator with key-based SSH, and disable password and direct root login after confirming your replacement login works.
Do not open Swarm's backend or Desktop ports. Swarm binds them to 127.0.0.1 by default, so they are not reachable from the public network.
Allow it only from your current public IP, a trusted VPN, or a private overlay such as Tailscale. Prefer the VPS provider's firewall for the outer rule because you can update or recover it from the provider console without first reaching the server.
If UFW restricts SSH to one source IP and that IP changes, you will lose SSH access. Keep a tested provider-console recovery path, confirm a second SSH session before closing the first, and update the allowlist before removing the old rule.
Swarm creates its configuration, data, cache, and runtime directories for the service owner with restrictive permissions. Configured provider API keys and OAuth tokens are sealed in the private credential store rather than saved as plaintext records; the separate local encryption key is service-user-owned and mode 0600. This protects data at rest, but it cannot protect credentials after a root-level host compromise.
A dedicated VPS or VM is the recommended supported path. Running Swarm inside a container on that server can add process and filesystem isolation, but it is an advanced, self-managed deployment rather than Swarm's standard installer and systemd path. A container is not automatically safer: run it rootless where possible, drop unnecessary capabilities, mount only the workspaces it needs, keep listeners on loopback, and persist and back up the required Swarm storage. Do not expose container ports publicly.
Connect to the server over SSH and run the same latest-release installer used for a local installation. You do not need to clone the source repository.
curl -fsSL https://swarmagent.dev/install | shThe installer shows its plan before making changes and may request sudo because it installs the launcher and runtime in system locations. It then asks whether to install the systemd service, install files only, or cancel.
Choose the systemd service for a server. The service option installs, enables, and starts swarm.service. Swarm then runs without an open SSH session, starts again after a reboot, and can be managed with the normal launcher commands.
The installer enables and starts swarm.service, and systemd restores it automatically after server reboots.
For testing or operators who already have another supervisor. Swarm installs without starting a service; you own startup, restart, and reboot behavior.
After choosing systemd, verify that the installed daemon is active and healthy:
swarm statusIf you initially chose files only, the installed launcher can add and start the service later with swarm install --service.
SSH directly to the host to use the Swarm TUI in your terminal. For browser access, forward the loopback-only Desktop port through SSH, or use Tailscale from trusted devices. Keep Swarm's backend and Desktop listeners on 127.0.0.1.
Connect using your SSH host or alias:
ssh server-aliasThen start the TUI from the server prompt:
swarmSwarm runs in that SSH terminal. Closing the SSH connection exits the TUI but does not stop the systemd-managed daemon.
Forward the server's loopback Desktop port to your workstation:
ssh -N -L 5555:127.0.0.1:5555 user@serverWhile the tunnel is open, visit the loopback address 127.0.0.1 on port 5555 from your workstation. Only SSH is exposed remotely; the Desktop listener remains on the server's loopback interface.
Tailscale creates a private network, called a tailnet, between the Swarm host and your trusted devices. Swarm stays on 127.0.0.1; Tailscale Serve provides the private HTTPS address you open from your computer or phone.
Sign up for Tailscale with the account you will use on your trusted devices.
Download Tailscale on the Swarm host and on each computer or phone that should connect, then sign in to the same tailnet.
On the Swarm host, forward its loopback-only Desktop listener through Tailscale Serve:
tailscale serve --bg 127.0.0.1:5555If you changed desktop_port, use that port instead of 5555.
Open the HTTPS *.ts.net address printed by Tailscale Serve from a signed-in device. The first visit asks you to approve that exact verified address in Swarm.
Tailscale has mobile apps for iOS and Android. Install the app, sign in to the same tailnet, connect Tailscale, and open your Swarm *.ts.net HTTPS address in the phone's browser. You can then install Swarm as a PWA for quicker access.
Open Swarm in Safari, tap Share, choose Add to Home Screen, turn on Open as Web App, then tap Add.
Open Swarm in Chrome, tap More, choose Add to home screen, then Install and follow the prompts.
Use tailscale serve, not Tailscale Funnel. Funnel publishes a service to the internet and is not a supported Swarm Desktop access path.
Do not bind Swarm to 0.0.0.0, publish ports 5555 or 7781, or place the daemon directly behind a public reverse proxy. Direct LAN or public HTTP access is not the supported secure path.
Use Swarm's launcher rather than managing the unit directly for routine lifecycle work:
swarm status swarm restart swarm stop swarm startKeep the server patched, review swarm status after a reboot or update, and back up the server storage appropriate to your environment. Closing swarm session, swarm open, or an SSH tunnel does not stop the systemd-managed daemon.