Cloud Native 5 min read

How to Install and Use Portainer for Docker & Kubernetes Management

This guide walks you through installing Portainer, an open‑source Docker and Kubernetes management UI, checking system and Docker versions, running the Portainer server and agent containers, and accessing the web interface to manage local and remote container environments.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
How to Install and Use Portainer for Docker & Kubernetes Management

Introduction

Portainer is an open‑source Docker and Kubernetes management tool that provides an intuitive web UI for visualizing and managing containers, images, networks, volumes, and clusters without using the command line.

Environment Check

Example commands to view the OS release and Docker version on a Rocky Linux 9.3 host.

# 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 ...
# 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

Server: Docker Engine - Community
Version: 25.0.3
API version: 1.44 (minimum 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
containerd GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc Version: 1.1.12
runc GitCommit: v1.1.12-0-g51d5e94
docker-init Version: 0.19.0
docker-init GitCommit: de40ad0

Install Portainer Server

Run the following Docker command to start the Portainer CE container, mapping ports 8000, 9443 (HTTPS) and 9000 (HTTP), mounting the Docker socket and a persistent data volume.

# 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

After the container starts, access the UI at http://<em>IP</em>:9000 or https://<em>IP</em>:9443. The first login requires setting an admin username and password; the local Docker host is added automatically as “local”.

Add Docker Endpoint (Agent)

Deploy the Portainer agent on a remote Docker host to manage it from the Portainer UI.

# 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

Once the agent container is running, the remote host appears in the web interface.

image
image

For detailed steps, refer to the original blog post.

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.

DockerKubernetesDevOpsContainer Managementportainer
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

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.