Skip to content

Install the Agent

To be able to deploy Docker containers, you need to install Docker and the Ptah.sh agent, respectively. Fortunately, this won’t require much effort from you: the service will generate a bash command for you, so all you need is the common skill of copy-pasting. :)

Create a new Server (“Node”)

First, we need to create a node on the ptah.sh platform.

  1. Navigate to the Nodes page.
  2. Click “Create” on the top right of the page.
  3. Enter the name of the Node. It can be anything you want. We prefer to name nodes after the server provider regions (e.g. us-east-1).
  4. Click “Create”.

This will create a record in our database, but you can not yet make any changes to your infrastructure.

Install an Agent

  1. Navigate to the created node (find it the Nodes page).
  2. Locate the “Agent Status” section.
  3. Click “Copy” on the block with the setup script.
  4. Open a root SSH connection to your VPS (or bare-metal server).
  5. Paste and execute the CLI script. The script will:
  • install the required dependencies (Docker and it’s utilities)
  • create a system user ptah
  • download a latest version of an agent software from GitHub releases
  • add ptah-agent to the systemd startup scripts
  • start the agent
  1. Navigate back to the node and refresh the page.
  2. You should see the agent version and other meta-information if the process succeeded.
* Recorded with Screen Studio

Initialize the Docker Swarm

So, as soon as you’ve installed the agent and your server card on the dashboard has changed from a red “Offline” to a green “Online”, you can initialize the Docker Swarm cluster where your services will actually run.

Among the necessary parameters is the Advertisement Address - in case you wish to create a cluster of several servers in the future. If all your servers will be within the same network of your provider, choose the internal address. However, if your requirements include having multiple geographic zones (providers, availability zones, and so on), choose the external address.

* Recorded with Screen Studio

Additional Information

The installation script automatically sets up two important components:

  1. Ptah.sh Agent: This service manages your Ptah.sh installation and communicates with the Ptah.sh server.

  2. Docker Ingress Routing Daemon (DIRD): This component handles routing for your Docker services, ensuring proper network connectivity.

Both of these services are configured as systemd units and will start automatically on system boot. You can check their status using the following commands: