Portainer: Docker in a Browser

← Self-Hosting · Foundations 2 of 8 · Replaces: typing docker commands for everything

What You'll Build

Portainer Community Edition is a free web interface for Docker. Instead of SSH-ing in to check on an app, open a browser tab: every container, its status, logs, CPU and memory use, and a console — all point-and-click.

Port: 9443 · Time: 10 minutes · Difficulty: Easy

What You Need

Step 1: Create the Compose File

mkdir -p ~/stacks/portainer && cd ~/stacks/portainer
nano compose.yaml
services:
  portainer:
    image: portainer/portainer-ce:lts      # long-term-support release
    container_name: portainer
    restart: unless-stopped
    ports:
      - "9443:9443"                        # web UI (HTTPS, self-signed certificate)
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock   # lets Portainer control Docker
      - ./data:/data                                # Portainer's own settings
docker compose up -d

Step 2: Create Your Admin Account (Within 5 Minutes!)

  1. Open https://192.168.1.50:9443. Your browser warns about the certificate — that's expected for a self-signed one. Click Advanced → Continue.
  2. Create the admin user with a long password (12+ characters).
  3. Choose Get Started to manage the local Docker environment.

For security, Portainer locks the setup page if no admin is created within about 5 minutes of starting. If you see a timeout message, run docker compose restart and try again.

Step 3: A Tour of the Useful Bits

Terminal or Portainer? This site keeps every app as a compose.yaml in ~/stacks so it's easy to back up and to copy between machines. Use Portainer to watch and restart; use the terminal to create and change.

Troubleshooting

What's Next?

Give every app a proper name and HTTPS padlock instead of IP:port:

Foundations 3: Reverse Proxy & HTTPS →