Portainer is an open-source web UI that wraps the Docker API and exposes container management through a browser rather than the command line. It lets you start, stop, inspect, and reconfigure containers, images, volumes, and networks without remembering long docker commands. The Community Edition (CE) supports standalone Docker hosts and Docker Swarm clusters, and it is free to use. This tutorial covers deploying Portainer CE on RHEL 8 with Docker CE, opening the necessary firewall port, and completing the first-run setup through the HTTPS interface.
Prerequisites
- RHEL 8 server with Docker CE installed and
dockerservice enabled - Root or
sudoaccess - Port 9443 reachable from your browser (HTTPS) — port 9000 for HTTP if preferred
- A modern browser on a machine that can reach the server
Step 1 — Deploy the Portainer CE Container
Portainer needs access to the Docker socket to manage the host. Mount it as a volume along with a named volume for persistent Portainer data so your configuration survives container restarts or upgrades.
sudo docker volume create portainer_data
sudo 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
Port 9443 serves the HTTPS UI. Port 8000 is used by the Portainer Edge Agent tunnel (optional, but harmless to expose). Confirm the container is up:
sudo docker ps --filter name=portainer
Step 2 — Open the Firewall
RHEL 8 uses firewalld by default. Add port 9443 permanently and reload the rules so the change survives a reboot.
sudo firewall-cmd --permanent --add-port=9443/tcp
sudo firewall-cmd --permanent --add-port=8000/tcp
sudo firewall-cmd --reload
sudo firewall-cmd --list-ports
Step 3 — Complete the First-Run Setup
Open a browser and navigate to the Portainer HTTPS interface. Replace your-server-ip with the actual IP address or hostname of your RHEL 8 host.
https://your-server-ip:9443
Your browser will warn about the self-signed certificate that Portainer generates on first start — accept the exception to proceed. On the setup screen, enter a username and a strong password (minimum 12 characters) and click Create user. You will then be prompted to select an environment: choose Get Started to manage the local Docker instance that Portainer is already running inside.
Step 4 — Manage Containers Through the UI
After logging in, the Home screen shows your local environment with a live summary of running containers, images, volumes, and networks. Click the environment name to enter the full management view.
# Useful Portainer sections and what they expose:
#
# Containers — list, start, stop, restart, remove, inspect logs, exec console
# Images — pull, push, tag, remove, inspect layers
# Volumes — create, browse, remove named volumes
# Networks — create bridge/overlay/macvlan networks, inspect connectivity
# Stacks — deploy and manage Docker Compose stacks from the UI
# Registries — add credentials for private registries (e.g. registry.lan:5000)
To deploy a container from the UI: navigate to Containers → Add container, fill in the image name, port mappings, volume mounts, and environment variables, then click Deploy the container.
Step 5 — Deploy a Docker Compose Stack from the UI
Portainer’s Stacks feature lets you paste or upload a docker-compose.yml and deploy it without touching the command line. Navigate to Stacks → Add stack, give the stack a name, paste your Compose YAML into the web editor, and click Deploy the stack.
# Example: verify a stack deployed via the UI from the CLI
sudo docker compose -p mystack ps
Step 6 — Upgrade Portainer
Because Portainer data is stored in the portainer_data named volume, upgrading is a simple container replacement:
sudo docker stop portainer
sudo docker rm portainer
sudo docker pull portainer/portainer-ce:latest
sudo 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
Conclusion
Portainer CE is now running on your RHEL 8 server, reachable over HTTPS on port 9443 and protected by an admin password. The web UI provides a complete view of your Docker environment and removes the need to SSH into the server for routine container operations. Stacks support means you can manage Docker Compose deployments entirely through the browser, which is especially useful when multiple team members share a server.
Next steps: How to Deploy Applications with Docker Compose on RHEL 8, How to Set Up a Private Docker Registry on RHEL 8, and How to Install Podman as a Rootless Docker Alternative on RHEL 8.