Install Portainer CE with Docker on Linux

Link: https://docs.portainer.io/start/install-ce/server/docker/linux 
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 your Linux environment. To add a new Linux environment to an existing Portainer Server installation, please refer to the Portainer Agent installation instructions.
To get started, you will need:
The installation instructions also make the following assumptions about your environment:
Deployment
First, create the volume that Portainer Server will use to store its database:
docker volume create portainer_data
Then, download and install the Portainer Server container:
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:2.21.0

By default, Portainer generates and uses a self-signed SSL certificate to secure port 9443. Alternatively you can provide your own SSL certificate during installation or via the Portainer UI after installation is complete.
If you require HTTP port 9000 open for legacy reasons, add the following to your docker run command:
-p 9000:9000
Portainer Server has now been installed. You can check to see whether the Portainer Server container has started by running docker ps:
root@server:~# docker ps
CONTAINER ID   IMAGE                          COMMAND                  CREATED       STATUS      PORTS                                                                                  NAMES             
de5b28eb2fa9   portainer/portainer-ce:2.21.0  "/portainer"             2 weeks ago   Up 9 days   0.0.0.0:8000->8000/tcp, :::8000->8000/tcp, 0.0.0.0:9443->9443/tcp, :::9443->9443/tcp   portainer

Logging In
Now that the installation is complete, you can log into your Portainer Server instance by opening a web browser and going to:
https://localhost:9443
Replace localhost with the relevant IP address or FQDN if needed, and adjust the port if you changed it earlier.
You will be presented with the initial setup page for Portainer Server.

Revision #1
Created 6 September 2024 00:26:28 by Administrador
Updated 6 September 2024 00:36:44 by Administrador