{"id":34281,"date":"2025-12-06T21:40:53","date_gmt":"2025-12-06T14:40:53","guid":{"rendered":"https:\/\/dps.media\/?p=34281"},"modified":"2025-12-06T21:40:55","modified_gmt":"2025-12-06T14:40:55","slug":"guide-to-installing-docker-portainer-on-fastpanel-using-reverse-proxy-ubuntu-24-5","status":"publish","type":"post","link":"https:\/\/dps.media\/en\/huong-dan-cai-dat-docker-portainer-tren-fastpanel-su-dung-reverse-proxy-ubuntu-24-04\/","title":{"rendered":"Installation Guide for Docker &amp; Portainer on Fastpanel using Reverse Proxy (Ubuntu 24.04)"},"content":{"rendered":"<p class=\"wp-block-paragraph\">If you are using <strong>Fastpanel<\/strong> 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\u2026) then <strong>Docker<\/strong> is the best solution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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.: <code data-no-translation=\"\">portainer.dps.media<\/code>) without typing <code data-no-translation=\"\">IP:9443<\/code>?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article will guide you from A-Z on how to install Docker, Portainer and configure <strong>Reverse Proxy directly on Fastpanel<\/strong> (Native) on Ubuntu 24.04 platform.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Install Docker on VPS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">First, you need to SSH into the VPS with <code data-no-translation=\"\">root<\/code> privileges and run the official Docker installation command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Update system:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code data-no-translation=\"\">apt update &amp;&amp; apt upgrade -y\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Install Docker (Automatic script):<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code data-no-translation=\"\">curl -fsSL https:\/\/get.docker.com -o get-docker.sh\nsh get-docker.sh\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After installation, you can check if Docker is running with the command <code data-no-translation=\"\">docker -v<\/code>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Install Portainer (Docker management interface)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of typing commands, we will install <strong>Portainer CE<\/strong> to manage containers through an intuitive web interface.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>1. Create data storage space (Volume):<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code data-no-translation=\"\">docker volume create portainer_data\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>2. Run Portainer container:<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code data-no-translation=\"\">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\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">At this point, Portainer is running on port <code data-no-translation=\"\">9443<\/code> (HTTPS).<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Configure Reverse Proxy on Fastpanel<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">This is the most important step to expose Portainer to the internet using your domain name.<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Log in to <strong>Fastpanel<\/strong>.<\/li>\n\n\n\n<li>Click the <strong>\u201cCreate Site\u201d button\u201d<\/strong> (Create website).<\/li>\n\n\n\n<li>Select website type as <strong>\u201cReverse Proxy\u201d<\/strong>.<\/li>\n\n\n\n<li>Fill in the information:\n<ul class=\"wp-block-list\">\n<li><strong>Domain:<\/strong> Enter your subdomain (e.g.: <code data-no-translation=\"\">ptn266.dpsmedia.vn<\/code>).<\/li>\n\n\n\n<li><strong>Upstream address (Target):<\/strong> Enter <code data-no-translation=\"\">https:\/\/127.0.0.1:9443<\/code><\/li>\n\n\n\n<li><em>Note: Must have <code data-no-translation=\"\">https:\/\/<\/code> because Portainer runs securely by default.<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u26a0\ufe0f Important Note (Do not skip)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">After creating the site, the Portainer interface may have display errors (white page or missing icons). You need to fix it as follows:<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Go to the settings of the newly created site (Settings).<\/li>\n\n\n\n<li>Find the section <strong>\u201cStatic Content\u201d<\/strong>.<\/li>\n\n\n\n<li><strong>TURN OFF<\/strong> (Disable) the line: <strong>\u201cUse NGINX for static files\u201d<\/strong>.\n<ul class=\"wp-block-list\">\n<li><em>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.<\/em><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">After that, go to the section <strong>SSL Certificates<\/strong> and install free Let's Encrypt SSL as usual.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Handle \u201cInstance timed out\u201d error (If encountered)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When accessing the domain name for the first time, if you see the message:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><em>\u201cYour Portainer instance timed out for security purposes\u2026\u201d<\/em><\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">Don't worry, this is a Portainer security feature if you don't create an Admin account within 5 minutes after installation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>How to fix:<\/strong> Go back to SSH and run the restart command:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Bash<\/p>\n\n\n\n<pre class=\"wp-block-code\" data-no-translation=\"\"><code data-no-translation=\"\">docker restart portainer\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Then immediately F5 the browser and create an Admin account.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Done! Now you have a powerful system <strong>Fastpanel<\/strong> that can run traditional web as well as the ecosystem <strong>Docker<\/strong> through the interface <strong>Portainer<\/strong> extremely professional.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Advantages of this method:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>No need to install additional Nginx Proxy Manager (since Fastpanel has handled it).<\/li>\n\n\n\n<li>Utilize Fastpanel's free SSL certificates.<\/li>\n\n\n\n<li>More secure because no need to open port 9443 outside the firewall.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Wish you success! If you have any questions, please leave a comment below.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Source: Compiled from practical experience by dps.media<\/em><\/p>","protected":false},"excerpt":{"rendered":"<p>N\u1ebfu b\u1ea1n \u0111ang s\u1eed d\u1ee5ng Fastpanel \u0111\u1ec3 qu\u1ea3n l\u00fd VPS, b\u1ea1n s\u1ebd th\u1ea5y n\u00f3 r\u1ea5t tuy\u1ec7t v\u1eddi cho c\u00e1c website PHP\/WordPress. Tuy nhi\u00ean, n\u1ebfu b\u1ea1n mu\u1ed1n ch\u1ea1y th\u00eam c\u00e1c \u1ee9ng d\u1ee5ng hi\u1ec7n \u0111\u1ea1i kh\u00e1c (nh\u01b0 n8n, Nextcloud, Node.js&#8230;) th\u00ec Docker l\u00e0 gi\u1ea3i ph\u00e1p t\u1ed1t nh\u1ea5t. V\u1ea5n \u0111\u1ec1 duy nh\u1ea5t l\u00e0 Fastpanel \u0111\u00e3 chi\u1ebfm d\u1ee5ng c\u1ed5ng [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":34282,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"rs_blank_template":"","rs_page_bg_color":"","slide_template_v7":"","footnotes":""},"categories":[1,1621],"tags":[],"class_list":["post-34281","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","category-fastpanel"],"acf":[],"rankmath_keywords":{"primary":"","secondary":[""]},"yoast_keywords":{"primary":"","secondary":[]},"yoast_focuskw":"","rankmath_focuskw":"","seo_keywords":{"primary":"","secondary":[""]},"_links":{"self":[{"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/posts\/34281","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/comments?post=34281"}],"version-history":[{"count":0,"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/posts\/34281\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/media\/34282"}],"wp:attachment":[{"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/media?parent=34281"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/categories?post=34281"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dps.media\/en\/wp-json\/wp\/v2\/tags?post=34281"}],"curies":[{"name":"Agency collaboration cost optimization strategy","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}