Comment on page
Install Portainer Agent on Docker Standalone
Portainer uses the Portainer Agent container to communicate with the Portainer Server instance and provide access to the node's resources. This document will outline how to install the Portainer Agent on your node and how to connect to it from your Portainer Server instance. If you do not have a working Portainer Server instance yet, please refer to the Portainer Server installation guide first.
In addition to the generic requirements for Docker Standalone environments, you will need:
- If you are running Windows on your node, either:
- Windows Subsystem for Linux (WSL) installed and a Linux distribution selected. For a new installation we recommend WSL2.
- Windows Container Services (WCS) configured and running.
The Portainer Agent installation instructions also make the following additional assumptions about your environment:
- You are accessing Docker via Unix sockets (or a named pipe when using WCS). The Portainer Agent does not support connecting to the Docker engine via TCP.
- If running Linux, SELinux is disabled on the machine running Docker. If you require SELinux, you will need to pass the
--privilegedflag to Docker when deploying Portainer.
- You have not set a custom
AGENT_SECRETon your Portainer Server instance. If you have, you will need to provide that secret to your agent when deploying with:
From the menu select Environments then click Add environment.
Next, select Docker Standalone as the environment type then click Start Wizard. Select the Agent option, then your environment type. Copy the command for your environment type and run it on your Docker Standalone instance. For example, if you are deploying on a Linux machine or a Windows machine with WSL installed, use the Linux & Windows WSL command. If you are deploying on a Windows machine with WCS, use the Windows WCS command.
If Docker on the environment you're deploying the Agent to has the Docker volume path at a non-standard location (instead of
/var/lib/docker/volumes) you will need to adjust the volume mount in the deployment command to suit.
For example, if your volume path was
/srv/data/docker, you would change the line in the command to:
- v /srv/data/docker:/var/lib/docker/volumes \
The right side of the mount should remain as
/var/lib/docker/volumes, as that is what the Agent expects.
Once the Agent has been deployed, enter the environment details using the table below as a guide:
When you're ready, click Connect. If you have other environments to configure click Next to proceed, otherwise click Close to return to the list of environments.