Portainer on Ubuntu 24.04 (Docker + HTTPS)

Portainer is a lightweight, open-source container management platform that provides a user-friendly web interface for Docker, Docker Compose, Kubernetes, and Swarm. It allows you to deploy, monitor, and manage containers, networks, and volumes without needing to work directly with the Docker CLI. Portainer simplifies container administration while maintaining the flexibility and control of Docker’s core ecosystem.

Running Portainer on Ubuntu 24.04 LTS (Noble Numbat) ensures long-term stability, security, and up-to-date software support. Ubuntu 24.04 ships with systemd 255, OpenSSL 3, and modern Docker packages, making it an ideal environment for managing self-hosted applications and services at scale.


Architecture Overview

LayerComponentRole
OSUbuntu 24.04 LTSSecure, long-term supported base system
Container RuntimeDocker EngineRuns all managed containers and Portainer itself
Management UIPortainer Server + AgentProvides web dashboard and controls for Docker and Kubernetes
Reverse ProxyNginx (optional)Enables HTTPS, routing, and access control for the dashboard
TLSLet’s Encrypt / PKIProvides secure HTTPS access

Why Use Portainer?

  • Web-based Docker management – manage containers, images, volumes, and networks visually.
  • Multi-environment support – control Docker, Swarm, and Kubernetes from one interface.
  • Role-based access control (RBAC) – define user permissions securely.
  • Stack and service deployment – deploy Docker Compose files directly from the UI.
  • Lightweight and fast – runs as a single container with minimal resource usage.
  • Secure by design – supports HTTPS, LDAP integration, and granular user control.

Portainer Editions

EditionDescriptionUse Case
Portainer CE (Community Edition)Free and open-source version with full Docker management capabilities.Personal projects, home labs, small servers.
Portainer BE (Business Edition)Enterprise version with RBAC, registry management, and advanced features.Production environments and enterprise teams.

Security & Best Practices

  • Run Portainer behind Nginx with HTTPS or enable built-in TLS support.
  • Use strong admin credentials and disable the default setup page after configuration.
  • Restrict Portainer access using UFW or reverse proxy rules.
  • Keep Docker Engine and Portainer images updated regularly.
  • Use LDAP or OAuth for centralized authentication (Business Edition).
  • Avoid running Portainer as root; use a dedicated Docker user group if needed.
  • Regularly back up Portainer’s data volume (portainer_data) for disaster recovery.

Typical Use Cases

  • Developers managing local or remote Docker containers.
  • System administrators overseeing multiple servers and stacks.
  • Home labs and self-hosted enthusiasts simplifying container deployments.
  • Enterprise DevOps teams standardizing container management across environments.
  • Educational environments teaching containerization with an accessible UI.

Deploying Portainer on Ubuntu 24.04 gives you a powerful, secure, and intuitive web-based control panel for Docker and Kubernetes — enabling teams to manage infrastructure easily while maintaining full operational visibility.


Step 1: Create a Server Instance on Shape.Host

To get started, create a new server instance on Shape.Host:

Log in to your Shape.Host account.

Click Create → Instance.

Shape.host Resources dashboard with Create > Instance highlighted.

Choose your preferred data-center location.

Shape.host instance form with the data center location selector highlighted.

Select a plan with at least 2 CPUs, 2 GB RAM, and 20 GB SSD (recommended).

Choose Ubuntu 24.04 (64-bit) as the operating system.

Shape.host instance form with the operating system image selector highlighted.

Click Create Instance.

Shape.host instance form with the Create Instance button highlighted.

After creation, copy your instance’s public IP address from the Resources section.

Shape.host Resources dashboard with the server IP address highlighted.

Step 2: Connect to Your Server

  • Linux / macOS: ssh root@your_server_ip
  • Windows (PuTTY):
    1. Open PuTTY.
    2. Enter your Shape.Host IP.
    3. Select SSH and click Open.
    4. Log in using your server credentials.

Step 3: Install Docker Engine

Update your system packages:

apt update
Terminal showing APT package management commands and output.

Install essential dependencies:

apt-get install apt-transport-https ca-certificates curl gnupg lsb-release

These packages enable secure package downloads and repository management.

Terminal showing APT package management commands and output.

Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

This ensures Docker packages are verified before installation.

Add Docker’s stable repository:

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

Update the repositories again to include Docker’s packages:

apt update
Terminal showing APT package management commands and output.

Install Docker Engine and its dependencies:

apt-get install docker-ce docker-ce-cli containerd.io
  • docker-ce → the core Docker Engine.
  • docker-ce-cli → command-line interface for managing containers.
  • containerd.io → container runtime responsible for running containers.
Terminal showing APT package management commands and output.

Enable and start the Docker service:

systemctl start docker
systemctl enable docker

Step 4: Install Docker Compose

Download Docker Compose binary (v 1.21.2 in this example):

curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose

Make it executable:

chmod +x /usr/local/bin/docker-compose

You can now verify the installation:

docker-compose --version

Step 5: Deploy Portainer

1. Create a Docker volume for Portainer data

docker volume create portainer_data

This stores all Portainer configuration data, ensuring persistence across container restarts.

2. Run the Portainer container

docker run -d -p 9000:9000 -p 8000:8000 --name portainer --restart always \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /srv/portainer:/data portainer/portainer-ce

Explanation:

  • -d → runs the container in the background.
  • -p 9000:9000 → web UI port.
  • -p 8000:8000 → Portainer agent communication port.
  • --restart always → ensures Portainer starts automatically after reboot.
  • -v /var/run/docker.sock → lets Portainer communicate with Docker Engine.
  • -v /srv/portainer:/data → stores Portainer’s persistent data.
Terminal showing systemd service management commands or output.

Step 6: Access Portainer Web Interface

Once the container is running, open your browser and visit:

http://YOUR_SERVER_IP:9000

The first time you access Portainer, you’ll be prompted to:

  • Create an admin password.
  • Choose to manage a local Docker environment (select Local).

You can now manage containers, images, networks, and volumes directly from the web UI.

Portainer account creation form.
Portainer setup interface.

You’ve successfully installed Portainer CE on Ubuntu 24.04!
Portainer provides an intuitive web interface for managing Docker containers and simplifies your DevOps workflow.

For maximum performance and reliability, host your container workloads on a Shape.Host Cloud VPS — optimized for Docker, Portainer, and other container-based environments.