{"id":4347,"date":"2026-09-12T16:12:34","date_gmt":"2026-09-12T10:42:34","guid":{"rendered":"https:\/\/cpanelfree.com\/blog\/how-to-setup-coolify-ubuntu-vps-one-click-deploy\/"},"modified":"2026-09-12T16:13:39","modified_gmt":"2026-09-12T10:43:39","slug":"how-to-setup-coolify-ubuntu-vps-one-click-deploy","status":"publish","type":"post","link":"https:\/\/cpanelfree.com\/blog\/how-to-setup-coolify-ubuntu-vps-one-click-deploy\/","title":{"rendered":"How to Set Up Coolify on Ubuntu VPS: Deploy Node, Python &amp; PHP in 1-Click"},"content":{"rendered":"<p>For developers, agencies, and startup teams, modern deployment agility is non-negotiable. However, recurring SaaS subscriptions from commercial cloud providers quickly accumulate, often costing hundreds of dollars monthly for basic build pipelines, preview environments, and hosted databases. By deploying <strong>Coolify<\/strong>\u2014the open-source, self-hosted alternative to Heroku, Netlify, and Vercel\u2014on a dedicated <a href=\"https:\/\/cpanelfree.com\/\">Linux VPS<\/a>, you gain an enterprise-grade cloud platform under your absolute control.<\/p>\n<p>Coolify allows you to connect GitHub, GitLab, or raw Git repositories, automatically build applications using Dockerfiles or Nixpacks, provision Let\u2019s Encrypt SSL certificates automatically, and launch managed databases (PostgreSQL, MySQL, Redis, MongoDB) with a single click. This tutorial covers system preparation, firewall configuration, automated installation, GitHub app integration, and multi-service deployment.<\/p>\n<h2>1. Minimum Server Specifications &amp; Prerequisites<\/h2>\n<p>To ensure smooth build operations and runtime container execution, ensure your VPS meets these baseline recommendations:<\/p>\n<ul>\n<li><strong>Operating System:<\/strong> Ubuntu 24.04 LTS or 22.04 LTS (clean minimal installation).<\/li>\n<li><strong>vCPU:<\/strong> Minimum 2 cores (4+ cores recommended if compiling intensive Next.js or Rust builds).<\/li>\n<li><strong>Memory:<\/strong> Minimum 2GB RAM (4GB or 8GB strongly recommended to prevent build-time memory exhaustion).<\/li>\n<li><strong>Disk:<\/strong> 30GB+ NVMe SSD storage.<\/li>\n<li><strong>Networking:<\/strong> Dedicated public IPv4 address with ports 22, 80, 443, and 8000 open.<\/li>\n<\/ul>\n<p>Before launching the installer, update your system repositories and configure a 2GB swap partition to protect against build spikes:<\/p>\n<pre><code># Update repository cache and core packages\nsudo apt update &amp;&amp; sudo apt upgrade -y &amp;&amp; sudo apt install -y curl ufw\n\n# Set up 2GB swapfile\nsudo fallocate -l 2G \/swapfile\nsudo chmod 600 \/swapfile\nsudo mkswap \/swapfile\nsudo swapon \/swapfile\necho '\/swapfile none swap sw 0 0' | sudo tee -a \/etc\/fstab<\/code><\/pre>\n<h2>2. Hardening Firewall &amp; Inbound Port Rules<\/h2>\n<p>Coolify relies on port <code>8000<\/code> for initial dashboard access and ports <code>80<\/code> and <code>443<\/code> for Traefik public ingress. Configure UFW firewall rules before launching the installation script:<\/p>\n<pre><code># Allow SSH access\nsudo ufw allow 22\/tcp\n\n# Allow HTTP and HTTPS for Traefik proxy\nsudo ufw allow 80\/tcp\nsudo ufw allow 443\/tcp\n\n# Allow Coolify management dashboard\nsudo ufw allow 8000\/tcp\n\n# Enable firewall\nsudo ufw --force enable\nsudo ufw status<\/code><\/pre>\n<h2>3. Installing Coolify via Official Automated Script<\/h2>\n<p>Coolify provides an automated bash installer that installs Docker Engine, docker-compose, and coordinates the initialization of Coolify core containers, Traefik reverse proxy, and local PostgreSQL databases:<\/p>\n<pre><code>curl -fsSL https:\/\/cdn.coollabs.io\/coolify\/install.sh | sudo bash<\/code><\/pre>\n<p>The installation script executes automatically in approximately 2 to 3 minutes. Once the script finishes, you will see a success confirmation displaying the dashboard URL: <code>http:\/\/your-server-ip:8000<\/code>.<\/p>\n<h2>4. Initial Dashboard Setup &amp; Custom Domain Configuration<\/h2>\n<p>Navigate to <code>http:\/\/your-server-ip:8000<\/code> in your browser to complete initial configuration:<\/p>\n<ol>\n<li>Create your primary administrative account with a strong password.<\/li>\n<li>Navigate to <strong>Settings &gt; Instance &gt; General<\/strong>.<\/li>\n<li>In the <strong>FQDN<\/strong> field, enter your desired management subdomain, such as <code>https:\/\/coolify.yourdomain.com<\/code>.<\/li>\n<li>Point an <code>A<\/code> DNS record for <code>coolify.yourdomain.com<\/code> to your VPS IP address.<\/li>\n<li>Save settings. Coolify automatically triggers Traefik to request a Let&#8217;s Encrypt SSL certificate. You can now close port 8000 (<code>sudo ufw delete allow 8000\/tcp<\/code>) and access the dashboard securely over HTTPS.<\/li>\n<\/ol>\n<h2>5. Deploying Web Applications &amp; Databases in 1-Click<\/h2>\n<p>Coolify makes launching production services seamless:<\/p>\n<h3>Deploying from GitHub \/ GitLab<\/h3>\n<p>Connect your GitHub account via <strong>Sources &gt; Add New &gt; GitHub App<\/strong>. Coolify guides you through automatic GitHub App generation with proper webhook permissions. Once linked, select any repository and branch. Coolify auto-detects your application runtime (Node.js, Next.js, Django, FastAPI, Laravel, Go) via Nixpacks and deploys it with automated SSL.<\/p>\n<h3>Deploying One-Click Databases<\/h3>\n<p>Navigate to <strong>Projects &gt; Production &gt; + New Resource &gt; Database<\/strong>. Choose PostgreSQL, MySQL, Redis, or ClickHouse. Coolify automatically provisions persistent Docker volumes, generates cryptographically random passwords, and provides internal connection strings that other containers can access securely across the private Docker network.<\/p>\n<div style=\"background: #0f172a;border-left: 4px solid #10b981;padding: 20px;border-radius: 8px;margin: 24px 0\">\n<h4 style=\"color: #10b981;margin-top: 0\">Automated S3 Database Backups in Coolify<\/h4>\n<p style=\"color: #cbd5e1;margin-bottom: 0\">Under any deployed database, navigate to the <strong>Backups<\/strong> tab. Enter your S3-compatible credentials (AWS S3, Cloudflare R2, or self-hosted MinIO), define a cron schedule (e.g., <code>0 3 * * *<\/code> for 3 AM daily), and Coolify will automatically dump, gzip, and upload encrypted database archives to offsite storage.<\/p>\n<\/div>\n<h2>Coolify Advanced Configuration, Nixpacks Optimization &amp; Troubleshooting<\/h2>\n<p>Optimizing Coolify on Ubuntu VPS ensures maximum build performance and deterministic uptime across complex microservices:<\/p>\n<ul>\n<li><strong>Tuning Nixpacks Build Caching:<\/strong> Nixpacks automatically infers application dependencies and generates optimized container images without requiring custom Dockerfiles. To accelerate rebuilds from minutes to seconds, Coolify maintains persistent layer caches in <code>\/var\/lib\/docker\/volumes\/coolify_cache<\/code>. Never clear this volume during routine maintenance.<\/li>\n<li><strong>Configuring Environment Secrets at Scale:<\/strong> Coolify provides scoped environment variable management at the Team, Project, and Application levels. Variables prefixed with <code>SECRET_<\/code> are automatically encrypted at rest in the Coolify internal PostgreSQL database using AES-256-GCM.<\/li>\n<li><strong>Customizing Traefik Dynamic Middleware:<\/strong> Under <strong>Settings &gt; Proxy<\/strong>, administrators can inject custom Traefik configuration snippets. This enables advanced edge capabilities including custom IP whitelists, basic authentication prompts for staging branches, rate limiting, and automated HTTP-to-HTTPS redirects.<\/li>\n<li><strong>Recovering an Unresponsive Coolify Instance:<\/strong> If the Coolify dashboard becomes inaccessible following a power disruption or unexpected kernel update, connect via SSH and execute the recovery helper script:\n<pre><code># Check status of Coolify core containers\ndocker ps -a --filter \"name=coolify\"\n\n# Restart Coolify management stack cleanly\nsudo \/usr\/local\/bin\/coolify restart<\/code><\/pre>\n<\/li>\n<\/ul>\n<div style=\"background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);border: 1px solid #334155;border-radius: 12px;padding: 28px;margin: 36px 0;text-align: center\">\n<h3 style=\"color: #38bdf8;margin-top: 0;font-size: 22px\">Launch Coolify on High-Speed CpanelFree VPS<\/h3>\n<p style=\"color: #cbd5e1;font-size: 16px;line-height: 1.6;max-width: 680px;margin: 12px auto 24px auto\">Run your self-hosted PaaS without performance bottlenecks. Enjoy full root access, blisteringly fast NVMe storage, and dedicated vCPU cores built for modern developers.<\/p>\n<p>    <a href=\"https:\/\/cpanelfree.com\/\" style=\"background: #38bdf8;color: #0f172a;font-weight: 700;padding: 12px 28px;border-radius: 6px;text-decoration: none;display: inline-block;font-size: 15px\">Deploy Your Linux VPS Today &rarr;<\/a>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>For developers, agencies, and startup teams, modern deployment agility is non-negotiable. However, recurring SaaS subscriptions from commercial cloud providers quickly accumulate, often costing hundreds of dollars monthly for basic build pipelines, preview environments, and hosted databases. By deploying Coolify\u2014the open-source, self-hosted alternative to Heroku, Netlify, and Vercel\u2014on a dedicated Linux VPS, you gain an enterprise-grade &#8230; <a title=\"How to Set Up Coolify on Ubuntu VPS: Deploy Node, Python &amp; PHP in 1-Click\" class=\"read-more\" href=\"https:\/\/cpanelfree.com\/blog\/how-to-setup-coolify-ubuntu-vps-one-click-deploy\/\" aria-label=\"Read more about How to Set Up Coolify on Ubuntu VPS: Deploy Node, Python &amp; PHP in 1-Click\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":4346,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-4347","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-hosting-news"],"_links":{"self":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/4347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/comments?post=4347"}],"version-history":[{"count":1,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/4347\/revisions"}],"predecessor-version":[{"id":4359,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/posts\/4347\/revisions\/4359"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media\/4346"}],"wp:attachment":[{"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/media?parent=4347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/categories?post=4347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cpanelfree.com\/blog\/wp-json\/wp\/v2\/tags?post=4347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}