{"id":13123,"date":"2022-06-11T08:36:01","date_gmt":"2022-06-11T05:36:01","guid":{"rendered":"https:\/\/kifarunix.com\/?p=13123"},"modified":"2024-03-09T15:18:26","modified_gmt":"2024-03-09T12:18:26","slug":"install-portainer-on-rocky-linux","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/install-portainer-on-rocky-linux\/","title":{"rendered":"Install Portainer on Rocky Linux"},"content":{"rendered":"\n
In this tutorial, you will learn how to install Portainer on Rocky Linux. Portainer<\/a> is a self-service container service delivery platform that provides container management GUI for Kubernetes, Docker and Swarm<\/em>.<\/p>\n\n\n\n Portainer is available as both Community Edition and Business Edition. We will be installing the Community Edition in this guide.<\/p>\n\n\n\n There are different environments in which you can deploy Portainer;<\/p>\n\n\n\n We will learn how to install Portainer as a standalone Docker container.<\/p>\n\n\n\n You can also check how to setup Portainer with SSL certificates by following the link below;<\/p>\n\n\n\n Setup Portainer with SSL Certificates<\/a><\/p>\n\n\n\n To begin with, you need to install Docker on Rocky Linux by running the commands below;<\/p>\n\n\n\n Disable container-tools module which provides runc which conflicts with podman\/containerd.io<\/p>\n\n\n\n Then install Docker ce on Rocky Linux.<\/p>\n\n\n\n Start and enable Docker to run on system boot;<\/p>\n\n\n\n Once the Docker is in place, it is now time to deploy Portainer on Rocky Linux.<\/p>\n\n\n\n To begin with, you need to create Portainer server data volume. Please note that Portainer requires persistent storage<\/a> in order to maintain the database and configuration information it needs to function<\/em>.<\/p>\n\n\n\n You can create a Docker volume using the command;<\/p>\n\n\n\n For example, to create a volume called You can confirm the volumes by listing them;<\/p>\n\n\n\n Sample output;<\/p>\n\n\n\n The voume is created under the Docker host path, \/var\/lib\/docker\/volumes\/<\/strong>. See the output from the command below;<\/p>\n\n\n\n Next, download and install Portainer server Docker container on Rocky Linux;<\/p>\n\n\n\n Demystifying the Docker command line options used above;<\/p>\n\n\n\n Read more on Sample output from the command above;<\/p>\n\n\n\n Portainer server should now be running.<\/p>\n\n\n\n You can list running Docker container using the command;<\/p>\n\n\n\n Sample output;<\/p>\n\n\n\n You can confirm that actually, the Portainer server UI port is opened on the host as well.<\/p>\n\n\n\n Portainer server web services is exposed to the Docker host on port 9443\/TCP.<\/p>\n\n\n\n In order to access Portainer server UI, then navigate to the browser and enter the address If Firewall is running, ensure that your open port 9443\/TCP to allow external access to Portainer web service.<\/p>\n\n\n\n Accept the self-signed SSL exception and proceed to Portainer server web interface.<\/p>\n\n\n\n Create Admin user and password by entering password and click Create User.<\/strong><\/p>\n\n\n\n You should then land on the Portainer server web interface.<\/p>\n\n\n\n Home;<\/p>\n\n\n\n Local environment Dashboard;<\/p>\n\n\n\n And there you go. That concludes our guide on how to install Portainer as a standalone Docker.<\/p>\n\n\n\n Portainer Documentation<\/a><\/p>\n\n\n\n Install Portainer on Ubuntu 22.04<\/a><\/p>\n\n\n\n Install Portainer on Debian 11\/Debian 10<\/a><\/p>\n\n\n\n Install and Run MariaDB as a Docker Container<\/a><\/p>\n\n\n\nInstall Portainer on Rocky Linux<\/h2>\n\n\n\n
\n
Install Docker on Rocky Linux<\/h3>\n\n\n\n
dnf config-manager --add-repo=https:\/\/download.docker.com\/linux\/centos\/docker-ce.repo<\/code><\/pre>\n\n\n\n
dnf -y module disable container-tools<\/code><\/pre>\n\n\n\n
dnf install docker-ce docker-ce-cli containerd.io<\/code><\/pre>\n\n\n\n
systemctl enable --now docker<\/code><\/pre>\n\n\n\n
Create Portainer Server Docker Data Volume<\/h3>\n\n\n\n
docker volume create [OPTIONS] [VOLUME-NAME]<\/code><\/pre>\n\n\n\n
pt_data<\/code><\/strong>, you can use the command. Name can be anything of your preference.<\/p>\n\n\n\n
docker volume create pt_data<\/code><\/pre>\n\n\n\n
docker volume ls<\/code><\/pre>\n\n\n\n
DRIVER VOLUME NAME\nlocal pt_data<\/code><\/pre>\n\n\n\n
docker volume inspect pt_data<\/code><\/pre>\n\n\n\n
[\n {\n \"CreatedAt\": \"2022-06-11T01:24:00-04:00\",\n \"Driver\": \"local\",\n \"Labels\": {},\n \"Mountpoint\": \"\/var\/lib\/docker\/volumes\/pt_data\/_data\",\n \"Name\": \"pt_data\",\n \"Options\": {},\n \"Scope\": \"local\"\n }\n]\n<\/code><\/pre>\n\n\n\n
Install Portainer<\/h3>\n\n\n\n
docker run -d -p 8000:8000 -p 9443:9443 --name portainer \\\n--restart=always -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\\n-v pt_data<\/strong>:\/data portainer\/portainer-ce:latest<\/code><\/pre>\n\n\n\n
\n
9443<\/code> for the UI and API and on an optional port TCP
8000<\/code>, which is only required if using Edge Compute features with Edge Agents.<\/li>\n\n\n\n
9001<\/code><\/li>\n<\/ul>\n\n\n\n
\n
-d\/--detach<\/code><\/strong>: Causes the container in background and print container ID<\/li>\n\n\n\n
-p\/--publish<\/strong><\/code>: Exposes\/Publishes a container’s port(s) to the host.\n
\n
--name<\/code><\/strong>: Assign a name to the container.<\/li>\n\n\n\n
--restart<\/strong><\/code>: Restart policy to apply when a container exits (default “no”)\n
\n
-v\/--volume<\/code><\/strong>: Bind mount a Docker container volume.\n
\n
-v \/var\/run\/docker.sock:\/var\/run\/docker.sock<\/code><\/strong>: This causes the Portainer Server container process to communicate with the main host Docker process.<\/li>\n\n\n\n
-v pt_data:\/data<\/code><\/strong>: Mounts the Portainer Server container data,
\/data<\/code><\/strong>, to the host path
\/var\/lib\/docker\/volumes\/pt_data<\/code><\/strong>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n
portainer\/portainer-ce:latest<\/code><\/strong>.<\/li>\n<\/ul>\n\n\n\n
docker run --help<\/code>.<\/p>\n\n\n\n
Unable to find image 'portainer\/portainer-ce:latest' locally\nlatest: Pulling from portainer\/portainer-ce\n772227786281: Pull complete \n96fd13befc87: Pull complete \ndc6f8e90d5b4: Pull complete \n0e84c6386ab3: Pull complete \nDigest: sha256:52f9fdee1e4acfb1b5c4ddd15c88905287efb6e8f8058d2c5a2543ddc72e9dc0\nStatus: Downloaded newer image for portainer\/portainer-ce:latest\n521fb09ed7c7daa9241c85e469928e232d5034edb6d8ec4b89d3ba4e5fc601eb\n<\/code><\/pre>\n\n\n\n
docker ps<\/code><\/pre>\n\n\n\n
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES\n72e109adcd89 portainer\/portainer-ce:latest \"\/portainer\" About a minute ago Up About a minute 0.0.0.0:8000->8000\/tcp, :::8000->8000\/tcp, 0.0.0.0:9443->9443\/tcp, :::9443->9443\/tcp, 9000\/tcp portainer\n<\/code><\/pre>\n\n\n\n
ss -altnp | grep 9443<\/code><\/pre>\n\n\n\n
LISTEN 0 128 0.0.0.0:9443 0.0.0.0:* users:((\"docker-proxy\",pid=13560,fd=4)) \nLISTEN 0 128 [::]:9443 [::]:* users:((\"docker-proxy\",pid=13566,fd=4))\n<\/code><\/pre>\n\n\n\n
Accessing Portainer Server Web Interface<\/h3>\n\n\n\n
https:\/\/docker-domain-or-IP:9443<\/strong><\/code><\/p>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
<\/figure><\/a><\/div>\n\n\n\n
Further Reading<\/h3>\n\n\n\n
Other Tutorials<\/h3>\n\n\n\n