Quick Start
If you need to deploy Portainer by itself follow instructions on how to deploy Portainer as a standalone container. It is recommended to install Portainer and the Agent when managing a Swarm for a more feature rich experience.
Portainer as a Standalone Container
Installing Portainer as a standalone container is achieved using a few simple commands. These differ based on your OS.
The following command will create a volume for Portainer and run Portainer inside a container using this volume. The volume is important as it is a way for Portainer to persist data across reboots.
docker run -d -p 9000:9000 -p 8000:8000 \
--name portainer \
--restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data portainer/portainer
VoilĂ ! You can now use Portainer by accessing the port 9000 on the device where Portainer is running.
Portainer and the Agent in a Swarm
The following command will deploy Portainer and the Portainer Agent onto your swarm. Everything is preconfigured from our stack file to simplify deployment as much as possible.
curl -L https://downloads.portainer.io/portainer-agent-stack.yml \
-o portainer-agent-stack.yml
docker stack deploy --compose-file=portainer-agent-stack.yml portainer
Last updated
Was this helpful?