1.5 KiB
1.5 KiB
Portainer Agent (Standalone Host)
This directory contains the docker-compose.yml for deploying a Portainer Agent on a standalone Docker (or Podman) host. This agent allows a central Portainer instance (potentially running in a Swarm) to manage this individual host.
Running with Podman Compose
To deploy the Portainer Agent using podman-compose:
- Navigate to this directory:
cd optimized/standalone/Portainer_Agent_Standalone - Important: Replace
192.168.1.81with the actual IP address or resolvable hostname of your Portainer Server instance in thedocker-compose.yml. - Start the agent:
podman-compose up -d
Running with Podman
You can run the Portainer Agent directly with Podman:
podman run -d \
--name portainer-agent \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/lib/docker/volumes:/var/lib/docker/volumes \
-e AGENT_CLUSTER_ADDR=192.168.1.81 \
-e AGENT_PORT=9001 \
-p "9001:9001" \
portainer/agent:latest
Notes
- This agent is specifically for managing a standalone Docker/Podman host. If you intend to manage a Swarm cluster, the Portainer Swarm stack (found in
optimized/swarm/Portainer) should be used, which typically deploys agents globally across the Swarm nodes. - The volumes
/var/run/docker.sockand/var/lib/docker/volumesare critical for the agent to communicate with and manage the Docker/Podman daemon. - Ensure
AGENT_CLUSTER_ADDRpoints to your actual Portainer Server.