How to Install Docker Portainer on Rocky Linux 10

Install docker portainer on Rocky Linux 10 with Docker Engine, SELinux-aware Portainer CE, private HTTPS access, SSH tunneling, and fixes on a fresh VPS.
A polished 3D server rack with glowing containers and a secure dashboard panel on a midnight-blue background.

Install docker portainer on Rocky Linux 10 and finish with a working Docker Engine plus a persistent Portainer CE dashboard in about ten minutes. This guide keeps Portainer’s HTTPS interface on the VPS loopback address and reaches it through an SSH tunnel.

Prerequisites

  • A 64-bit Rocky Linux 10 VPS with at least 2 GB of RAM and 10 GB of free disk space for images, containers, and Portainer data.
  • SSH access as root, or a regular user with working sudo privileges.
  • Outbound HTTPS access to Docker’s RPM repository and Docker Hub.
  • An SSH client on your workstation. This private setup does not need a domain; you need a domain only if you later place Portainer behind a public reverse proxy.
  • A VPSLake Linux VPS with root access if you need a server for Docker workloads.

These commands use sudo for a normal SSH account. If you are logged in as root, remove sudo from each command.

Step 1: Confirm Rocky Linux 10 and update the host

Checking the release before changing repositories prevents a Rocky 9 or another RHEL-family repository from being applied to this server.

~~~bash . /etc/os-release && printf ‘ID=%s\nVERSION_ID=%s\nPLATFORM_ID=%s\n’ “$ID” “$VERSION_ID” “$PLATFORM_ID” uname -m sudo dnf -y upgrade ~~~

The first lines should identify Rocky Linux 10, and a typical 64-bit VPS reports x86_64:

~~~text ID=rocky VERSION_ID=”10.0″ PLATFORM_ID=”platform:el10″ x86_64 ~~~

Minor release values can differ. If VERSION_ID does not begin with 10, stop and use instructions for the installed release.

Step 2: Remove conflicting Docker packages and add the RPM repository

Rocky’s repositories may contain alternative container packages, so install Docker’s Engine packages as one coordinated set from its stable RPM repository.

If this is an existing Docker host, review its workloads and back up important data first. The removal command below removes old Docker package names but does not erase /var/lib/docker/.

~~~bash sudo dnf remove -y docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine sudo dnf install -y dnf-plugins-core ca-certificates curl sudo dnf config-manager –add-repo https://download.docker.com/linux/centos/docker-ce.repo sudo dnf makecache ~~~

Confirm that DNF can see the stable Engine package before installing anything else:

~~~bash dnf list docker-ce –showduplicates | tail -n 6 ~~~

You should see docker-ce entries from docker-ce-stable. Docker’s official CentOS installation guide documents the same RPM repository method. Package versions change over time, so use the current candidate rather than copying an example version.

Step 3: Install and test Docker Engine

The Compose plugin is installed with Engine because Portainer-managed applications commonly use Compose files later.

~~~bash sudo dnf install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo systemctl enable –now docker sudo systemctl is-active docker sudo systemctl is-enabled docker sudo docker version –format ‘Client {{.Client.Version}} / Server {{.Server.Version}}’ sudo docker compose version ~~~

Expected output has an active, enabled daemon and version numbers that depend on the current repository metadata:

~~~text active enabled Client x.y.z / Server x.y.z Docker Compose version v2.x.y ~~~

Now run Docker’s disposable test image. It checks daemon access, registry connectivity, and the container runtime, then removes the stopped test container:

~~~bash sudo docker run –rm hello-world ~~~

The final output should include Hello from Docker! and Your installation appears to be working correctly.

Step 4: Check firewalld and SELinux before deployment

Rocky Linux 10 normally uses firewalld and enforcing SELinux; Portainer needs a special container privilege for its local Docker socket when SELinux is enabled.

~~~bash getenforce sudo firewall-cmd –state sudo firewall-cmd –get-active-zones sudo firewall-cmd –list-services ~~~

Typical output looks like this, although the active zone and allowed services depend on your VPS image:

~~~text Enforcing running public interfaces: eth0 ssh ~~~

This guide will bind Portainer to 127.0.0.1, so do not open TCP 9443 in firewalld. Keep the existing SSH allowance because the browser connection in Step 6 travels through SSH.

Step 5: Deploy Portainer CE with persistent HTTPS data

A named volume keeps Portainer users, settings, and environment records when the container is replaced. The loopback publish prevents the dashboard from being reachable directly from the internet.

Create the volume and start the current long-term-support image. Portainer documents --privileged as required for a local Docker environment on a host where SELinux is enabled; this is why the flag is present here rather than disabling SELinux.

~~~bash sudo docker volume create portainer_data sudo docker run -d \ –name portainer \ –restart=always \ –privileged \ –publish 127.0.0.1:9443:9443 \ –volume /var/run/docker.sock:/var/run/docker.sock \ –volume portainer_data:/data \ portainer/portainer-ce:lts ~~~

Docker prints a long container ID. Check that Portainer is running and that Docker published only a loopback listener:

~~~bash sudo docker ps –filter name=portainer –format ‘table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}’ ~~~

~~~text NAMES IMAGE STATUS PORTS portainer portainer/portainer-ce:lts Up … 127.0.0.1:9443->9443/tcp ~~~

Portainer serves HTTPS on 9443 and uses a self-signed certificate initially. Port 8000 is for optional Edge Agent tunnel features, so it is intentionally not published for this single-host Docker setup. See the official Portainer Docker installation guide for the port roles and deployment options.

Step 6: Open the dashboard through an SSH tunnel

The tunnel lets your browser use the private listener without adding a public firewall rule for Portainer.

Run this command on your own computer, not inside the VPS shell, and leave that terminal open:

~~~bash ssh -N -L 9443:127.0.0.1:9443 YOUR_SSH_USER@SERVER_IP ~~~

Replace YOUR_SSH_USER with your SSH login and SERVER_IP with the VPS address. Browse to https://127.0.0.1:9443. A certificate warning is expected on the first visit because Portainer generated a self-signed certificate; continue only when the address is exactly 127.0.0.1.

Create the first administrator in the setup page with a unique password of at least 12 characters, then select the automatically detected local Docker environment. The initial account has administrative control of the Docker host.

If port 9443 is already used on your workstation, change only the local side of the tunnel:

~~~bash ssh -N -L 19443:127.0.0.1:9443 YOUR_SSH_USER@SERVER_IP ~~~

Open https://127.0.0.1:19443; the VPS-side Portainer listener remains on 9443.

Verify Docker and Portainer

Run these checks on the VPS to prove that Docker starts at boot, Portainer has a restart policy, its listener is private, and its HTTPS endpoint answers:

~~~bash sudo systemctl is-active docker sudo systemctl is-enabled docker sudo docker inspect –format ‘{{.HostConfig.RestartPolicy.Name}}’ portainer sudo ss -lntp | grep ‘:9443’ curl –insecure –silent –show-error –output /dev/null –write-out ‘%{http_code}\n’ https://127.0.0.1:9443 ~~~

Expected results include:

~~~text active enabled always LISTEN … 127.0.0.1:9443 … 200 ~~~

Refresh the tunneled browser page. You should see Portainer’s login page or dashboard, and the local Docker environment should be available after setup.

Troubleshooting

No match for argument: docker-ce

DNF cannot read Docker’s repository or its metadata cache is stale. Check the enabled repositories and rebuild the cache:

~~~bash sudo dnf repolist –enabled | grep -i docker sudo dnf makecache dnf list docker-ce –showduplicates ~~~

The list should include docker-ce-stable. If it does not, rerun the repository command from Step 2 and confirm that the VPS can resolve download.docker.com over HTTPS.

package containerd.io ... conflicts with ...

A distribution-provided containerd or an older Docker package is already installed. Identify the packages before changing them:

~~~bash rpm -qa | grep -E ‘^(docker|containerd|runc)’ | sort ~~~

On a new server, remove the conflicting distro packages and repeat Steps 2 and 3. On a host already running containers, do not remove the runtime until you know which service owns those workloads; back them up and plan a maintenance window.

Portainer restarts or logs an SELinux denial

Portainer cannot reach the Docker socket when SELinux blocks the container. Confirm the host mode, recent logs, and privilege setting:

~~~bash getenforce sudo docker logs –tail 100 portainer sudo docker inspect –format ‘{{.HostConfig.Privileged}}’ portainer ~~~

The last command should print true. If it prints false, recreate only the Portainer container with the --privileged option, loopback publish, socket mount, and portainer_data volume from Step 5. Keep SELinux enforcing.

curl works on the VPS but the browser cannot connect

The private binding is working, but the SSH forward is missing or points at the wrong local port. Start the tunnel again, keep it running, and browse to the matching https://127.0.0.1:9443 or https://127.0.0.1:19443 address. Check the VPS-side binding with sudo ss -lntp | grep ':9443'.

Hardening

  • Keep 9443 on loopback. If you later publish Portainer through a domain, use a reverse proxy with a trusted certificate and allow only the required source addresses in firewalld.
  • Treat the Docker socket and Portainer administrator account as root-equivalent access. Limit both SSH and dashboard access to trusted operators.
  • Back up portainer_data before changing the image tag or rebuilding the container. The volume contains Portainer’s own configuration, not your application data.
  • Review SSH exposure with VPSLake’s SSH hardening generator before relying on the tunnel for administration.

FAQ

Does Rocky Linux 10 use dnf or yum for this Docker setup?

Use dnf. Rocky Linux 10 is an Enterprise Linux 10 distribution, and the Docker repository helper plus package commands in this guide use DNF directly.

Why does this guide use the CentOS Docker repository URL?

Docker publishes its RPM repository under the CentOS path, and Rocky Linux is compatible with that Enterprise Linux package family. Keeping Docker Engine, containerd, Buildx, and Compose from the same stable repository avoids mixing unrelated container packages.

Why is port 9443 missing from firewalld?

Portainer is bound to 127.0.0.1, so it is not listening on the public network interface. The SSH tunnel carries your local browser request to that private address; opening 9443 publicly would defeat that protection.

Can I run Docker without sudo?

Yes, but adding a user to the docker group grants root-equivalent control of the host. For a single administrator, continue using sudo; if you choose the group method, add only a trusted account and reconnect before testing.

Samrat Ghosh
Written by

Samrat Ghosh

Founder & Infrastructure Engineer

Samrat Ghosh is the founder of VPSLake, where he builds and runs the remote desktop and VPS hosting infrastructure the company is built on. He writes hands-on guides about RDP, Windows Server, VPS management and secure remote access - the practical documentation he wishes had…

Previous Article

Palworld Dedicated Server Requirements: RAM, CPU & Cost

Next Article

n8n vs Zapier: Cost of Self-Hosting on a VPS

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨