Operations 5 min read

Quick Guide: Install Portainer to Manage Docker & Kubernetes

This guide walks you through installing the open‑source Portainer UI, checking system and Docker versions, running the Portainer server and agent containers, accessing the web interface via HTTP/HTTPS, and completing the initial admin setup, providing a streamlined way to manage Docker and Kubernetes resources without command‑line complexity.

Raymond Ops
Raymond Ops
Raymond Ops
Quick Guide: Install Portainer to Manage Docker & Kubernetes

Introduction

Portainer is an open‑source Docker and Kubernetes management UI that lets users manage containers, images, networks, volumes, Swarm and Kubernetes clusters through a web browser without using the command line.

Check Environment

System information:

# cat /etc/redhat-release
Rocky Linux release 9.3 (Blue Onyx)
# uname -a
Linux Rocky9StoneCrm003080 5.14.0-362.18.1.el9_3.0.1.x86_64 #1 SMP PREEMPT_DYNAMIC Sun Feb 11 13:49:23 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Docker version output:

# docker version
Client: Docker Engine - Community
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:14:42 2024
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:13:06 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0

Install Portainer Server

Run the following command to start the Portainer container:

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

Ports 9443 (HTTPS) and 9000 (HTTP) are exposed.

Access the UI

Open a browser and navigate to http://<IP>:9000 for HTTP or https://<IP>:9443 for HTTPS.

First Login

Set an admin username and password. The default user is admin with a custom password. After login, the local Docker host appears as “local”.

image
image

Add Docker Client (Portainer Agent)

Run the agent container on each Docker host you want to manage:

# docker run -d \
  -p 9001:9001 \
  --name portainer_agent \
  --restart=always \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /var/lib/docker/volumes:/var/lib/docker/volumes \
  -v /:/host \
  portainer/agent:2.26.1

After the agent is running, it appears in the Portainer web UI.

image
image
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

DockerOperationsDevOpsContainer Managementportainer
Raymond Ops
Written by

Raymond Ops

Linux ops automation, cloud-native, Kubernetes, SRE, DevOps, Python, Golang and related tech discussions.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.