Deployment Overview of Portainer on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met by the host server:
-
Operating System: Compatible with Debian-based (Ubuntu, Debian) or RHEL-based (CentOS, Rocky Linux, AlmaLinux) distributions.
-
Privileges: Root or sudo access is required for package installation and service management.
-
Network Access: The server must have outbound internet access to download Docker packages and the Portainer image.
FQDN of the final panel on the hostkey.in domain¶
The following table describes the domain template used for this deployment:
| Parameter | Value | | Prefix | docker | | Domain | hostkey.in | | Full template | docker{Server_ID_from_Invapi}.hostkey.in |
Application installation process¶
The application is deployed using a multi-step installation process that varies depending on the operating system:
For Debian/Ubuntu systems:
-
The system updates the APT package cache and upgrades existing packages to their latest versions.
-
Essential dependencies are installed, including
ca-certificates,curl, andgnupg. -
Docker engine is installed via the official repository.
-
Python tools (
python3-pip,python3-requests,python3-docker) are installed to facilitate management. -
A specific version of the
requestslibrary (2.31.0) is pinned to ensure compatibility with the Docker SDK for Python.
For RHEL/CentOS/Rocky/AlmaLinux systems:
-
The official Docker GPG key and repository are added to the system.
-
Core packages including
docker-ce,docker-ce-cli,containerd.io,docker-buildx-plugin, anddocker-compose-pluginare installed. -
Network utilities like
net-toolsandbind-utilsare included. -
Python management tools (
python3-pip) and the Docker SDK for Python are installed viapip.
Common Steps:
-
A custom
daemon.jsonconfiguration file is applied to/etc/docker/. -
The Docker service is enabled and started.
-
The Portainer container is pulled and launched.
Access Rights and Security¶
-
Service Management: The Docker daemon is configured to start automatically upon system boot.
-
Container Isolation: The application runs within a Docker container, utilizing the host's Docker socket for management capabilities.
-
Configuration Permissions: The
/etc/docker/daemon.jsonfile is owned byrootwith permissions set to0644.
Docker Containers and Their Deployment¶
The deployment consists of one primary application container:
| Container Name | Image | Ports | Volumes | Restart Policy |
|---|---|---|---|---|
portainer | portainer/portainer-ce | 9000:9000 | /var/run/docker.sock:/var/run/docker.sock | always |
Application Update Instructions¶
To update the Portainer application, perform the following steps to pull the latest image and recreate the container:
If you are running the container manually via command line, you must stop and remove the existing container before pulling the new image.
Location of configuration files and data¶
-
Docker Configuration:
/etc/docker/daemon.json -
Container Runtime Data: Managed by Docker (typically in
/var/lib/docker/) -
Portainer Data: Persistent storage is managed within the container volumes.
Available ports for connection¶
| Port | Service | Description |
|---|---|---|
9000 | Portainer Web UI | The primary web interface for managing Docker environments. |