Portainer CE Setup: Manage Docker Containers via Web UI

I run a handful of VPS boxes, and for a long time every container task meant another SSH session: docker ps here, docker logs -f there, compose files pushed over scp. It worked, but it ate time. Then I did this portainer ce setup, and daily container work moved into a browser tab. Portainer CE is the free, open-source self-hosted docker dashboard for Docker and Swarm: start, stop, inspect, redeploy, read logs, open a console, all point-and-click, with the CLI still there when you want it.

You will install Portainer CE on your VPS with a single docker run command, create the admin account, tour the dashboard, learn the three features that matter most (stacks, volumes, networks), and lock it down so port 9443 never becomes someone else’s playground. Ten minutes, start to finish.

Before You Start

  • A VPS running Ubuntu 22.04 or 24.04. Portainer itself is light: 1 vCPU and 1 GB of RAM is plenty.
  • Docker Engine installed. On a fresh box, install Docker and Docker Compose on Ubuntu 24.04 first, then come back.
  • Ports 9443 and 8000 reachable from your machine. We will restrict them later in this guide.

Portainer CE Setup: One Docker Run Command

Portainer ships as a container, so installing it means running a container. Two commands. First, a named volume to hold Portainer’s own database, so your settings survive container replacement:

docker volume create portainer_data

Then the container itself:

docker run -d 
  -p 8000:8000 
  -p 9443:9443 
  --name portainer 
  --restart=always 
  -v /var/run/docker.sock:/var/run/docker.sock 
  -v portainer_data:/data 
  portainer/portainer-ce:latest

A quick tour of the flags, because you should know what you just ran:

  • -p 9443:9443 exposes the web UI over HTTPS. Older guides use port 9000 for plain HTTP; use 9443.
  • -p 8000:8000 is the tunnel port for the Edge agent. You do not need it on a single host, but it costs nothing to publish.
  • Mounting /var/run/docker.sock hands Portainer full control of your Docker daemon. That is the entire point of the tool, and also why the security section below is not optional.
  • --restart=always brings Portainer back after a reboot.

Confirm it is up:

docker ps --filter "name=portainer"

You should see the container in Up state within seconds. A standard portainer docker install needs nothing else at this stage.

First Login: Create the Admin Account

Open https://YOUR-SERVER-IP:9443 in a browser. Expect a certificate warning: Portainer generates a self-signed certificate on first start, so the warning is normal on a fresh install. Accept it and continue.

Portainer asks you to create the admin user right away. One quirk worth knowing: this screen only stays available for five minutes after the first start, a guard against someone else claiming your fresh install. If it times out, run docker restart portainer and the prompt comes back. Pick a long password, then choose “Get Started” to manage the local Docker environment. The agent options only matter when you connect extra nodes later.

A Tour of the Dashboard: Docker Container Management in the Browser

The sidebar is the whole product: a host overview page, then Containers, Images, Networks, Volumes, and Stacks. The host page shows your Docker version and live CPU and RAM usage, which is handy for a quick health glance without opening htop.

The container list is where you will live. Each row offers start, stop, restart, and kill, plus one-click access to logs, a web console (an exec session inside the container), live stats graphs, and the full inspect output. Daily ops that used to mean three SSH commands become three clicks.

Everything in this guide uses the free Community Edition. If you ever manage a team or many endpoints, read the difference between the free Community Edition and the paid Business edition before you pay for anything. And Portainer is not the only dashboard in town: we compared Portainer against other container dashboards if you want to weigh the alternatives first.

Manage Docker Containers Remotely: Stacks, Volumes, and Networks

Three features carry most of the value once the novelty wears off.

Stacks

Stacks are Docker Compose files managed through the UI. Click “Add stack”, paste your compose YAML into the web editor (or point it at a Git repository), and deploy. Updating means editing the YAML and hitting redeploy; Portainer pulls new images and recreates containers for you. Stack names prefix your container names, which keeps a busy host readable.

Volumes

The volumes page lists every volume, shows which containers mount it, and lets you delete the unused ones that accumulate over months of experiments. One thing it does not do: back them up for you. Treat volume backups as a separate scheduled job, not something the dashboard handles.

Networks

Create bridge networks, attach containers to them, and see the IPAM assignments at a glance. When two stacks need to talk to each other, putting them on a shared user-defined network beats exposing ports on the host.

Lock It Down: Don’t Expose Port 9443 to the Internet

Portainer is effectively root on your Docker host. Anyone who logs in controls every container, image, and volume. So do not leave 9443 open to the whole internet with only a password in front of it. Three practical options:

  • SSH tunnel. Bind the UI to localhost by publishing 127.0.0.1:9443:9443 instead of 9443:9443, then reach it through a tunnel:
    ssh -L 9443:localhost:9443 user@your-server-ip

    Then open https://localhost:9443. Nothing listens on the public interface at all.

  • Firewall rule. If you need direct access, allow only your own IP through the firewall. Our UFW setup guide for Ubuntu walks through exactly that.
  • Reverse proxy with authentication. Put Portainer behind Traefik or Nginx with basic auth, Authelia, or a Cloudflare Tunnel, and never publish 9443 publicly.

Whichever you choose, use a long unique admin password and keep Portainer updated; the update process is in the FAQ below.

Quick FAQ

Port 9000 or 9443? Use 9443. Port 9000 serves the UI over plain HTTP and mostly survives in old tutorials.

“Permission denied” on the Docker socket? Your shell user is not in the docker group. Run sudo usermod -aG docker $USER, log out and back in, then retry the commands. Portainer itself runs as a container, so this only bites the CLI steps.

How do I update Portainer CE? Stop, remove, pull, and re-run with the same flags. Your data lives in the portainer_data volume, so nothing is lost:

docker stop portainer && docker rm portainer
docker pull portainer/portainer-ce:latest
docker run -d -p 8000:8000 -p 9443:9443 --name portainer 
  --restart=always 
  -v /var/run/docker.sock:/var/run/docker.sock 
  -v portainer_data:/data 
  portainer/portainer-ce:latest

Can it manage more than one server? Yes. Install the Edge agent on each extra host and they appear in the same dashboard over port 8000. That is beyond this single-VPS guide, but the option is there when you outgrow one box.

That is the whole portainer ce setup: one volume, one docker run, one admin account, and a firewall rule between it and the internet. The next time a container misbehaves, you will read its logs and restart it from a browser tab instead of opening a terminal.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.