Getting Started
Learn how to install and configure your first server in tug.sh.
Welcome to the official tug.sh documentation! This guide will walk you through your first steps on our platform, from connecting your own VPS server to deploying your first application.
What is tug.sh?
tug.sh is a modern, agent-based container management platform designed for developers who want full control over their VPS (Virtual Private Server) machines while enjoying the convenience of PaaS solutions.
Unlike complex Kubernetes clusters, tug.sh relies on simple and stable Docker mechanisms, controlled from a central dashboard via a lightweight Agent.
Prerequisites
Before you begin, ensure you have:
- An account on the tug.sh dashboard.
- A VPS server (public IP is optional if the server has outbound internet access).
- Docker installed on the target server.
- SSH access to the server as the
rootuser.
New or Existing VPS
tug.sh supports both scenarios:
- Fresh VPS: start from an empty machine and deploy your first services.
- Existing production VPS: connect a server that already runs containers and onboard it without rebuilding the host from scratch.
Installing the Agent
The tug.sh Agent is a lightweight Go daemon managed by systemd. It maintains a persistent outbound WebSocket (WSS) connection to our API using a server token.
In the dashboard, click the Connect VPS button and name the server. The dashboard creates it and shows a six digit code next to the command to run on the machine as root:
curl -fsSL https://tug.sh/install.sh | sudo bash
The command is the same for every machine and carries nothing secret. At the end of the install the Agent asks for the code; type it and the Agent exchanges it for its own token, which is written to /etc/tug/agent.env and never leaves the machine. The code is valid for fifteen minutes, stops working once the server connects, and can be replaced from the dashboard at any time.
The identity comes from the dashboard, not from the machine, so a reinstalled box keeps its place instead of appearing as a stranger.
For unattended installs, where there is no terminal to answer the prompt, pass the code in the environment:
curl -fsSL https://tug.sh/install.sh -o install.sh
sudo TUG_CODE=418302 bash install.sh
After installation the Agent connects on its own and the server turns green. The Agent initiates and maintains the control channel, so you do not need inbound ports for remote management.