Install Portainer Agent with Docker on Windows Container Service
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.
You will need:
The latest version of Docker installed and working.
Administrator access on the machine that will host your Portainer Server instance.
Port 9001 accessible on this machine from the Portainer Server instance. If this is not available, we recommend using the Edge Agent instead.
The installation instructions also make the following assumptions about your environment:
Your environment meets our requirements. While Portainer may work with other configurations, it may require configuration changes or have limited functionality.
You have not set a custom AGENT_SECRET on your Portainer Server instance. If you have, you will need to provide that secret to your agent when deploying with:
To run Portainer Agent in a Windows Container scenario, you need to execute the following commands:
Once the agent has been installed you are ready to add the environment to your Portainer Server installation.
For security, if an agent does not have a custom AGENT_SECRET defined and has been running for longer than 72 hours without being associated with a Portainer Server installation, the agent will stop accepting connections until it is restarted.