<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged coolify</title>
<link>https://coderlegion.com/tag/coolify</link>
<description>Powered by Question2Answer</description>
<item>
<title>Directus + Coolify: Should You Decouple Postgres &amp; Redis?</title>
<link>https://coderlegion.com/24235/directus-coolify-should-you-decouple-postgres-redis</link>
<description>&lt;blockquote&gt;&lt;p&gt;This is Part 2 of the Directus + Coolify series. If you're new here, start with &lt;strong&gt;&quot;Secure Your VPS Before Hackers Do&quot;&lt;/strong&gt; and the first Directus + Coolify post — the bundled, single-Compose-file setup — before following along with this one.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;In the first method, we coupled all of the services into one stack using a single Docker Compose file. The network between all services was created automatically, and we didn't have to start them up individually — which removes the risk of a race condition if service startup isn't handled properly.&lt;/p&gt;
&lt;p&gt;If you're running a single app, that's genuinely the recommended way to set up Directus on a Coolify-managed VPS. Going in, I assumed there were several good reasons to split the services apart instead — more control over backups, monitoring, restarts, that kind of thing. So before recommending decoupling, I actually tested each of those assumptions on a live Coolify instance.&lt;/p&gt;
&lt;p&gt;Most of them turned out to be wrong.&lt;/p&gt;
&lt;h3 id=&quot;myth-1-restarting-directus-restarts-the-whole-stack&quot;&gt;Myth 1: Restarting Directus Restarts the Whole Stack&lt;/h3&gt;
&lt;p&gt;I expected that restarting Directus inside the bundled Compose file would restart Redis and Postgres along with it. It doesn't. Coolify lets you restart each service in the stack independently — Directus, Database, and Cache each get their own &lt;strong&gt;Restart&lt;/strong&gt; button, right there in the same view. No decoupling needed for this one.&lt;/p&gt;
&lt;h3 id=&quot;myth-2-you-need-a-separate-database-resource-for-s3-backups&quot;&gt;Myth 2: You Need a Separate Database Resource for S3 Backups&lt;/h3&gt;
&lt;p&gt;Same story. Even with Postgres bundled inside the Directus Compose file, Coolify still gives it its own dedicated &lt;strong&gt;Backups&lt;/strong&gt; option, S3 included. This isn't a separate-resource-only feature.&lt;/p&gt;
&lt;h3 id=&quot;myth-3-scheduled-tasks-require-separate-services&quot;&gt;Myth 3: Scheduled Tasks Require Separate Services&lt;/h3&gt;
&lt;p&gt;Also not true. Coolify exposes a &lt;strong&gt;Scheduled Tasks&lt;/strong&gt; tab per service, even inside a single bundled stack — complete with a &lt;strong&gt;Container name&lt;/strong&gt; dropdown letting you target the cron job at just the database, or just Directus, without splitting anything apart.&lt;/p&gt;
&lt;h3 id=&quot;what-actually-holds-up&quot;&gt;What Actually Holds Up&lt;/h3&gt;
&lt;p&gt;Two things survived testing.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;First: metrics.&lt;/strong&gt; This one's confirmed directly in Coolify's own documentation — CPU and memory metrics collection is explicitly not available for Docker Compose–based deployments. If you want to see per-container resource usage through Coolify's built-in monitoring, the service needs to be created as its own standalone resource, not bundled inside a Compose file. This is a real, documented limitation of the bundled approach.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Second: sharing a database across multiple apps.&lt;/strong&gt; This one isn't a Coolify feature at all — it's just how Docker networking works. A database defined inside one app's Compose file lives on that stack's own private network by default. A second, completely separate application can't reach it without deliberately bridging the two networks. If you've got a desktop app and a mobile app that both need to talk to the same Postgres instance, that database needs to exist as its own standalone resource from the start — it can't stay tucked inside one app's Compose file.&lt;/p&gt;
&lt;p&gt;So this really comes down to two reasons to decouple, not five — one a genuine Coolify limitation, the other a structural fact about Docker networking. Let's set both of those up properly.&lt;/p&gt;
&lt;h3 id=&quot;adding-the-resources&quot;&gt;Adding the Resources&lt;/h3&gt;
&lt;h4 id=&quot;adding-the-postgresql-database&quot;&gt;Adding the PostgreSQL Database&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dashboard → Add Project&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;+ Add Resource&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Databases → PostgreSQL → Supabase PostgreSQL (with extensions)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Change the name to something human-friendly&lt;/li&gt;
&lt;li&gt;Copy your username and password and save them somewhere — you'll need them shortly&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Start&lt;/strong&gt;, and wait for the database to spin up (this can take a little while)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once it's up, the status should read &lt;strong&gt;&quot;Running (Healthy).&quot;&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;💡 &lt;strong&gt;Enable metrics while you're here.&lt;/strong&gt; In the sidebar, go to &lt;strong&gt;Servers → localhost → Metrics&lt;/strong&gt;, and enable metrics. Back in your project, under &lt;strong&gt;Databases&lt;/strong&gt;, click your Postgres database, then &lt;strong&gt;Metrics&lt;/strong&gt; — you should now see live CPU/memory usage for it. This is the exact capability that isn't available on a bundled Compose deployment.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;adding-redis-cache&quot;&gt;Adding Redis Cache&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dashboard → + Add Resource&lt;/strong&gt; (from the project itself)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Databases → Redis&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Rename it to something more convenient&lt;/li&gt;
&lt;li&gt;Copy the Redis connection URL — you'll need it shortly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Save&lt;/strong&gt;, then &lt;strong&gt;Start&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Once both are running, SSH into your VPS and run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;to confirm both containers are up.&lt;/p&gt;
&lt;h4 id=&quot;the-docker-compose-config-for-directus&quot;&gt;The Docker Compose Config for Directus&lt;/h4&gt;
&lt;p&gt;This is what goes into the empty Compose file for the Directus resource:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;services:
  directus:
    image: 'directus/directus:12.2.0'
    ports:
      - '8055:8055'
    volumes:
      - './uploads:/directus/uploads'
      - './extensions:/directus/extensions'
    healthcheck:
      test:
        - CMD-SHELL
        - 'wget --spider -q http://127.0.0.1:8055/server/ping || exit 1'
      interval: 10s
      timeout: 5s
      retries: 5
      start_interval: 5s
      start_period: 30s
    environment:
      SECRET: secretstring
      MARKETPLACE_TRUST: all
      DB_CLIENT: pg
      DB_HOST:
      DB_PORT: '5432'
      DB_DATABASE: postgres
      DB_USER: postgres
      DB_PASSWORD:
      CACHE_ENABLED: 'true'
      CACHE_STORE: redis
      CACHE_AUTO_PURGE: 'true'
      REDIS:
      ADMIN_EMAIL: *Emails are not allowed*
      ADMIN_PASSWORD: '1234567890'
      CORS_ENABLED: 'true'
      CORS_ORIGIN: 'true'
      CORS_CREDENTIALS: 'true'
      PUBLIC_URL:
&lt;/code&gt;&lt;/pre&gt;
&lt;blockquote&gt;&lt;p&gt;Notice the healthcheck already uses &lt;code&gt;127.0.0.1&lt;/code&gt; instead of &lt;code&gt;localhost&lt;/code&gt; — that's the fix from Part 1. Carrying it forward here saves you from hitting the exact same &quot;unhealthy&quot; bug all over again.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4 id=&quot;adding-directus&quot;&gt;Adding Directus&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dashboard → + Add Resource&lt;/strong&gt; (from the project itself)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Applications → Docker Compose Empty&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Paste in the Compose configuration above&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network → Connect To Predefined Network&lt;/strong&gt; → check the box&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Services → Directus service → Settings&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Add your Directus subdomain — remember to use &lt;code&gt;https://&lt;/code&gt; (e.g. &lt;code&gt;https://directus.yourdomain.com&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Save&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;connecting-the-services-together&quot;&gt;Connecting the Services Together&lt;/h4&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Variable &lt;/th&gt;&lt;th&gt;What it is&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;SECRET&lt;/code&gt; &lt;/td&gt;&lt;td&gt;A long, unguessable random string&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;DB_HOST&lt;/code&gt; &lt;/td&gt;&lt;td&gt;The name of your Postgres container — run &lt;code&gt;docker ps&lt;/code&gt; on your VPS to find it&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;DB_DATABASE&lt;/code&gt; &lt;/td&gt;&lt;td&gt;The name of the database on your Postgres server (Coolify's default is usually &lt;code&gt;postgres&lt;/code&gt;, but confirm it against your Postgres service)&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;DB_USER&lt;/code&gt; &lt;/td&gt;&lt;td&gt;The database username, from the Postgres service you created earlier&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;DB_PASSWORD&lt;/code&gt; &lt;/td&gt;&lt;td&gt;The password from that same Postgres service&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;REDIS&lt;/code&gt; &lt;/td&gt;&lt;td&gt;The Redis connection URL from the Redis service you created earlier&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;code&gt;PUBLIC_URL&lt;/code&gt; &lt;/td&gt;&lt;td&gt;Your Directus subdomain&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;blockquote&gt;&lt;p&gt;⚠️ &lt;strong&gt;Redis URL gotcha:&lt;/strong&gt; the connection URL follows the format &lt;code&gt;redis://username:password@host:port&lt;/code&gt;. Coolify's generated URL includes the username you set when creating the Redis resource — in my case, that username was also &lt;code&gt;redis&lt;/code&gt;, so the URL looked like &lt;code&gt;redis://redis:somelongvariable...&lt;/code&gt;. Directus doesn't need the username here, just the password, so strip that segment out: &lt;code&gt;redis://:somelongvariable...&lt;/code&gt;. If you used a different username when creating your Redis resource, remove &lt;em&gt;that&lt;/em&gt; value instead — not literally the word &quot;redis.&quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;setting-up-environment-variables&quot;&gt;Setting Up Environment Variables&lt;/h3&gt;
&lt;p&gt;Rather than hardcoding any of this directly into the Compose file, move it into Directus's environment variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Dashboard → Projects → Services / Directus&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Environment Variables&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;+ Add&lt;/strong&gt;, enter the variable name in all caps, and its value&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Save&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Repeat for: &lt;code&gt;SECRET&lt;/code&gt;, &lt;code&gt;DB_HOST&lt;/code&gt;, &lt;code&gt;DB_DATABASE&lt;/code&gt;, &lt;code&gt;DB_USER&lt;/code&gt;, &lt;code&gt;DB_PASSWORD&lt;/code&gt;, &lt;code&gt;ADMIN_EMAIL&lt;/code&gt;, &lt;code&gt;ADMIN_PASSWORD&lt;/code&gt;, and &lt;code&gt;REDIS&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;updating-the-compose-file&quot;&gt;Updating the Compose File&lt;/h4&gt;
&lt;p&gt;Now reference those variables instead of the raw values:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;SECRET: '${SECRET}'
DB_HOST: '${DB_HOST}'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;...and so on for each variable. Then:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Save&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restart&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;launching-directus&quot;&gt;Launching Directus&lt;/h3&gt;
&lt;p&gt;Paste your Directus subdomain into the browser, and you should land on your running Directus instance. You can also click &lt;strong&gt;Links&lt;/strong&gt; on the Directus service, then click the subdomain — it'll take you straight to your Directus Studio login.&lt;/p&gt;
&lt;p&gt;Same as the last video: sign up for your free license, which arrives by email, and paste it into your Directus instance to unlock everything.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Any questions or hit a different result testing any of these yourself? Drop it in the comments — I'm genuinely curious whether this holds up across different Coolify versions and setups.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/24235/directus-coolify-should-you-decouple-postgres-redis</guid>
<pubDate>Thu, 06 Aug 2026 21:39:55 +0000</pubDate>
</item>
<item>
<title>Setting Up Directus on a Coolify VPS (And Fixing the &quot;Unhealthy&quot; Error)</title>
<link>https://coderlegion.com/23995/setting-up-directus-on-a-coolify-vps-and-fixing-the-unhealthy-error</link>
<description>&lt;h3 id=&quot;introduction-1&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;Directus is a backend for developers. It can connect to any SQL database and asset storage, and it provides developer tooling — which the Directus team calls the &quot;Data Engine&quot; — alongside a web application that lets both developers and non-developers manipulate data and assets through a no-code interface called the &quot;Data Studio.&quot;&lt;/p&gt;
&lt;p&gt;Directus also offers granular access control, meaning end users can only see, manipulate, and interact with the data allowed by their role and access policy — enforced consistently by both the engine and the studio. It's extensible through its own marketplace, and it's completely free, with a free license available.&lt;/p&gt;
&lt;p&gt;Directus is also known as a &lt;strong&gt;headless CMS&lt;/strong&gt; — meaning it doesn't ship with a front end attached out of the box, the way WordPress traditionally did. You can pair it with whichever front end you prefer; TanStack Start is my front end of choice.&lt;/p&gt;
&lt;p&gt;In this post, I'll self-host Directus on my Coolify-managed VPS, walk through both setup methods, and — since nothing ever works perfectly on the first try — fix the actual errors I hit along the way.&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;📌 &lt;strong&gt;New here?&lt;/strong&gt; I'd recommend checking out my earlier posts where I set up the VPS itself and installed Coolify on it, before continuing with this one.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3 id=&quot;let-s-get-started&quot;&gt;Let's Get Started&lt;/h3&gt;
&lt;p&gt;There are two ways to set up Directus on a Coolify-managed VPS. I'll cover the first one here.&lt;/p&gt;
&lt;h4 id=&quot;1-log-in-to-your-coolify-dashboard&quot;&gt;1. Log in to your Coolify Dashboard&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;In the sidebar menu, go to &lt;strong&gt;Projects → +Add&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Give your project a name and description, and press continue&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-add-a-resource&quot;&gt;2. Add a Resource&lt;/h4&gt;
&lt;p&gt;After naming your project, you should be redirected to the project's page, where you can add a resource. If that redirect doesn't happen, click &lt;strong&gt;Projects&lt;/strong&gt; in the sidebar, then click into your project, and you should see &lt;strong&gt;+Add Resource&lt;/strong&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;+Add Resource&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Under Applications, select &lt;strong&gt;Docker Compose Empty&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;A blank Docker Compose file will open&lt;/li&gt;
&lt;li&gt;Go to &lt;a rel=&quot;nofollow&quot; href=&quot;https://directus.com&quot;&gt;directus.com&lt;/a&gt; → &lt;strong&gt;Docs&lt;/strong&gt; → &lt;strong&gt;Hosting&lt;/strong&gt; → &lt;strong&gt;Deployment&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Scroll down until you find the example Docker Compose YAML file, and copy it&lt;/li&gt;
&lt;li&gt;Paste it into your blank Coolify Compose file&lt;/li&gt;
&lt;li&gt;Find the &lt;code&gt;directus:&lt;/code&gt; service, and under it, &lt;code&gt;image:&lt;/code&gt; — update this to the version you want. As of this post, the latest version is &lt;code&gt;12.2.0&lt;/code&gt;:&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;image: directus/directus:12.2.0
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Scroll to the end and set your own admin email and password — these become your Data Studio login credentials&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt; at the top&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-configure-the-service&quot;&gt;3. Configure the Service&lt;/h4&gt;
&lt;p&gt;You should now be on the &lt;strong&gt;Configuration&lt;/strong&gt; screen, with a &lt;strong&gt;Deploy&lt;/strong&gt; button (yellow outline arrow) in the top right.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Under &lt;strong&gt;Network&lt;/strong&gt;, check the box&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Services&lt;/strong&gt;, click &lt;strong&gt;Settings&lt;/strong&gt; on the &lt;code&gt;directus&lt;/code&gt; tab&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Domain&lt;/strong&gt; field, enter your subdomain — e.g. &lt;code&gt;https://directus.yourdomain.com&lt;/code&gt;. &lt;strong&gt;Use &lt;code&gt;https&lt;/code&gt;&lt;/strong&gt;, so Traefik knows to issue a Let's Encrypt certificate for it&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;, then &lt;strong&gt;Back&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Edit Compose File&lt;/strong&gt; at the top, scroll down to &lt;code&gt;PUBLIC_URL&lt;/code&gt;, and set it to match your subdomain:&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;PUBLIC_URL: https://directus.yourdomain.com
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt;, close the modal&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Deploy&lt;/strong&gt;, then &lt;strong&gt;Confirm&lt;/strong&gt; on the popup&lt;/li&gt;
&lt;li&gt;Wait for the deployment to finish&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-launch-directus&quot;&gt;4. Launch Directus&lt;/h4&gt;
&lt;p&gt;On the Configuration screen, click &lt;strong&gt;Links&lt;/strong&gt;, then click your new subdomain.&lt;/p&gt;
&lt;h3 id=&quot;the-errors&quot;&gt;The Errors&lt;/h3&gt;
&lt;p&gt;At this point, your browser will show two errors: a &lt;strong&gt;&quot;Not Secure&quot;&lt;/strong&gt; warning in the address bar, and a &lt;strong&gt;&quot;no available server&quot;&lt;/strong&gt; page.&lt;/p&gt;
&lt;p&gt;Back on the Coolify dashboard, you'll notice the Directus instance is showing as &lt;strong&gt;unhealthy&lt;/strong&gt;. Traefik will not route traffic to a service that's failing its health check — which is exactly what's happening here. So the first job is figuring out &lt;em&gt;why&lt;/em&gt; the health check is failing.&lt;/p&gt;
&lt;h3 id=&quot;diagnosing-the-problem&quot;&gt;Diagnosing the Problem&lt;/h3&gt;
&lt;p&gt;SSH into your VPS to start digging.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Check your running containers:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo docker ps
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Install &lt;code&gt;jq&lt;/code&gt;&lt;/strong&gt;, so the JSON output we're about to read is actually readable:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt install jq
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Check the health check failure log&lt;/strong&gt; (grab your Directus container's name from the &lt;code&gt;docker ps&lt;/code&gt; output above):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker inspect --format='{{json .State.Health}}' &amp;lt;your-directus-container-name&amp;gt; | jq
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The result looked like this:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;Status&quot;: &quot;unhealthy&quot;,
  &quot;FailingStreak&quot;: 79,
  &quot;Log&quot;: [
    {
      &quot;Start&quot;: &quot;2026-07-30T18:12:21.445964902-04:00&quot;,
      &quot;End&quot;: &quot;2026-07-30T18:12:21.502447668-04:00&quot;,
      &quot;ExitCode&quot;: 1,
      &quot;Output&quot;: &quot;wget: can't connect to remote host: Connection refused\n&quot;
    },
    {
      &quot;Start&quot;: &quot;2026-07-30T18:12:31.505411263-04:00&quot;,
      &quot;End&quot;: &quot;2026-07-30T18:12:31.556307544-04:00&quot;,
      &quot;ExitCode&quot;: 1,
      &quot;Output&quot;: &quot;wget: can't connect to remote host: Connection refused\n&quot;
    }
  ]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The first clue: &lt;code&gt;&quot;wget: can't connect to remote host: Connection refused&quot;&lt;/code&gt;. Whatever endpoint the health check is trying to reach, it's being actively refused — not timing out, refused. That distinction matters, and it's the thread that leads to the actual fix.&lt;/p&gt;
&lt;h3 id=&quot;inspecting-the-docker-compose-file&quot;&gt;Inspecting the Docker Compose File&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;From the Coolify dashboard, select &lt;strong&gt;Projects&lt;/strong&gt; in the sidebar&lt;/li&gt;
&lt;li&gt;Click your project&lt;/li&gt;
&lt;li&gt;Click the service, then &lt;strong&gt;Edit Compose File&lt;/strong&gt; next to &lt;strong&gt;Service Stack&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here's the relevant section:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;directus:
  image: 'directus/directus:12.2.0'
  ports:
    - '8055:8055'
  volumes:
    - './uploads:/directus/uploads'
    - './extensions:/directus/extensions'
  depends_on:
    database:
      condition: service_healthy
    cache:
      condition: service_healthy
  healthcheck:
    test:
      - CMD-SHELL
      - 'wget --spider -q http://localhost:8055/server/ping || exit 1'
    interval: 10s
    timeout: 5s
    retries: 5
    start_interval: 5s
    start_period: 30s
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The problem is in the &lt;code&gt;wget&lt;/code&gt; line — specifically, &lt;code&gt;http://localhost:8055&lt;/code&gt;.&lt;/p&gt;
&lt;h4 id=&quot;why-localhost-breaks-this&quot;&gt;Why &lt;code&gt;localhost&lt;/code&gt; Breaks This&lt;/h4&gt;
&lt;p&gt;Inside a Linux container, &lt;code&gt;localhost&lt;/code&gt; isn't an address — it's a hostname that has to be resolved first, and it typically maps to &lt;strong&gt;two&lt;/strong&gt; addresses at once:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;127.0.0.1   localhost   # IPv4
::1         localhost   # IPv6
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;When &lt;code&gt;wget&lt;/code&gt; looks up &lt;code&gt;localhost&lt;/code&gt;, the system's resolver hands back both addresses, and &lt;code&gt;wget&lt;/code&gt; tries them in whatever order it receives them — which, on many Linux/Alpine base images, tends to prefer &lt;strong&gt;IPv6 first&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Checking the container's logs confirms what's actually listening:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;docker logs &amp;lt;your-directus-container-name&amp;gt; --tail 150
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Directus only bound to IPv4. The startup log says exactly that:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Server started at http://0.0.0.0:8055
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;0.0.0.0&lt;/code&gt; means &quot;listen on every IPv4 interface&quot; — Directus never opened an IPv6 socket at all. So when &lt;code&gt;wget&lt;/code&gt; tries &lt;code&gt;::1:8055&lt;/code&gt; first, there's genuinely nothing listening there, and the OS doesn't wait around wondering — it immediately sends back a rejection (a TCP RST). That's exactly why the log shows an instant &lt;strong&gt;&quot;Connection refused&quot;&lt;/strong&gt; rather than a slow timeout. A timeout would mean something was reachable but not responding; a refusal means the OS said &quot;nothing's here&quot; right away.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;127.0.0.1&lt;/code&gt; sidesteps the whole problem, because it's already a literal IP address — no hostname lookup, no ambiguity about which protocol family to try, no chance of picking the wrong one. It goes straight to the one address where Directus is actually listening.&lt;/p&gt;
&lt;h3 id=&quot;the-fix&quot;&gt;The Fix&lt;/h3&gt;
&lt;p&gt;Change &lt;code&gt;localhost&lt;/code&gt; to &lt;code&gt;127.0.0.1&lt;/code&gt; in the health check:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-yaml&quot;&gt;directus:
  image: 'directus/directus:12.2.0'
  ports:
    - '8055:8055'
  volumes:
    - './uploads:/directus/uploads'
    - './extensions:/directus/extensions'
  depends_on:
    database:
      condition: service_healthy
    cache:
      condition: service_healthy
  healthcheck:
    test:
      - CMD-SHELL
      - 'wget --spider -q http://127.0.0.1:8055/server/ping || exit 1'
    interval: 10s
    timeout: 5s
    retries: 5
    start_interval: 5s
    start_period: 30s
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Save the change, close the modal, and click &lt;strong&gt;Restart&lt;/strong&gt; in the top right. Wait for the restart to complete — it may look like nothing's happening for a bit, so give it a moment. Once it's finished, close the logs modal, and Directus should show as &lt;strong&gt;healthy&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Click &lt;strong&gt;Links&lt;/strong&gt;, then your Directus subdomain, and you should land on the Data Studio login screen.&lt;/p&gt;
&lt;h3 id=&quot;logging-in-amp-licensing&quot;&gt;Logging In &amp;amp; Licensing&lt;/h3&gt;
&lt;p&gt;Enter the credentials you set earlier in the Compose file. You'll be asked whether you have a license or want to install the Core — choose &lt;strong&gt;Core&lt;/strong&gt; for now, and follow the flow to complete sign-up.&lt;/p&gt;
&lt;p&gt;At this stage, your instance isn't fully unlocked — you'll need a license. Good news: it's completely free if your business's revenue is under $5M and your team is under 50 people.&lt;/p&gt;
&lt;p&gt;Head to &lt;a rel=&quot;nofollow&quot; href=&quot;https://directus.com/oig&quot;&gt;directus.com/oig&lt;/a&gt; to apply for your key. Once you have it, go to your Directus Studio, click the gear icon (Settings) in the sidebar, click &lt;strong&gt;License&lt;/strong&gt;, and add your key there to unlock all features. Your key is valid for a year.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;Got questions, or hit a different error setting this up? Drop a comment below — happy to help troubleshoot.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/23995/setting-up-directus-on-a-coolify-vps-and-fixing-the-unhealthy-error</guid>
<pubDate>Sun, 02 Aug 2026 14:42:21 +0000</pubDate>
</item>
<item>
<title>Coolify: The Complete Manual Setup Guide (For When the Auto-Install Script Won't Cut It)</title>
<link>https://coderlegion.com/23307/coolify-the-complete-manual-setup-guide-for-when-the-auto-install-script-wont-cut-it</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://www.youtube.com/watch?v=jlUzYm6W-bI&quot;&gt;&lt;img src=&quot;https://img.youtube.com/vi/VIDEO_ID_HERE/0.jpg&quot; alt=&quot;Watch the video&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Coolify's one-line install script is great — until it isn't. Right now it officially supports Ubuntu 20.04, 22.04, and 24.04 LTS. If you're running anything newer (Ubuntu's already on 26.04 LTS), the script won't work and you're left doing it manually.&lt;/p&gt;
&lt;p&gt;This is that manual walkthrough — set up in the order that fits a security-first VPS workflow rather than the order Coolify's own docs use. If you've been following along with the Ansible playbooks from earlier in this series, this picks up right where that left off.&lt;/p&gt;
&lt;h3 id=&quot;minimum-hardware-requirements&quot;&gt;Minimum Hardware Requirements&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CPU:&lt;/strong&gt; 2 cores&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Memory:&lt;/strong&gt; 2 GB RAM&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Storage:&lt;/strong&gt; 30 GB free&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Coolify can technically run below this, but it's not recommended.&lt;/p&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h3&gt;
&lt;p&gt;Before touching Coolify itself, you'll need:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SSH access to your VPS&lt;/li&gt;
&lt;li&gt;CURL installed&lt;/li&gt;
&lt;li&gt;Docker Engine installed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you're reconnecting to a server you've rebuilt or re-provisioned, clear the old fingerprint first:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ssh-keygen -f '/home/your-path/.ssh/known_hosts' -R 'your-vps-ip'
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;installing-ssh&quot;&gt;Installing SSH&lt;/h4&gt;
&lt;p&gt;If you followed the earlier videos in this series, OpenSSH is already installed. If not:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install -y openssh-server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm it's running and check which port it's listening on (you should have already changed this from the default 22 — see the VPS security video):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo systemctl status ssh
sudo ss -tulpn | grep ssh
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;installing-curl&quot;&gt;Installing CURL&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt install -y curl
curl --version
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;curl&lt;/code&gt; and &lt;code&gt;ca-certificates&lt;/code&gt; also get installed as part of the &lt;code&gt;apt-update&lt;/code&gt; Ansible playbook below, so this may already be handled.&lt;/p&gt;
&lt;h3 id=&quot;running-the-first-ansible-playbook&quot;&gt;Running the First Ansible Playbook&lt;/h3&gt;
&lt;p&gt;Connect Ansible to the VPS:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ANSIBLE_HOST_KEY_CHECKING=FALSE ansible -i ./inventory/hosts vpsDemo -m ping --user root --ask-pass
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then run the update playbook:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ansible-playbook ./playbooks/apt-update.yml --user root -e &quot;ansible_port=22&quot; --ask-pass --ask-become-pass -i ./inventory/hosts
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you haven't set up the Ansible inventory and playbooks from the earlier videos, do that first — this guide assumes they're already in place.&lt;/p&gt;
&lt;h3 id=&quot;installing-docker-engine&quot;&gt;Installing Docker Engine&lt;/h3&gt;
&lt;p&gt;Remove any conflicting packages first:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt remove $(dpkg --get-selections docker.io docker-compose docker-compose-v2 docker-doc podman-docker containerd runc | cut -f1)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add Docker's official GPG key and repo:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

sudo tee /etc/apt/sources.list.d/docker.sources &amp;lt;&amp;lt;EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release &amp;amp;&amp;amp; echo &quot;${UBUNTU_CODENAME:-$VERSION_CODENAME}&quot;)
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF

sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verify it worked:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo systemctl status docker
sudo docker run hello-world
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;creating-a-non-root-admin-user&quot;&gt;Creating a Non-Root Admin User&lt;/h3&gt;
&lt;p&gt;Coolify's own docs assume you're using the root account. Since root login is disabled as part of the security hardening earlier in this series, we create a dedicated user with passwordless sudo instead.&lt;/p&gt;
&lt;p&gt;Run the second playbook to create that user:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ansible-playbook ./playbooks/basic-secure.yml --user root -e &quot;ansible_port=22&quot; --ask-pass --ask-become-pass -i ./inventory/hosts
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then set up that user's SSH directory:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo mkdir -p /home/your-sudo-user/.ssh
sudo touch /home/your-sudo-user/.ssh/authorized_keys
sudo chmod 700 /home/your-sudo-user/.ssh
sudo chmod 600 /home/your-sudo-user/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;setting-up-coolify-s-directory-structure&quot;&gt;Setting Up Coolify's Directory Structure&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;sudo mkdir -p /data/coolify/{source,ssh,applications,databases,backups,services,proxy,webhooks-during-maintenance}
sudo mkdir -p /data/coolify/ssh/{keys,mux}
sudo mkdir -p /data/coolify/proxy/dynamic
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;generating-and-adding-an-ssh-key&quot;&gt;Generating and Adding an SSH Key&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;sudo ssh-keygen -f /data/coolify/ssh/keys/*Emails are not allowed*rnal -t ed25519 -N '' -C your-sudo-user@coolify
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add the public key to the authorized_keys file:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cat /data/coolify/ssh/keys/*Emails are not allowed* | sudo tee -a /home/your-sudo-user/.ssh/authorized_keys
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;pulling-coolify-s-configuration-files&quot;&gt;Pulling Coolify's Configuration Files&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;sudo curl -fsSL https://cdn.coollabs.io/coolify/docker-compose.yml -o /data/coolify/source/docker-compose.yml
sudo curl -fsSL https://cdn.coollabs.io/coolify/docker-compose.prod.yml -o /data/coolify/source/docker-compose.prod.yml
sudo curl -fsSL https://cdn.coollabs.io/coolify/.env.production -o /data/coolify/source/.env
sudo curl -fsSL https://cdn.coollabs.io/coolify/upgrade.sh -o /data/coolify/source/upgrade.sh
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;generating-secure-environment-values&quot;&gt;Generating Secure Environment Values&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Only run these once, on first install.&lt;/strong&gt; Changing them later can break Coolify. Back them up somewhere safe.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo sed -i &quot;s|APP_ID=.*|APP_ID=$(openssl rand -hex 16)|g&quot; /data/coolify/source/.env
sudo sed -i &quot;s|APP_KEY=.*|APP_KEY=base64:$(openssl rand -base64 32)|g&quot; /data/coolify/source/.env
sudo sed -i &quot;s|DB_PASSWORD=.*|DB_PASSWORD=$(openssl rand -base64 32)|g&quot; /data/coolify/source/.env
sudo sed -i &quot;s|REDIS_PASSWORD=.*|REDIS_PASSWORD=$(openssl rand -base64 32)|g&quot; /data/coolify/source/.env
sudo sed -i &quot;s|PUSHER_APP_ID=.*|PUSHER_APP_ID=$(openssl rand -hex 32)|g&quot; /data/coolify/source/.env
sudo sed -i &quot;s|PUSHER_APP_KEY=.*|PUSHER_APP_KEY=$(openssl rand -hex 32)|g&quot; /data/coolify/source/.env
sudo sed -i &quot;s|PUSHER_APP_SECRET=.*|PUSHER_APP_SECRET=$(openssl rand -hex 32)|g&quot; /data/coolify/source/.env
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;permissions-and-docker-setup&quot;&gt;Permissions and Docker Setup&lt;/h3&gt;
&lt;p&gt;Set correct ownership and permissions:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo chown -R 9999:root /data/coolify
sudo find /data/coolify -type d -exec chmod 755 {} \;
sudo find /data/coolify -type f -exec chmod 644 {} \;
sudo chown -R your-sudo-user:your-sudo-user /home/your-sudo-user/.ssh
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Create the Docker network Coolify expects:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo docker network create --attachable coolify
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Add your user to the Docker group:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo usermod -aG docker your-sudo-user
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;starting-coolify&quot;&gt;Starting Coolify&lt;/h3&gt;
&lt;pre&gt;&lt;code&gt;sudo docker compose --env-file /data/coolify/source/.env -f /data/coolify/source/docker-compose.yml -f /data/coolify/source/docker-compose.prod.yml up -d --pull always --remove-orphans --force-recreate
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm it's running:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo docker ps
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then visit &lt;code&gt;http://YOUR-SERVER-IP:8000&lt;/code&gt; in your browser.&lt;/p&gt;
&lt;h3 id=&quot;setup-your-ssl-certificates&quot;&gt;Setup your SSL Certificates&lt;/h3&gt;
&lt;p&gt;Coolify's reverse-proxy Traefik does this under the hood automatically.&lt;/p&gt;
&lt;p&gt;In your DNS records add two A records.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;A     @     your-vps-ip-address        14400
A     *     your-vps-ip-address        14400
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;In your Coolify dashboard go to settings in the left side column. In the input box marked URL type your https subdomain for Coolify there.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;https://coolify.yourdomain.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Traefik will automatically apply a Let's Encrypt certificate to your Coolify subdomain.&lt;/p&gt;
&lt;h3 id=&quot;disable-port-8000&quot;&gt;Disable Port 8000&lt;/h3&gt;
&lt;p&gt;Disable port 8000 on your VPS. If your hosting provider allows you to configure a firewall from your dashboard, disable it from there. To disable port 8000, simply write rules that allow the ports you want and block everything else.&lt;/p&gt;
&lt;h3 id=&quot;wrap-up&quot;&gt;Wrap-Up&lt;/h3&gt;
&lt;p&gt;That's a full manual Coolify install on a hardened, non-root VPS — no automated script required. From here, Coolify handles the rest: connecting your Git repos, setting up applications, and managing deployments.&lt;/p&gt;
&lt;p&gt;If you hit issues with the automated script on a newer Ubuntu release, this manual path should get you unblocked. Questions or corrections welcome in the comments.&lt;/p&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/23307/coolify-the-complete-manual-setup-guide-for-when-the-auto-install-script-wont-cut-it</guid>
<pubDate>Thu, 23 Jul 2026 05:15:31 +0000</pubDate>
</item>
<item>
<title>What is Coolify? Self-Hosting with Superpowers</title>
<link>https://coderlegion.com/20869/what-is-coolify-self-hosting-with-superpowers</link>
<description>&lt;h2 id=&quot;introduction-2&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In the last post, we talked about the VPS and why it is a compelling option for hosting your web applications. I mentioned a tool called Coolify that makes managing a VPS significantly easier. In this post, we are going to dive deeper into what Coolify actually is, what it does, and why I think it is one of the best tools available for developers and small teams who want the power of a VPS without the complexity of managing one from scratch.&lt;/p&gt;
&lt;h2 id=&quot;what-is-coolify-&quot;&gt;What is Coolify?&lt;/h2&gt;
&lt;p&gt;Coolify is a free, open-source, self-hostable platform as a service — or PaaS. Think of it as your own personal Heroku or Render, but running on your own server. This means you own your infrastructure, your data, and your costs.&lt;/p&gt;
&lt;p&gt;The best way to understand Coolify is to compare it to the alternatives. Platforms like Heroku, Render, and Railway are fully managed PaaS solutions. They abstract away all the server complexity — you push your code and it runs. The trade-off is cost and control. As your app scales, the bills grow quickly and you have limited control over the underlying infrastructure.&lt;/p&gt;
&lt;p&gt;Coolify gives you the same developer experience — push your code and it deploys — but on a VPS that you control. You get the simplicity of a managed platform with the economics and control of a VPS.&lt;/p&gt;
&lt;h2 id=&quot;what-does-coolify-do-&quot;&gt;What Does Coolify Do?&lt;/h2&gt;
&lt;p&gt;Coolify handles all the hard parts of running applications on a VPS.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Git Integration&lt;/strong&gt; -  Connect your GitHub, GitLab, or Bitbucket repository and Coolify will automatically deploy your app every time you push to your main branch. No manual deployments, no SSH commands — just push your code and it is live.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dockerized Deployments&lt;/strong&gt; -  Every application Coolify deploys runs in a Docker container. This means your apps are isolated, portable, and consistent across environments. You do not need to know Docker deeply to use Coolify — it handles the containerization for you.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automatic HTTPS&lt;/strong&gt; -  Coolify integrates with Let's Encrypt to automatically provision and renew SSL certificates for all your applications. Every app gets HTTPS out of the box with zero configuration on your part.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built-in Reverse Proxy&lt;/strong&gt;  Coolify uses Traefik as its built-in reverse proxy and web server. It automatically routes traffic to the right application based on the domain name. You can run multiple applications on the same VPS and Coolify handles the routing between them.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Database Management&lt;/strong&gt; -  Coolify can deploy and manage databases alongside your applications — PostgreSQL, MySQL, MongoDB, Redis and more. You can spin up a database with a few clicks and connect it to your application without any manual configuration.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Environment Variables&lt;/strong&gt; -  Manage your environment variables securely through the Coolify dashboard. No more manually editing .env files on the server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Monitoring and Logs&lt;/strong&gt; -  Coolify provides basic monitoring and real-time log streaming for all your applications directly from the dashboard. You can see what your app is doing without SSH-ing into the server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Backups&lt;/strong&gt; -  Coolify supports automated database backups to S3-compatible storage. Your data is protected without any manual backup scripts.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;why-would-you-use-coolify-&quot;&gt;Why Would You Use Coolify?&lt;/h2&gt;
&lt;p&gt;There are several scenarios where Coolify makes a lot of sense.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You want the economics of a VPS without the complexity.&lt;/strong&gt; &lt;br&gt;
A 6USD to 10USD per month VPS with Coolify can run multiple applications that would cost hundreds of dollars per month on Heroku, Render, or Railway. For a startup or indie developer this is a significant saving.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You want full control over your infrastructure.&lt;/strong&gt;&lt;br&gt;
With Coolify you own everything. Your data stays on your server. You choose your hosting provider. You are not locked into any platform's pricing or terms of service.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You want a great developer experience.&lt;/strong&gt;&lt;br&gt;
Coolify's dashboard is clean and intuitive. Deploying an application is genuinely just a few clicks. It does not feel like managing a server — it feels like using a modern PaaS.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You are running multiple projects.&lt;/strong&gt; &lt;br&gt;
One VPS with Coolify can host multiple applications, multiple databases, and multiple domains. Instead of paying for separate hosting for each project, you consolidate everything onto one server.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-limitations-&quot;&gt;What Are the Limitations?&lt;/h2&gt;
&lt;p&gt;Coolify is not perfect for every situation. Here are some things to be aware of.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You are responsible for your server&lt;/strong&gt; — if your VPS goes down, your apps go down. With managed platforms the provider handles up time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Some configuration is still required&lt;/strong&gt; — especially for custom setups, firewalls, and advanced networking.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;It is self-hosted&lt;/strong&gt; — meaning you need to keep Coolify itself updated and maintained.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Not ideal for very large scale&lt;/strong&gt; — for enterprise applications with massive traffic you may need dedicated infrastructure beyond a single VPS.&lt;/p&gt;
&lt;h2 id=&quot;how-do-you-get-started-with-coolify-&quot;&gt;How Do You Get Started with Coolify?&lt;/h2&gt;
&lt;p&gt;Getting Coolify up and running is surprisingly straightforward. In an upcoming post I will walk you through the complete setup — from provisioning a VPS to having Coolify installed and your first application deployed.&lt;/p&gt;
&lt;p&gt;All you need to get started is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;• A VPS with at least 2GB RAM and 2 CPU cores 
• A domain name 
• About 30 minutes of your time 
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Coolify bridges the gap between the simplicity of managed platforms and the power and economics of a VPS. For developers and small teams who want to own their infrastructure without being overwhelmed by server management, it is genuinely one of the best tools available right now.&lt;/p&gt;
&lt;p&gt;In an upcoming post we will get our hands dirty and set up Coolify from scratch. See you there.&lt;/p&gt;
&lt;p&gt;References&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;• https://coolify.io 
• https://coolify.io/docs 
• https://github.com/coollabsio/coolify
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/20869/what-is-coolify-self-hosting-with-superpowers</guid>
<pubDate>Thu, 18 Jun 2026 03:34:08 +0000</pubDate>
</item>
<item>
<title>Back-End Web Development — VPS vs Vercel vs Netlify</title>
<link>https://coderlegion.com/20868/back-end-web-development-vps-vs-vercel-vs-netlify</link>
<description>&lt;h2 id=&quot;introduction-3&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Every great web application with millions of users has an even greater back end — and it has to be. Accessing your app over a prolonged period of time will test the integrity, availability, and speed of your back end. Backend technology can be inexpensive, or it can cost you thousands of dollars. So what's the deal here?   &lt;/p&gt;
&lt;p&gt;Let me warn you that this post is highly opinionated. I am sharing the tools that I use and how I use them.&lt;/p&gt;
&lt;p&gt;For my back end that powers my web apps, I use Directus for my headless CMS, supported by a PostgreSQL and Redis database, hosted on a VPS, and managed by Coolify. Wow, that is a mouthful — and on my channel I explore how they all work together.&lt;/p&gt;
&lt;p&gt;So let's tackle each technology one at a time, starting with the VPS.&lt;/p&gt;
&lt;h2 id=&quot;what-is-a-vps-&quot;&gt;What is a VPS?&lt;/h2&gt;
&lt;p&gt;A Virtual Private Server, known as a VPS, is a virtual environment created on a physical server. Think of it like an apartment building — everyone shares the same physical structure, but each unit has its own private space, utilities, and security. While multiple VPS instances share a physical server, be careful not to confuse this with shared hosting.&lt;/p&gt;
&lt;p&gt; Each VPS is allocated its own dedicated resources, which are restricted to that VPS for as long as it is active. Therefore, the performance of a VPS is not directly affected by the usage of other VPS instances, but rather by the underlying performance of the physical server itself.&lt;/p&gt;
&lt;h2 id=&quot;what-are-the-benefits-of-a-vps-&quot;&gt;What are the benefits of a VPS?&lt;/h2&gt;
&lt;p&gt;There are several benefits to consider when deciding on virtual private server hosting:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Greater control&lt;/strong&gt; — Compared to shared hosting, you have root access and can fully customize your server environment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Dedicated resources&lt;/strong&gt; — Allocated CPU, memory, and storage help ensure consistent performance.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Scalability&lt;/strong&gt; — You can easily scale resources up or down to accommodate changing traffic and application demands.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost-effectiveness&lt;/strong&gt; — A VPS typically offers a balance between the affordability of shared hosting and the power of a dedicated server.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved security&lt;/strong&gt; — Isolation from other users on the same physical server enhances security.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Choice of operating system&lt;/strong&gt; — You can choose the operating system that best suits your needs, such as Linux or Windows.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;how-does-it-stack-up-against-vercel-or-netlify-&quot;&gt;How does it stack up against Vercel or Netlify?&lt;/h2&gt;
&lt;p&gt;Vercel offers minimal setup with Git integration and fast deployment right out of the box. It has a free Hobby plan, but it is strictly for personal, non-commercial use. Once your app grows and needs to scale, you will need to move to a paid plan. &lt;/p&gt;
&lt;p&gt;The Pro plan starts at $20 per user per month, and also covers serverless functions. Despite the name, serverless code still runs on a physical server — however, the infrastructure management, such as scaling, security patching, and provisioning, is handled entirely by the cloud provider. The main factor to watch carefully is cost. &lt;/p&gt;
&lt;p&gt;Vercel uses usage-based billing, and costs can escalate quickly — especially since Turbo build machines became the default for new Pro projects in February 2026, at 0.126USD  per build minute. A moderate team workflow can generate over $400 per month in build costs alone, before bandwidth and compute charges. I have seen some alarming Vercel bills shared online by customers, which means you need to fully understand the pricing model before you commit.&lt;/p&gt;
&lt;p&gt;Netlify has historically been more suited to static sites and composable web applications. Composable applications are software systems built from independent, interchangeable modules rather than a single rigid code base. Netlify also has Git integration, customizable build plugins, and serverless functions. Netlify moved to a credit-based pricing model in September 2025, which is &lt;br&gt;
designed to simplify metered billing. &lt;/p&gt;
&lt;p&gt;As of April 2026, the Pro plan costs 20USD per month and now includes unlimited team member seats, which is an improvement over the previous per-seat model. However, teams working on active projects with real traffic can burn through their credit allocation quickly, and credit pack add-ons at 10USD per 1,500 credits mean teams can regularly spend 40USD to 80USD or more per month beyond the base subscription. Your overall control is also more limited compared to a VPS, and you will still face a monthly cost as your app grows.&lt;/p&gt;
&lt;h2 id=&quot;now-the-vps-&quot;&gt;Now the VPS.&lt;/h2&gt;
&lt;p&gt;VPS prices can grow as your app grows, but in my experience at a slower and more predictable rate — with no surprise charges. However, if you manage a VPS yourself, it requires understanding web servers, firewalls, operating systems, caching, and more. It can get complex very quickly and may cause you to spend more time managing the server than building and scaling your app.&lt;/p&gt;
&lt;p&gt;That is why some developers and business owners hire a team to handle it. Small teams may not have the budget for a dedicated infrastructure team, so they often opt for a more convenient managed solution.&lt;/p&gt;
&lt;p&gt;There is one tool, however, that I think is worth mentioning and is a genuine game changer — and that is Coolify. In a later post I will go into more detail about what Coolify is and what it does. Coolify is a self-hostable platform that makes managing your VPS significantly easier. It offers Git integration, runs apps in Dockerized containers, handles HTTPS automatically, and includes a built-in web server that works out of the box with no manual configuration required. This makes the VPS a very real and competitive option worth considering.&lt;/p&gt;
&lt;p&gt;If you choose a solid hosting provider and pair it with the right tools, you can make this an absolute dream to work with.&lt;/p&gt;
&lt;p&gt;Now don’t get me wrong, even with Coolify there are some configurations that you will have to make, but I do believe a VPS is a great solution for a start up, mid-size or enterprise scaled app, with the right tools.&lt;/p&gt;
&lt;h2 id=&quot;references&quot;&gt;References&lt;/h2&gt;
&lt;pre&gt;&lt;code&gt;• https://cloud.google.com/learn/what-is-a-virtual-private-server 
• https://aws.amazon.com/what-is/vps/ 
• https://www.ibm.com/think/topics/vps 
• https://www.scalahosting.com/blog/what-is-a-vps-technical-explanation/ 
• https://www.dreamhost.com/blog/beginners-guide-vps/ 
• https://vercel.com/pricing 
• https://www.netlify.com/pricing/ 
• https://bejamas.com/blog/self-hosting-vs-vercel-and-netlify-which-solution-is-right
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Articles</category>
<guid isPermaLink="true">https://coderlegion.com/20868/back-end-web-development-vps-vs-vercel-vs-netlify</guid>
<pubDate>Thu, 18 Jun 2026 03:34:03 +0000</pubDate>
</item>
</channel>
</rss>