40 lines
1.5 KiB
Markdown
40 lines
1.5 KiB
Markdown
# 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`:
|
|
|
|
1. Navigate to this directory:
|
|
```bash
|
|
cd optimized/standalone/Portainer_Agent_Standalone
|
|
```
|
|
2. **Important**: Replace `192.168.1.81` with the actual IP address or resolvable hostname of your Portainer Server instance in the `docker-compose.yml`.
|
|
3. Start the agent:
|
|
```bash
|
|
podman-compose up -d
|
|
```
|
|
|
|
## Running with Podman
|
|
|
|
You can run the Portainer Agent directly with Podman:
|
|
|
|
```bash
|
|
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.sock` and `/var/lib/docker/volumes` are critical for the agent to communicate with and manage the Docker/Podman daemon.
|
|
* Ensure `AGENT_CLUSTER_ADDR` points to your actual Portainer Server.
|