Installation Guide for Docker & Portainer on Fastpanel using Reverse Proxy (Ubuntu 24.04)

If you are using Fastpanel to manage VPS, you will find it great for PHP/WordPress websites. However, if you want to run other modern applications (like n8n, Nextcloud, Node.js…) then Docker is the best solution.

The only issue is that Fastpanel has occupied ports 80 and 443. So how to access the Docker management interface (Portainer) using a standard SSL domain name (e.g.: portainer.dps.media) without typing IP:9443?

This article will guide you from A-Z on how to install Docker, Portainer and configure Reverse Proxy directly on Fastpanel (Native) on Ubuntu 24.04 platform.


Step 1: Install Docker on VPS

First, you need to SSH into the VPS with root privileges and run the official Docker installation command.

1. Update system:

Bash

apt update && apt upgrade -y

2. Install Docker (Automatic script):

Bash

curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh

After installation, you can check if Docker is running with the command docker -v.


Step 2: Install Portainer (Docker management interface)

Instead of typing commands, we will install Portainer CE to manage containers through an intuitive web interface.

1. Create data storage space (Volume):

Bash

docker volume create portainer_data

2. Run Portainer container:

Bash

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:latest

At this point, Portainer is running on port 9443 (HTTPS).


Step 3: Configure Reverse Proxy on Fastpanel

This is the most important step to expose Portainer to the internet using your domain name.

  1. Log in to Fastpanel.
  2. Click the “Create Site” button” (Create website).
  3. Select website type as “Reverse Proxy”.
  4. Fill in the information:
    • Domain: Enter your subdomain (e.g.: ptn266.dpsmedia.vn).
    • Upstream address (Target): Enter https://127.0.0.1:9443
    • Note: Must have https:// because Portainer runs securely by default.

⚠️ Important Note (Do not skip)

After creating the site, the Portainer interface may have display errors (white page or missing icons). You need to fix it as follows:

  1. Go to the settings of the newly created site (Settings).
  2. Find the section “Static Content”.
  3. TURN OFF (Disable) the line: “Use NGINX for static files”.
    • Reason: Fastpanel by default will look for images/css on the server hard drive instead of fetching from the Docker container, so we need to disable it so that all requests go through Docker.

After that, go to the section SSL Certificates and install free Let's Encrypt SSL as usual.


Step 4: Handle “Instance timed out” error (If encountered)

When accessing the domain name for the first time, if you see the message:

“Your Portainer instance timed out for security purposes…”

Don't worry, this is a Portainer security feature if you don't create an Admin account within 5 minutes after installation.

How to fix: Go back to SSH and run the restart command:

Bash

docker restart portainer

Then immediately F5 the browser and create an Admin account.


Conclusion

Done! Now you have a powerful system Fastpanel that can run traditional web as well as the ecosystem Docker through the interface Portainer extremely professional.

Advantages of this method:

  • No need to install additional Nginx Proxy Manager (since Fastpanel has handled it).
  • Utilize Fastpanel's free SSL certificates.
  • More secure because no need to open port 9443 outside the firewall.

Wish you success! If you have any questions, please leave a comment below.


Source: Compiled from real practical experience from dps.media

DPS.MEDIA