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.
- Log in to Fastpanel.
- Click the “Create Site” button” (Create website).
- Select website type as “Reverse Proxy”.
- 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.
- Domain: Enter your subdomain (e.g.:
⚠️ 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:
- Go to the settings of the newly created site (Settings).
- Find the section “Static Content”.
- 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 practical experience by dps.media
Ý kiến bạn đọc (8)
Đăng nhập để bình luận
Đăng nhập nhanh 1-chạm bằng Google để chia sẻ ý kiến của bạn về bài viết.
Bằng cách đăng nhập, bạn đồng ý với điều khoản và chính sách cộng đồng.
If Portainer already runs HTTPS on 9443, is Fastpanel reverse proxying through https://127.0.0.1:9443 likely to run into certificate or timeout errors? I find this part quite tricky to deploy in practice.
You may run into this, especially when a reverse proxy doesn't trust Portainer's self-signed certificate. If you get a timeout, first check that the container is listening on the correct port, along with the firewall and proxy configuration, before changing the port.
We have run into cases where internal access works but the domain times out. Check the proxy logs and container status first, and don't rush to install Nginx, since Fastpanel already handles the reverse proxy layer.
Running Docker and Fastpanel on the same VPS is quite convenient, but you should pay attention to the firewall and Docker socket permissions. Just because it runs after installation doesn't mean it's safe to make public right away.
I have a question: how much do resources matter when running Portainer on a VPS that already has Fastpanel? My VPS has 2 CPUs and 4 GB RAM and runs several WordPress websites. Would adding Docker and Portainer be okay?
Portainer itself is not very heavy; what matters more is the containers you run afterward. With 2 CPUs and 4 GB RAM, it can still run well if the Docker applications are given reasonable resource limits.
Using HTTPS for the upstream is the step we most often forget. If this article added how to check whether port 9443 is listening, newcomers would find it easier to follow.
If you only manage a few containers, Portainer is quite manageable and saves you from having to remember too many Docker commands. Most importantly, back up your volumes before tinkering with configurations.
Chưa có bình luận nào. Hãy là người đầu tiên chia sẻ cảm nghĩ!
Đăng nhập / Tạo tài khoản
Đăng nhập với Google để gửi bình luận và tương tác cùng cộng đồng.
Tiếp tục là đồng ý với điều khoản sử dụng và chính sách bảo mật của DPS Media.