LogoLogo
  • Portainer documentation
  • Portainer
    • Quick Start
    • Deploying on Windows Server with Docker EE 19.03
    • Advanced Installation
    • Upgrading Portainer
  • The Portainer Agent
    • Why use the Portainer Agent?
    • Deploy The Portainer Agent
    • Upgrading the Portainer Agent
  • Contributing to Portainer
    • Contributing to the Portainer Project
      • Install required tools on MacOS
      • Install required tools on Linux
  • Other Information
    • Testing Methodology at Portainer
    • Configuring LDAP in Portainer
Powered by GitBook
On this page
  • Portainer as a Standalone Container
  • Portainer and the Agent in a Swarm

Was this helpful?

  1. Portainer

Quick Start

PreviousPortainer documentationNextDeploying on Windows Server with Docker EE 19.03

Last updated 5 years ago

Was this helpful?

If you need to deploy Portainer by itself follow instructions on how to deploy . It is recommended to 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

Docker for Windows 10 can use either Linux or Windows containers. Instructions will differ slightly for each type of container, so refer to the if you are unsure which you are using.

Note: Windows Server supports only native Windows containers.

To Install, Simply enter one of the below commands in your CLI

Command for Linux based containers:

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

Command for Native Windows containers:

docker run -d -p 9000:9000 -p 8000:8000 \
    --name portainer --restart always \
    -v \.\pipe\docker_engine:\.\pipe\docker_engine \
    -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

offical Docker documentation
Portainer as a standalone container
install Portainer and the Agent