Managing Docker from the command line is perfectly fine, but a graphical interface can make everyday tasks much faster. That is where Portainer comes in. Portainer is a lightweight management UI that lets you manage your Docker environments from a browser.

Step 1 – Create a persistent volume

First, create a named volume to store Portainer’s data. This ensures your settings and configurations survive container restarts:

docker volume create portainer_data

Step 2 – Run the Portainer container

Now start the Portainer container:

docker run -d \
  -p 9000:9000 \
  --name portainer \
  --restart always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v portainer_data:/data \
  portainer/portainer-ce

Here is what each flag does:

Flag Description
-d Run the container in detached mode (background)
-p 9000:9000 Expose port 9000 on the host and inside the container
--name portainer Assign a friendly name to the container
--restart always Automatically restart the container when it stops or on reboot
-v /var/run/docker.sock:/var/run/docker.sock Mount the Docker socket so Portainer can manage other containers
-v portainer_data:/data Mount the persistent volume
portainer/portainer-ce Use the Portainer Community Edition image

Step 3 – Access the UI

Open your browser and navigate to:

http://<ip-address-of-your-machine>:9000

On first run, Portainer asks you to set an admin password and select your environment (local Docker, remote Docker, Kubernetes, etc.). After completing the setup wizard you have full access to a graphical dashboard where you can start, stop, inspect, and manage all your containers.

That’s it!

With just two commands you have a fully functional Docker management UI running on your server. No more typing long docker ps and docker inspect commands — everything is a click away.