Add Docker host

Add a Docker host to Portainer

You can add different types of container environments to Portainer.

Add Docker standalone

You can choose from the following methods to add a Docker standalone environment.

  • Agent
  • API
  • Socket
  • Edge Agent Standard

Agent The Portainer agent runs as a container on the host. To add the container run the following on the Docker host

docker run -d \
  -p 9001:9001 \
  --name portainer_agent \
  --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/lib/docker/volumes:/var/lib/docker/volumes \
  portainer/agent:2.18.1

In the Portainer console, ensure the following are configured for the environment. Then add the environment.

ValueDescription
NameGive the container a name
Environment Address{ip:9001}
Last modified July 21, 2024: update (e2ae86c)