{"id":602,"date":"2025-12-29T10:23:16","date_gmt":"2025-12-29T09:23:16","guid":{"rendered":"https:\/\/peter.otten.nu\/?p=602"},"modified":"2025-12-29T10:24:28","modified_gmt":"2025-12-29T09:24:28","slug":"install-portainer-ce-with-docker-on-linux","status":"publish","type":"post","link":"https:\/\/peter.otten.nu\/?p=602","title":{"rendered":"Install Portainer CE with Docker on Linux"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"introduction\">These installation instructions are for Portainer Community Edition (CE). For Portainer Business Edition (BE) refer to the BE install documentation.<a href=\"https:\/\/docs.portainer.io\/start\/install-ce\/server\/docker\/linux#introduction\"><\/a><\/h2>\n\n\n\n<p id=\"introduction\">Introduction<\/p>\n\n\n\n<p>Portainer consists of two elements, the <em>Portainer Server<\/em>, and the <em>Portainer Agent<\/em>. Both elements run as lightweight Docker containers on a Docker engine. This document will help you install the Portainer Server container on your Linux environment. To add a new Linux environment to an existing Portainer Server installation, please refer to the <a href=\"https:\/\/docs.portainer.io\/admin\/environments\/add\/docker\/agent\">Portainer Agent installation instructions<\/a>.<\/p>\n\n\n\n<p>To get started, you will need:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The latest <a href=\"https:\/\/docs.portainer.io\/start\/requirements-and-prerequisites\">supported<\/a> version of Docker installed and working. We recommend following the <a href=\"https:\/\/docs.docker.com\/engine\/install\/\">official installation instructions<\/a> for Docker &#8211; in particular, we advise <em>against<\/em> installing Docker via snap on Ubuntu distributions as you may run into compatibility issues.<\/li>\n\n\n\n<li>sudo access on the machine that will host your Portainer Server instance<\/li>\n\n\n\n<li>By default, Portainer Server will expose the UI over port <code>9443<\/code> and expose a TCP tunnel server over port <code>8000<\/code>. The latter is optional and is only required if you plan to use the Edge compute features with Edge agents.<\/li>\n<\/ul>\n\n\n\n<p>The installation instructions also make the following assumptions about your environment:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Your environment meets <a href=\"https:\/\/docs.portainer.io\/start\/requirements-and-prerequisites\">our requirements<\/a>. While Portainer may work with other configurations, it may require configuration changes or have limited functionality.<\/li>\n\n\n\n<li>You are accessing Docker via Unix sockets. Alternatively, you can also connect via TCP.<\/li>\n\n\n\n<li>SELinux is disabled on the machine running Docker. If you require SELinux, you will need to pass the <code>--privileged<\/code> flag to Docker when deploying Portainer.<\/li>\n\n\n\n<li>Docker is running as root. Portainer with rootless Docker has some limitations, and requires additional configuration.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"deployment\"><a href=\"https:\/\/docs.portainer.io\/start\/install-ce\/server\/docker\/linux#deployment\"><\/a>Deployment<\/h2>\n\n\n\n<p>You can choose to deploy Portainer using <code>docker run<\/code> or via Docker Compose.docker runDocker Compose<\/p>\n\n\n\n<p>To install using Docker Compose, download the compose file using the following <code>curl<\/code> command:Copy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -L https:\/\/downloads.portainer.io\/ce-lts\/portainer-compose.yaml -o portainer-compose.yaml<\/code><\/pre>\n\n\n\n<p>Alternatively, create a <code>portainer-compose.yaml<\/code> file with the following contents:Copy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>services:\n  portainer:\n    container_name: portainer\n    image: portainer\/portainer-ce:lts\n    restart: always\n    volumes:\n      - \/var\/run\/docker.sock:\/var\/run\/docker.sock\n      - portainer_data:\/data\n    ports:\n      - 9443:9443\n      - 8000:8000  # Remove if you do not intend to use Edge Agents\n\nvolumes:\n  portainer_data:\n    name: portainer_data\n\nnetworks:\n  default:\n    name: portainer_network<\/code><\/pre>\n\n\n\n<p>Once you have created or downloaded the compose file, you can deploy it with the following command:Copy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose -f portainer-compose.yaml up -d<\/code><\/pre>\n\n\n\n<p>Docker Compose will create the necessary resources and deploy Portainer. You can check to see whether the Portainer Server container has started by running <code>docker ps<\/code>:Copy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@server:~# docker ps\nCONTAINER ID   IMAGE                        COMMAND        CREATED         STATUS         PORTS                                                                                                NAMES\n7963585688a9   portainer\/portainer-ce:lts   \"\/portainer\"   8 seconds ago   Up 8 seconds   0.0.0.0:8000-&gt;8000\/tcp, &#91;::]:8000-&gt;8000\/tcp, 0.0.0.0:9443-&gt;9443\/tcp, &#91;::]:9443-&gt;9443\/tcp, 9000\/tcp   portainer<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"logging-in\"><a href=\"https:\/\/docs.portainer.io\/start\/install-ce\/server\/docker\/linux#logging-in\"><\/a>Logging In<\/h2>\n\n\n\n<p>Now that the installation is complete, you can log into your Portainer Server instance by opening a web browser and going to:Copy<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;localhost:9443<\/code><\/pre>\n\n\n\n<p>Replace <code>localhost<\/code> with the relevant IP address or FQDN if needed, and adjust the port if you changed it earlier.<\/p>\n\n\n\n<p>You will be presented with the initial setup page for Portainer Server.<a href=\"https:\/\/docs.portainer.io\/start\/install-ce\/server\/setup\">Initial setup<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>These installation instructions are for Portainer Community Edition (CE). For Portainer Business Edition (BE) refer to the BE install documentation. Introduction Portainer consists of two elements, the Portainer Server, and the Portainer Agent. Both elements run as lightweight Docker containers on a Docker engine. This document will help you install the Portainer Server container on &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/peter.otten.nu\/?p=602\" class=\"more-link\">Lees verder <span class=\"screen-reader-text\">&#8220;Install Portainer CE with Docker on Linux&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wprm-recipe-roundup-name":"","wprm-recipe-roundup-description":"","footnotes":""},"categories":[147],"tags":[],"class_list":["post-602","post","type-post","status-publish","format-standard","hentry","category-huis-automation"],"_links":{"self":[{"href":"https:\/\/peter.otten.nu\/index.php?rest_route=\/wp\/v2\/posts\/602","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peter.otten.nu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peter.otten.nu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peter.otten.nu\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/peter.otten.nu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=602"}],"version-history":[{"count":1,"href":"https:\/\/peter.otten.nu\/index.php?rest_route=\/wp\/v2\/posts\/602\/revisions"}],"predecessor-version":[{"id":603,"href":"https:\/\/peter.otten.nu\/index.php?rest_route=\/wp\/v2\/posts\/602\/revisions\/603"}],"wp:attachment":[{"href":"https:\/\/peter.otten.nu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=602"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peter.otten.nu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=602"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peter.otten.nu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=602"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}