<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sergej Voronko</title>
    <description>The latest articles on DEV Community by Sergej Voronko (@linuxcore).</description>
    <link>https://dev.to/linuxcore</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4195468%2Fcaa1ff11-44a2-4c36-bc32-9207c04edc14.png</url>
      <title>DEV Community: Sergej Voronko</title>
      <link>https://dev.to/linuxcore</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/linuxcore"/>
    <language>en</language>
    <item>
      <title>Self-Host a Newsletter with Listmonk for Under €8 a Month</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Fri, 27 Nov 2026 23:42:03 +0000</pubDate>
      <link>https://dev.to/linuxcore/self-host-a-newsletter-with-listmonk-for-under-eu8-a-month-328f</link>
      <guid>https://dev.to/linuxcore/self-host-a-newsletter-with-listmonk-for-under-eu8-a-month-328f</guid>
      <description>&lt;p&gt;You can run a full newsletter setup for several websites (double opt-in, branded confirmation emails, welcome sequences and weekly digests) for under €8 a month. The recipe is Listmonk on a 1 GB VPS, Caddy for HTTPS, and Brevo's free SMTP plan for sending. If you already have an always-on homelab box, you can drop the VPS and run the whole newsletter stack for free.&lt;/p&gt;

&lt;p&gt;I moved the newsletters for four of my sites (this one included) off MailerLite to exactly this stack. MailerLite bills each account separately, and on the free plan its API cannot create campaigns from your own HTML, so automating a weekly digest meant paying for every site. This guide covers the setup I ended up with and the traps I hit on the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a Newsletter Actually Costs
&lt;/h2&gt;

&lt;p&gt;Hosted email platforms charge per subscriber and per account. Self-hosting splits the job in two: software that manages lists (Listmonk, free and open source) and a relay that delivers the mail (an SMTP provider, free at low volume).&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Option&lt;/th&gt;
&lt;th&gt;Free tier&lt;/th&gt;
&lt;th&gt;When you start paying&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;MailerLite&lt;/td&gt;
&lt;td&gt;250 subscribers, 2,500 emails/month, 3 automations&lt;/td&gt;
&lt;td&gt;Paid plans from $12/month, per account&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brevo (as SMTP relay)&lt;/td&gt;
&lt;td&gt;300 emails/day&lt;/td&gt;
&lt;td&gt;Starter from about $9/month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Amazon SES&lt;/td&gt;
&lt;td&gt;Covered by AWS Free Tier credits for new accounts&lt;/td&gt;
&lt;td&gt;$0.10 per 1,000 emails (pay as you go)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Listmonk + Brevo on a VPS&lt;/td&gt;
&lt;td&gt;Software free, Brevo free&lt;/td&gt;
&lt;td&gt;Only the VPS, €6.49/month + VAT&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Listmonk + Brevo on a homelab&lt;/td&gt;
&lt;td&gt;Fully free&lt;/td&gt;
&lt;td&gt;Electricity&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The self-hosted line stays flat no matter how many sites you run. One Listmonk instance holds a separate list per site, and all of them share the same server and the same relay.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Architecture
&lt;/h2&gt;

&lt;p&gt;The whole stack is four containers on one small server:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Listmonk&lt;/strong&gt; stores subscribers, lists, templates and campaigns, and exposes a REST API.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Postgres&lt;/strong&gt; is Listmonk's database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Caddy&lt;/strong&gt; terminates HTTPS for a &lt;code&gt;news.&lt;/code&gt; subdomain on each site and gets certificates automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A small Python signup service&lt;/strong&gt; takes form posts from the websites and sends branded confirmation emails (more on why below).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Brevo does the actual delivery over SMTP. Listmonk never talks to recipient mail servers directly, so the VPS IP address has no effect on deliverability, and you don't need to open port 25.&lt;/p&gt;

&lt;p&gt;On my server the four containers use about 100 MB of RAM combined while idle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;listmonk-app-1      37 MiB
listmonk-caddy-1    31 MiB
listmonk-db-1       19 MiB
listmonk-signup-1   13 MiB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A 1 vCPU / 1 GB VPS (Hetzner CPX02 in my case: 20 GB NVMe, 20 TB traffic) handles this with room to spare. CPX02 costs €5.99 a month plus €0.50 for the public IPv4 address, which comes to €7.98 with Slovak VAT. Two better options exist at the same or lower price. The ARM CAX11 costs the same €5.99 but has 2 vCPUs and 4 GB of RAM, and every image in this stack runs on ARM. The x86 CX23 (2 vCPUs, 4 GB) costs €5.49, but it was out of stock in every EU location when I set this up. Take whichever is available when you read this. The stack has no CPU-specific requirements, and moving it later is a &lt;code&gt;pg_dump&lt;/code&gt;, a copy of the compose folder and a DNS change. Add a 2 GB swap file so a Postgres vacuum or a Docker image pull can't push it into the out-of-memory killer.&lt;/p&gt;

&lt;h2&gt;
  
  
  VPS or Homelab?
&lt;/h2&gt;

&lt;p&gt;My first plan was to run Listmonk on my homelab machine. It had no public ingress, and that matters more for a newsletter than for most self-hosted apps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Signup forms must always work.&lt;/strong&gt; If the server is down when a reader submits the form, you lose that subscriber.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirmation and unsubscribe links must always work.&lt;/strong&gt; A broken unsubscribe link is a fast route to spam complaints.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If your homelab box runs 24/7 and you're comfortable with a Cloudflare Tunnel, the free route works fine. Expose only the public paths (signup, confirmation, unsubscribe) and keep the admin UI on your LAN. If your homelab reboots for updates or sits on a laptop, a VPS for a few euros a month removes that whole class of problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Docker Compose for Listmonk
&lt;/h2&gt;

&lt;p&gt;This is the compose file running on my server, with credentials moved into &lt;code&gt;.env&lt;/code&gt; files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;postgres:17.6-alpine&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_USER&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;listmonk&lt;/span&gt;
      &lt;span class="na"&gt;POSTGRES_DB&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;listmonk&lt;/span&gt;
    &lt;span class="na"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;.env&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;          &lt;span class="c1"&gt;# POSTGRES_PASSWORD
&lt;/span&gt;    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;pg:/var/lib/postgresql/data&lt;/span&gt;
    &lt;span class="na"&gt;healthcheck&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;test&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"CMD-SHELL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"pg_isready -U listmonk"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
      &lt;span class="na"&gt;interval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;10s&lt;/span&gt;
      &lt;span class="na"&gt;timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;5s&lt;/span&gt;
      &lt;span class="na"&gt;retries&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;
    &lt;span class="na"&gt;shm_size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;128mb&lt;/span&gt;

  &lt;span class="na"&gt;app&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;listmonk/listmonk:v6.2.0&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;db&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;service_healthy&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"127.0.0.1:9000:9000"&lt;/span&gt;
    &lt;span class="na"&gt;env_file&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;.env&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;          &lt;span class="c1"&gt;# LISTMONK_db__password, LISTMONK_ADMIN_* for first run
&lt;/span&gt;    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;TZ&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Europe/Bratislava&lt;/span&gt;
      &lt;span class="na"&gt;LISTMONK_app__address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;0.0.0.0:9000&lt;/span&gt;
      &lt;span class="na"&gt;LISTMONK_db__host&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;db&lt;/span&gt;
      &lt;span class="na"&gt;LISTMONK_db__port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5432&lt;/span&gt;
      &lt;span class="na"&gt;LISTMONK_db__user&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;listmonk&lt;/span&gt;
      &lt;span class="na"&gt;LISTMONK_db__database&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;listmonk&lt;/span&gt;
      &lt;span class="na"&gt;LISTMONK_db__ssl_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;disable&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;sh&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s"&gt;-c&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"./listmonk --install --idempotent --yes --config '' &amp;amp;&amp;amp; ./listmonk --upgrade --yes --config '' &amp;amp;&amp;amp; ./listmonk --config ''"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;uploads:/listmonk/uploads&lt;/span&gt;

  &lt;span class="na"&gt;caddy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;caddy:2.10.2-alpine&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;depends_on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;app&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"80:80"&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"443:443"&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"443:443/udp"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./Caddyfile:/etc/caddy/Caddyfile:ro&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;caddy_data:/data&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;caddy_config:/config&lt;/span&gt;

&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pg&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;uploads&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;caddy_data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;caddy_config&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details are worth copying:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The startup command&lt;/strong&gt; runs &lt;code&gt;--install --idempotent&lt;/code&gt; and then &lt;code&gt;--upgrade&lt;/code&gt; before starting Listmonk. A fresh volume gets the schema created, and bumping the image tag applies database migrations on the next &lt;code&gt;docker compose up -d&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Port 9000 is bound to &lt;code&gt;127.0.0.1&lt;/code&gt;.&lt;/strong&gt; Only Caddy reaches Listmonk; nothing on the public interface does.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pin exact image tags (&lt;code&gt;v6.2.0&lt;/code&gt;, &lt;code&gt;17.6-alpine&lt;/code&gt;) rather than &lt;code&gt;latest&lt;/code&gt;. A newsletter server is something you want to upgrade on purpose, not by accident during a reboot.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caddy: One Admin Host, Many Public Hosts
&lt;/h2&gt;

&lt;p&gt;Each site gets a &lt;code&gt;news.&lt;/code&gt; subdomain (an A record pointing at the VPS), so confirmation and unsubscribe links carry the site's own domain. The admin UI and the API should only be reachable on one of them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
    email you@example.com
}

(listmonk) {
    encode gzip
    header -Server
    handle /newsletter/* {
        reverse_proxy signup:8000
    }
    handle {
        reverse_proxy app:9000
    }
}

# Admin UI lives on one host only; the others serve subscriber pages and the signup endpoint.
(public_only) {
    @private {
        path /admin /admin/* /api/*
        not path /api/public/*
    }
    respond @private 404
}

news.linuxcore.dev {
    import listmonk
}

news.site-two.com, news.site-three.eu {
    import public_only
    import listmonk
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you use Cloudflare for DNS, set these records to &lt;strong&gt;DNS only&lt;/strong&gt; (grey cloud) so Caddy can complete the ACME challenge itself.&lt;/p&gt;

&lt;p&gt;Listmonk has a single root URL setting, so every unsubscribe link would point at the admin host by default. I fixed that per site in the email templates with a Sprig &lt;code&gt;replace&lt;/code&gt; on &lt;code&gt;{{ UnsubscribeURL }}&lt;/code&gt;, swapping the root host for that site's &lt;code&gt;news.&lt;/code&gt; host.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sending Through Brevo's Free SMTP
&lt;/h2&gt;

&lt;p&gt;In Listmonk go to &lt;strong&gt;Settings → SMTP&lt;/strong&gt; and add Brevo's relay (&lt;code&gt;smtp-relay.brevo.com&lt;/code&gt;, port 587, STARTTLS) with the SMTP login and key from Brevo's dashboard. Before the first real send:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Verify each sending domain in Brevo&lt;/strong&gt; and add the SPF, DKIM and DMARC records it gives you. Without them, Gmail and Outlook will junk your mail or reject it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set a sliding window&lt;/strong&gt; under &lt;strong&gt;Settings → Performance&lt;/strong&gt;. Brevo's free plan caps you at 300 emails per day. I run a window of 290 messages per 24 hours, which leaves room for confirmation emails during a big send.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Send a test&lt;/strong&gt; to a Gmail address and open "Show original" to confirm SPF, DKIM and DMARC all say &lt;code&gt;PASS&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;With the sliding window on, a campaign to 1,000 subscribers simply takes about four days to drain instead of failing halfway. Once that delay starts to hurt, the cheapest upgrade is pointing Listmonk at Amazon SES at $0.10 per 1,000 emails. Swapping the SMTP server is a settings change; nothing else in the stack moves.&lt;/p&gt;

&lt;h2&gt;
  
  
  Double Opt-In: Why I Wrote a Signup Service
&lt;/h2&gt;

&lt;p&gt;Listmonk supports double opt-in lists out of the box. I still replaced its confirmation flow with a small Python service, for two reasons I only found after going live:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The opt-in email is global.&lt;/strong&gt; Its sender and subject are instance-wide settings, so a reader who signs up on a recipe site gets a confirmation "from" your Linux blog. That looks like phishing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The confirmation page needs a second click.&lt;/strong&gt; Listmonk's opt-in link opens a page with a confirm button. Readers clicked the link in the email, saw a page, closed it and never confirmed. I missed that button myself on my first test signup.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The fix: turn off Listmonk's own opt-in mail (&lt;code&gt;app.send_optin_confirmation = false&lt;/code&gt;) and let a signup endpoint do three things. It adds the subscriber as unconfirmed, sends a branded confirmation through Listmonk's transactional API, and serves a confirmation page that completes the opt-in by itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sub&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;lm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"/api/subscribers"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"@"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"enabled"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"lists"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"list_id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"preconfirm_subscriptions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;optin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{site['news']}/newsletter/confirm?"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;urlencode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"s"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;sub&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"uuid"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"l"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;list_uuid&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;lm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;call&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"POST"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"/api/tx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"subscriber_email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"template_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;confirm_template&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;site_key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"from_email"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;site&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"from"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"subject"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Confirm your {site['name']} subscription"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"content_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"html"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"data"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"optin_url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;optin&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The confirmation endpoint then posts to Listmonk's own &lt;code&gt;/subscription/optin/{uuid}&lt;/code&gt; handler. All double opt-in rules stay inside Listmonk; the service only changes how the email and the page look. The service is the Python standard library only (&lt;code&gt;http.server&lt;/code&gt; plus &lt;code&gt;urllib&lt;/code&gt;), so it runs in a bare &lt;code&gt;python:3.13-alpine&lt;/code&gt; image without a &lt;code&gt;requirements.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Add two cheap defenses to any public signup endpoint:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;A honeypot field&lt;/strong&gt; (a hidden &lt;code&gt;website&lt;/code&gt; input) that bots fill and humans don't.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A per-site rate limit&lt;/strong&gt; so a script can't use your form to mail-bomb strangers through your Brevo quota.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Welcome Sequences Without an Automation Builder
&lt;/h2&gt;

&lt;p&gt;Listmonk has no built-in drip automation. A cron job every 10 minutes covers it: read confirmed subscribers per list from &lt;code&gt;/api/subscribers&lt;/code&gt;, work out how many days each has been subscribed, and send the next due email through &lt;code&gt;/api/tx&lt;/code&gt;. A small JSON state file records what each subscriber already received.&lt;/p&gt;

&lt;p&gt;One trap: an unsubscribe link only works inside a campaign, because Listmonk needs a campaign to know which lists the reader is leaving. Transactional emails have no campaign. I create one draft "anchor" campaign per list that is never sent, and build the welcome emails' unsubscribe links against its UUID.&lt;/p&gt;

&lt;h2&gt;
  
  
  Weekly Digests From RSS
&lt;/h2&gt;

&lt;p&gt;Each site's digest is a cron job that reads the site's RSS feed and keeps the posts published since the last send. If there are none, it exits. The very first run only records the current time, so new subscribers never get the whole back catalogue. Otherwise it renders them into the site's campaign template, creates the campaign through &lt;code&gt;/api/campaigns&lt;/code&gt;, and starts it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# /etc/crontab style, CRON_TZ=Europe/Bratislava&lt;/span&gt;
0 8 * * 5 &lt;span class="nb"&gt;cd&lt;/span&gt; /opt/listmonk &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; docker compose run --rm --no-deps -T signup python digest.py linuxcore
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running the scripts through &lt;code&gt;docker compose run&lt;/code&gt; on the signup image means the host needs nothing beyond Docker, and the scripts reach Listmonk on the internal network at &lt;code&gt;http://app:9000&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Backups
&lt;/h2&gt;

&lt;p&gt;Your subscriber list is the asset. Losing it means losing every confirmed opt-in. A nightly &lt;code&gt;pg_dump&lt;/code&gt; with 14 days of retention covers it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/sh&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; -e
&lt;span class="nb"&gt;umask&lt;/span&gt; 077
&lt;span class="nb"&gt;cd&lt;/span&gt; /opt/listmonk
&lt;span class="nv"&gt;f&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;backups/listmonk-&lt;span class="nv"&gt;$(&lt;/span&gt;date +%F&lt;span class="o"&gt;)&lt;/span&gt;.sql.gz
docker compose &lt;span class="nb"&gt;exec&lt;/span&gt; -T db pg_dump -U listmonk listmonk &lt;span class="o"&gt;|&lt;/span&gt; gzip &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"$f.tmp"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; mv &lt;span class="s2"&gt;"$f.tmp"&lt;/span&gt; &lt;span class="s2"&gt;"$f"&lt;/span&gt;
find backups -type f -mtime +14 -delete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then pull those files to a second machine. A backup that lives only on the VPS disappears with the VPS. My laptop pulls them every morning at 04:45 with &lt;code&gt;rsync&lt;/code&gt; over SSH.&lt;/p&gt;

&lt;h2&gt;
  
  
  Migrating Subscribers From MailerLite
&lt;/h2&gt;

&lt;p&gt;Export each list from MailerLite as CSV and import it through Listmonk's API with &lt;code&gt;preconfirm_subscriptions: true&lt;/code&gt;. These people already confirmed with you once, and making them confirm again loses a large share of them. Keep the original subscribe date in the subscriber's attributes so a welcome sequence knows who has already received which email. Pause the welcome cron while you import, or the new subscribers all get email one at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Settings API Trap
&lt;/h2&gt;

&lt;p&gt;If you script Listmonk's configuration, know this before you run it: &lt;code&gt;GET /api/settings&lt;/code&gt; returns every password field masked as &lt;code&gt;•••&lt;/code&gt;. If you &lt;code&gt;PUT&lt;/code&gt; that object back unchanged, Listmonk saves the mask as your real SMTP password, and every send fails with an authentication error. Blank the password fields (&lt;code&gt;""&lt;/code&gt;) before any settings &lt;code&gt;PUT&lt;/code&gt;; Listmonk keeps the stored value when the field is empty. I learned this the hard way and had to re-enter the Brevo key.&lt;/p&gt;

&lt;h2&gt;
  
  
  When Self-Hosting Is the Wrong Call
&lt;/h2&gt;

&lt;p&gt;This setup suits technical site owners running one or more small lists. It's the wrong choice if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;You need a visual automation builder&lt;/strong&gt; or e-commerce triggers. Listmonk is lists, templates and campaigns, and anything beyond that is your own code.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;You send to tens of thousands daily&lt;/strong&gt; and want someone else to own deliverability monitoring.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nobody will patch the server.&lt;/strong&gt; An unpatched public VPS holding a list of email addresses is a GDPR problem waiting to happen. Keep SSH key-only and root login off, and allow only 22, 80 and 443 through the firewall.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For everyone else, the stack costs under €8 a month, or nothing on an existing homelab. It runs four newsletters from one place, and you own the list outright.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can I run a newsletter completely free?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes, if you already have an always-on homelab machine. Run Listmonk there, expose only the signup and subscriber pages through a Cloudflare Tunnel, and send through Brevo's free SMTP plan, which allows 300 emails per day. The only cost is electricity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does a self-hosted Listmonk newsletter cost on a VPS?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Under €8 a month including VAT. Listmonk, Postgres, Caddy and a small Python signup service use roughly 100 MB of RAM together, so a 1 vCPU / 1 GB VPS such as Hetzner's CPX02 is enough. Brevo's free plan covers sending up to 300 emails per day. Hetzner's CX23 costs €5.49 when it is in stock.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Listmonk send email itself?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Listmonk manages subscribers, lists, templates and campaigns, then hands each message to an SMTP server. Using a relay like Brevo or Amazon SES keeps your VPS IP out of the deliverability picture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Listmonk support welcome email sequences?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Listmonk has no built-in drip automation. A short cron script that reads confirmed subscribers from the Listmonk API and sends each step through the transactional API (/api/tx) does the same job.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens when I outgrow Brevo's 300 emails per day?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Listmonk's sliding window spreads a campaign across several days. When that gets too slow, point Listmonk at Amazon SES, which costs $0.10 per 1,000 emails without a plan, or a paid Brevo plan.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/homelab/self-host-listmonk-newsletter-brevo-vps-guide/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>listmonk</category>
      <category>newsletter</category>
      <category>docker</category>
    </item>
    <item>
      <title>Astro MDX vs Markdoc: Which Fits Content Sites?</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Wed, 25 Nov 2026 23:42:03 +0000</pubDate>
      <link>https://dev.to/linuxcore/astro-mdx-vs-markdoc-which-fits-content-sites-che</link>
      <guid>https://dev.to/linuxcore/astro-mdx-vs-markdoc-which-fits-content-sites-che</guid>
      <description>&lt;p&gt;The choice between Astro MDX and Markdoc comes down to trust and strictness. MDX treats your Markdown files as JavaScript modules. It allows arbitrary imports and complex inline logic directly in the content file, giving you total freedom at the cost of stability. Markdoc, developed by Stripe for their engineering documentation, does not allow mixing arbitrary code and content. It parses your content into an Abstract Syntax Tree (AST) against a strict, predefined schema.&lt;/p&gt;

&lt;p&gt;If you run a personal homelab blog or a small portfolio site where you are the sole author, MDX makes sense. If you are building documentation sites, wikis, or project manuals with multiple contributors, Markdoc is the superior choice. Its strict schema enforcement prevents broken JSX syntax from failing your CI pipelines and breaking the site.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Architectural Difference
&lt;/h2&gt;

&lt;p&gt;When Astro processes an MDX file via the &lt;code&gt;@astrojs/mdx&lt;/code&gt; integration, it passes the document through Vite and Rollup. Every &lt;code&gt;.mdx&lt;/code&gt; file is compiled into a JSX module. You can write standard JavaScript &lt;code&gt;import&lt;/code&gt; statements at the top of the file, bring in React or Svelte components, and drop them directly into the text.&lt;/p&gt;

&lt;p&gt;Markdoc operates under a fundamentally different model via the &lt;code&gt;@astrojs/markdoc&lt;/code&gt; integration. A &lt;code&gt;.mdoc&lt;/code&gt; file does not compile down to a standalone script. It is parsed by Markdoc's custom engine into an AST. You cannot import anything inside a Markdoc file. Instead, you define custom tags centrally in a configuration file and map those tags to your Astro components. Content authors then use a liquid-style syntax, such as &lt;code&gt;{% callout %}&lt;/code&gt;, to invoke those components.&lt;/p&gt;

&lt;h2&gt;
  
  
  MDX: Unrestricted Flexibility
&lt;/h2&gt;

&lt;p&gt;MDX is the default standard for many static site generators. It requires virtually zero configuration. Once you install the integration, you change your file extensions to &lt;code&gt;.mdx&lt;/code&gt; and start writing.&lt;/p&gt;

&lt;p&gt;This approach excels for highly custom, one-off pages. If you need a unique interactive chart on a single blog post, you just import the charting library directly into that specific &lt;code&gt;.mdx&lt;/code&gt; file. You do not have to update a global configuration to support a component you will only use once.&lt;/p&gt;

&lt;p&gt;The flexibility of MDX becomes a liability on content-heavy sites. Because MDX evaluates as code, a single syntax error breaks the entire page build. A missing closing bracket on a component, an unescaped curly brace in a paragraph, or a typo in an import path will cause Vite to throw a fatal error. When non-developers write content, they inevitably trigger these build failures.&lt;/p&gt;

&lt;p&gt;Furthermore, MDX tightly couples your content to your current component architecture. If you embed &lt;code&gt;import { Notice } from '../../components/Notice.astro'&lt;/code&gt; across four hundred files, migrating that component or changing the folder structure requires a massive find-and-replace operation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Markdoc: Strict Schema Enforcement
&lt;/h2&gt;

&lt;p&gt;Markdoc solves the fragility of MDX by removing logic from the content layer. A &lt;code&gt;.mdoc&lt;/code&gt; file only contains Markdown and explicit custom tags.&lt;/p&gt;

&lt;p&gt;By defining a schema in your project root, you declare exactly which tags are allowed, what attributes they accept, and what data types those attributes require. If an author forgets a mandatory attribute or passes an integer where a string is expected, Markdoc catches the error during validation. This shifts the failure point from a cryptic Vite build error to a clear, schema-based validation warning.&lt;/p&gt;

&lt;p&gt;The trade-off is configuration overhead. You cannot drop a new component into a specific page on a whim. Every interactive element requires registration in the central configuration file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variables and Conditional Rendering
&lt;/h2&gt;

&lt;p&gt;MDX handles dynamic content using standard JavaScript. If you want to conditionally render a block of text, you use standard JSX syntax like &lt;code&gt;{featureEnabled &amp;amp;&amp;amp; &amp;lt;p&amp;gt;New UI Active&amp;lt;/p&amp;gt;}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Markdoc approaches this using built-in variables. You define global variables in your Astro configuration and reference them in your content with a dollar sign. Markdoc includes native &lt;code&gt;{% if %}&lt;/code&gt; tags for conditional logic based on these variables.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;{% if $featureFlags.newUI %}
The new interface is now active on your dashboard.
{% /if %}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This variable system is highly effective for documentation versioning. You can pass a version string as a variable and conditionally hide or show API endpoints in the text based on the specific documentation build, all without writing raw JavaScript in the content file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Content Collections Compatibility
&lt;/h2&gt;

&lt;p&gt;Both formats integrate natively with Astro Content Collections. You define your frontmatter schemas using Zod in &lt;code&gt;src/content.config.ts&lt;/code&gt;. The frontmatter validation is identical regardless of whether you author the file in MDX or Markdoc.&lt;/p&gt;

&lt;p&gt;Where they differ is how they handle the body content. In an MDX collection entry, you render the body using Astro's `` component, which executes the compiled JSX. In a Markdoc collection entry, Astro maps the AST nodes to the components you defined in your Markdoc configuration before rendering the HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Installation and Configuration
&lt;/h2&gt;

&lt;p&gt;To evaluate Markdoc in an existing Astro environment, use the Astro CLI to install the integration.&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;bash&lt;/p&gt;

&lt;h1&gt;
  
  
  Install the Markdoc integration
&lt;/h1&gt;

&lt;p&gt;npx astro add markdoc&lt;br&gt;
&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;This command automatically updates your &lt;code&gt;astro.config.mjs&lt;/code&gt; file. Next, create a &lt;code&gt;markdoc.config.mjs&lt;/code&gt; file at the root of your project. This is where you map your custom tags to your Astro components.&lt;/p&gt;

&lt;p&gt;`&lt;code&gt;&lt;/code&gt;javascript&lt;br&gt;
import { defineMarkdocConfig, component } from '@astrojs/markdoc/config';&lt;/p&gt;

&lt;p&gt;export default defineMarkdocConfig({&lt;br&gt;
  tags: {&lt;br&gt;
    banner: {&lt;br&gt;
      render: component('./src/components/Banner.astro'),&lt;br&gt;
      attributes: {&lt;br&gt;
        type: { type: String, default: 'info' },&lt;br&gt;
        title: { type: String, required: true }&lt;br&gt;
      }&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
});&lt;br&gt;
&lt;code&gt;&lt;/code&gt;`&lt;/p&gt;

&lt;p&gt;Content authors can now use the &lt;code&gt;{% banner %}&lt;/code&gt; tag in any &lt;code&gt;.mdoc&lt;/code&gt; file within your content collections. They do not need to know the path to the component or understand how it works under the hood.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`markdown&lt;br&gt;
{% banner type="warning" title="Deprecation Notice" %}&lt;br&gt;
This API endpoint is scheduled for removal in the next major release.&lt;br&gt;
{% /banner %}&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Editor Experience and Tooling
&lt;/h2&gt;

&lt;p&gt;The developer experience in the editor highlights the philosophical divide between the two formats.&lt;/p&gt;

&lt;p&gt;With MDX, your editor treats the file as TypeScript or JSX. You get standard autocomplete for React or Astro components, but only if you write the import statement correctly. Spellcheckers and Markdown linters often struggle with MDX because the intertwined code confuses the parsers.&lt;/p&gt;

&lt;p&gt;Markdoc offers a dedicated language server and VS Code extension. By creating a &lt;code&gt;markdoc.config.json&lt;/code&gt; file in your project root, you point the extension to your &lt;code&gt;markdoc.config.mjs&lt;/code&gt; schema.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`json&lt;br&gt;
[&lt;br&gt;
  {&lt;br&gt;
    "id": "docs-site",&lt;br&gt;
    "path": "src/content",&lt;br&gt;
    "schema": {&lt;br&gt;
      "path": "markdoc.config.mjs",&lt;br&gt;
      "type": "esm",&lt;br&gt;
      "property": "default",&lt;br&gt;
      "watch": true&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
]&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Once configured, the Markdoc extension provides native autocomplete for tags. When an author types &lt;code&gt;{%&lt;/code&gt;, a dropdown appears showing all permitted tags. If they select &lt;code&gt;banner&lt;/code&gt;, the editor prompts them to fill in the required &lt;code&gt;title&lt;/code&gt; attribute. This intelligent tooling bridges the gap between raw text editors and complex headless CMS interfaces, making it drastically easier for non-technical users to contribute structured content safely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Astro Starlight Integration
&lt;/h2&gt;

&lt;p&gt;Astro's official documentation theme, Starlight, supports both MDX and Markdoc natively. By default, Starlight supports authoring content in Markdown and MDX with no configuration required. If you add the Markdoc integration, Starlight provides a &lt;code&gt;Starlight Markdoc preset&lt;/code&gt;. This preset automatically registers Starlight's built-in UI components, such as &lt;code&gt;&amp;lt;Card&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;Tabs&amp;gt;&lt;/code&gt;, as Markdoc tags.&lt;/p&gt;

&lt;p&gt;You can initialize a Markdoc-enabled Starlight project directly from the Astro CLI:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`bash&lt;br&gt;
npm create astro@latest -- --template starlight/markdoc&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This creates a ready-to-deploy documentation site where authors can use &lt;code&gt;{% card title="Notice" %}&lt;/code&gt; immediately, without writing a custom &lt;code&gt;markdoc.config.mjs&lt;/code&gt; file from scratch. Starlight's implementation proves that Markdoc scales to massive documentation hubs while keeping the authoring experience simple.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hosting Your Built Documentation
&lt;/h2&gt;

&lt;p&gt;Astro compiles both MDX and Markdoc down to static HTML files during the build process. Unless you specifically configure Server-Side Rendering (SSR), the output is entirely static.&lt;/p&gt;

&lt;p&gt;For a homelab or self-hosted deployment, serving these static files via a lightweight web server is the most efficient method. After running &lt;code&gt;npm run build&lt;/code&gt;, Astro places the generated HTML, CSS, and optimized assets into the &lt;code&gt;dist&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;You can serve this directory using a standard Nginx container with Docker Compose. This stack uses fewer than 15MB of RAM and handles thousands of concurrent requests.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;`yaml&lt;br&gt;
services:&lt;br&gt;
  docs-site:&lt;br&gt;
    image: nginx:1.25-alpine&lt;br&gt;
    container_name: astro-docs&lt;br&gt;
    ports:&lt;br&gt;
      - "8080:80"&lt;br&gt;
    volumes:&lt;br&gt;
      - ./dist:/usr/share/nginx/html:ro&lt;br&gt;
    restart: unless-stopped&lt;br&gt;
`&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Deploying this configuration requires a simple &lt;code&gt;docker compose up -d&lt;/code&gt;. The Nginx container will serve your Astro site directly from the mapped volume.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which Format Fits Your Site?
&lt;/h2&gt;

&lt;p&gt;Pick MDX if you are building a personal site, a developer blog, or a highly interactive presentation. The ability to import arbitrary components into a specific file eliminates the friction of maintaining a global schema. If you are the only person writing the content, you can manage the risk of syntax errors yourself.&lt;/p&gt;

&lt;p&gt;Pick Markdoc if you are building an organizational wiki, API documentation, or any project where multiple people contribute text. The separation of logic from content keeps your files clean and readable. The schema validation acts as a guardrail, ensuring authors cannot deploy malformed JSX and break the site build.&lt;/p&gt;

&lt;p&gt;Using Markdoc also future-proofs your content. Because your &lt;code&gt;.mdoc&lt;/code&gt; files contain no framework-specific import statements, migrating your documentation from Astro to another platform in the future requires significantly less effort than untangling a web of MDX imports.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-md-vs-mdx-performance-guide/" rel="noopener noreferrer"&gt;Astro MD vs MDX: Content Collection Build Performance&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-static-site-search-pagefind-guide/" rel="noopener noreferrer"&gt;Pagefind Astro Tutorial: Static Site Full Text Search&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-starlight-automated-docs-testing-ci-guide/" rel="noopener noreferrer"&gt;Astro Starlight Testing: Test Code Snippets in CI&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/nextjs-to-astro-5-migration-homelab-cost-performance/" rel="noopener noreferrer"&gt;Migrating Next.js to Astro: What Changes and Why&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can I use both MDX and Markdoc in the same Astro project?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. You can install both @astrojs/mdx and @astrojs/markdoc integrations simultaneously and map them to different content collections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Markdoc support React components in Astro?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. As long as the React component is configured in markdoc.config.mjs, Markdoc renders it via Astro's component framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need a Node server to host Astro Markdoc sites?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Astro compiles both MDX and Markdoc down to static HTML by default. The output can be hosted on any standard web server like Nginx or Caddy.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/astro/astro-mdx-vs-markdoc-comparison/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>astro</category>
      <category>mdx</category>
      <category>markdoc</category>
    </item>
    <item>
      <title>Uptime Kuma vs Beszel: Homelab Monitoring Pick</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Fri, 20 Nov 2026 23:42:03 +0000</pubDate>
      <link>https://dev.to/linuxcore/uptime-kuma-vs-beszel-homelab-monitoring-pick-5c54</link>
      <guid>https://dev.to/linuxcore/uptime-kuma-vs-beszel-homelab-monitoring-pick-5c54</guid>
      <description>&lt;p&gt;When choosing between Uptime Kuma and Beszel for homelab monitoring, the decision centers on what data you actually need. Uptime Kuma acts as an external endpoint checker that verifies if a service responds on a specific port or URL. Beszel operates as a lightweight host monitor that tracks internal server resources like CPU, memory, and disk utilization via installed agents. Because they solve different problems, experienced homelabbers run both side by side to catch application failures and resource exhaustion simultaneously.&lt;/p&gt;

&lt;h2&gt;
  
  
  Uptime Kuma: Endpoint Status Pages
&lt;/h2&gt;

&lt;p&gt;Uptime Kuma determines if the target service is online. You configure it to hit an HTTP URL, a TCP port, or a DNS record. The server initiates a connection at a defined interval, logs the response time, and triggers an alert if the check fails. It handles public status pages and routes failure notifications to more than 90 supported platforms, including Discord, Telegram, and email.&lt;/p&gt;

&lt;p&gt;Uptime Kuma operates externally, independent of the underlying operating system of the target application. You manage all configurations through the web interface. The default Docker container listens on port &lt;code&gt;3001&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Beyond standard HTTP status codes, Uptime Kuma executes keyword checks. This configuration downloads the HTML response and verifies that a specific text string exists. This catches scenarios where a reverse proxy returns a 200 OK status, but the application backend actually rendered a blank page or a PHP error trace.&lt;/p&gt;

&lt;p&gt;For backup scripts and cron jobs, Uptime Kuma offers push monitors. Instead of the monitoring server initiating a connection, the tool generates a unique URL. Your remote script executes a simple curl command to this URL upon completion. If Uptime Kuma does not receive a request within the defined time window, it marks the job as failed.&lt;/p&gt;

&lt;h3&gt;
  
  
  Uptime Kuma Trade-offs
&lt;/h3&gt;

&lt;p&gt;Uptime Kuma stores its configuration and historical response data in a local SQLite database mapped to &lt;code&gt;/app/data&lt;/code&gt; inside the container. You must mount this path to a fast, local filesystem on the Docker host. The official documentation explicitly warns against storing this directory on an NFS or SMB network share. SQLite requires strict POSIX file locking to prevent database corruption. Network filesystems frequently handle these locks incorrectly, resulting in irrecoverable database failures.&lt;/p&gt;

&lt;p&gt;Another common configuration issue involves Docker container monitoring. If you map &lt;code&gt;/var/run/docker.sock&lt;/code&gt; into the Uptime Kuma container, the application reads the local Docker daemon to check container states. Passing socket access to a monitoring tool grants it root-level control over the host. A compromised Uptime Kuma instance can start, stop, or delete any container. A safer approach limits checks to HTTP and TCP requests across a Docker network bridge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Beszel Monitoring: Host Resources
&lt;/h2&gt;

&lt;p&gt;Beszel tracks a different metric: host performance and resource bottlenecks. Instead of pinging external ports, Beszel relies on a hub-and-spoke architecture. The central hub runs as a Docker container on port &lt;code&gt;8090&lt;/code&gt;. You then deploy a lightweight Beszel agent on every physical machine or virtual machine you want to track.&lt;/p&gt;

&lt;p&gt;The agent extracts system metrics directly from the Linux kernel and the local Docker socket. It pushes CPU load, RAM usage, swap activity, disk I/O, and individual container resource limits back to the hub. The hub aggregates this data into a dashboard offering visual graphs.&lt;/p&gt;

&lt;p&gt;Beszel requires strict key management. The hub does not poll random IP addresses on your network. When you add a new system in the Beszel web interface, the application generates a unique cryptographic key. You pass this key to the agent on the target machine using the &lt;code&gt;KEY&lt;/code&gt; environment variable. The agent binds to port &lt;code&gt;45876&lt;/code&gt; by default and waits for authorized requests.&lt;/p&gt;

&lt;p&gt;This agent architecture ensures secure data polling. The agent uses the provided Ed25519 public key to verify incoming requests. If an unauthorized scanner hits port &lt;code&gt;45876&lt;/code&gt; on your host, the agent drops the connection without returning any metrics. Bad actors cannot profile your server's hardware utilization.&lt;/p&gt;

&lt;h3&gt;
  
  
  Beszel Trade-offs
&lt;/h3&gt;

&lt;p&gt;Beszel targets users who want quick visibility, not enterprise observability. It uses significantly less memory than a full Prometheus and Node Exporter stack. The hub container idles around 50MB of RAM, and the agent uses less than 20MB. This makes Beszel ideal for resource-constrained environments like older mini PCs or budget cloud virtual machines.&lt;/p&gt;

&lt;p&gt;Beszel lacks an advanced query language. You cannot write custom queries to trigger alerts on compound conditions, such as sending a notification if disk space drops below 10 percent while CPU usage exceeds 80 percent for five consecutive minutes. The alerting engine supports basic, flat thresholds. If a host goes offline or memory exceeds a static percentage, the hub triggers a webhook.&lt;/p&gt;

&lt;p&gt;Beszel stores its historical metrics in a local database managed by PocketBase, located in the &lt;code&gt;/beszel_data&lt;/code&gt; directory. Like Uptime Kuma, you must mount this on a local filesystem to avoid lock contention. The hub retains data based on strict aggregation rules. It keeps high-resolution data for recent hours, then averages it into hourly or daily blocks for long-term storage to prevent infinite database growth.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Both in Your Homelab
&lt;/h2&gt;

&lt;p&gt;Comparing Uptime Kuma against Beszel presents a false dichotomy. Endpoint checks do not warn you about a slow memory leak until the application crashes entirely. Host metrics do not indicate if an application threw a 500 Internal Server Error, because the host CPU and RAM might look perfectly normal during a software fault.&lt;/p&gt;

&lt;p&gt;To achieve complete visibility, deploy them on the same host using a combined Docker Compose stack. Map the data directories to local paths and configure the restart policies to keep the monitoring stack online after a server reboot.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;uptime-kuma&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;louislam/uptime-kuma:2&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;uptime-kuma&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"3001:3001"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./kuma-data:/app/data&lt;/span&gt;

  &lt;span class="na"&gt;beszel-hub&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;henrygd/beszel:latest&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;beszel-hub&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"8090:8090"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./beszel-data:/beszel_data&lt;/span&gt;

  &lt;span class="na"&gt;beszel-agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;henrygd/beszel-agent:latest&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;beszel-agent&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;
    &lt;span class="na"&gt;network_mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;host&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/var/run/docker.sock:/var/run/docker.sock:ro&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;PORT&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;45876&lt;/span&gt;
      &lt;span class="na"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"YOUR_PUBLIC_KEY_FROM_THE_HUB"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this deployment, Uptime Kuma monitors the HTTP responses of your proxy and the functional uptime of your services. Beszel monitors the disk space and Docker container limits of the host running those services. The Beszel agent binds directly to the host network interface to ensure accurate network throughput metrics. It requires read-only access to the Docker socket to report on individual container performance.&lt;/p&gt;

&lt;p&gt;Because both tools use minimal resources, hosting them on a single node avoids impacting the performance of your primary applications. If your homelab spans multiple physical machines, keep Uptime Kuma and the Beszel hub on your primary node. Deploy just the &lt;code&gt;beszel-agent&lt;/code&gt; service to the satellite machines.&lt;/p&gt;

&lt;p&gt;When an application fails, you check Uptime Kuma to see exactly when the HTTP check dropped. You then check Beszel to see if the host ran out of memory or saturated its network link at the exact same timestamp.&lt;/p&gt;

&lt;p&gt;Both tools provide web-based user interfaces. Exposing them directly to the internet on ports &lt;code&gt;3001&lt;/code&gt; and &lt;code&gt;8090&lt;/code&gt; leaves their login portals vulnerable to automated brute-force attacks. Place them behind a reverse proxy to handle SSL termination. Both applications rely heavily on real-time interface updates. If you configure a reverse proxy, you must explicitly enable WebSocket proxying, or the dashboards will fail to load live metrics.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/grafana-prometheus-homelab/" rel="noopener noreferrer"&gt;Grafana + Prometheus Homelab Monitoring in 30 Minutes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/docker-compose-homelab-stack/" rel="noopener noreferrer"&gt;Docker Compose Homelab Stack: 20 Services, One File&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/sqlite-wal-mode-locking-homelab-optimization/" rel="noopener noreferrer"&gt;Fixing SQLite WAL Mode Reader Locks in Your Homelab&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/ten-euro-month-aws-stack/" rel="noopener noreferrer"&gt;A Minimal AWS Stack: VPS, DNS, Monitoring, Backups&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the main difference between Uptime Kuma and Beszel?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Uptime Kuma monitors external endpoints and network services to check if they are online. Beszel monitors internal host resources like CPU, memory, and disk usage via an installed agent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can Uptime Kuma monitor Docker container resource usage?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Uptime Kuma can check if a Docker container is running by mapping the Docker socket, but it does not track granular resource utilization like RAM or CPU usage. You need a tool like Beszel for resource metrics.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need a reverse proxy for Beszel and Uptime Kuma?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Both tools provide HTTP web interfaces that should not be exposed directly to the public internet. A reverse proxy handles SSL termination and adds a layer of access control.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/homelab/uptime-kuma-vs-beszel-homelab-monitoring/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>monitoring</category>
      <category>docker</category>
      <category>selfhosted</category>
    </item>
    <item>
      <title>AWS Budget vs Cost Explorer: Which to Use?</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Wed, 18 Nov 2026 23:42:03 +0000</pubDate>
      <link>https://dev.to/linuxcore/aws-budget-vs-cost-explorer-which-to-use-156f</link>
      <guid>https://dev.to/linuxcore/aws-budget-vs-cost-explorer-which-to-use-156f</guid>
      <description>&lt;p&gt;AWS Budgets and AWS Cost Explorer solve two different sides of the same problem. AWS Budgets is a proactive guardrail that monitors actual and forecasted spend, triggering alerts or automated actions before your bill spirals out of control. AWS Cost Explorer is a retrospective analytics tool that dissects your historical usage to show exactly which service burned your money. If you run a homelab, a self-hosted VPN gateway, or a personal web application on AWS, you must configure both. Budgets stop you from draining your bank account, and Cost Explorer helps you pinpoint the architectural flaw so it does not happen again.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Budgets: The Hard Guardrail
&lt;/h2&gt;

&lt;p&gt;AWS Budgets tracks your costs and usage, evaluating your metrics multiple times a day. It is the closest native tool AWS provides to a hard spending limit. You can define budgets based on total monthly costs, filter them down to specific services, or track the utilization of specific AWS Free Tier limits.&lt;/p&gt;

&lt;p&gt;For a homelab administrator, a hard budget is non-negotiable. An orphaned Amazon EKS cluster, a misconfigured Lambda function looping indefinitely, or a compromised IAM access key can rack up thousands of dollars in a weekend. AWS provides two action-enabled budgets for free. Budgets without actions (which only send email or SNS alerts) are entirely free.&lt;/p&gt;

&lt;p&gt;Budget Actions turn a simple alert into an automated response. When a cost threshold is breached, AWS Budgets can automatically apply an IAM deny policy to a user, attach a strict Service Control Policy (SCP) via AWS Organizations, or stop specific EC2 instances and RDS databases. &lt;/p&gt;

&lt;p&gt;To create a basic $10 monthly cost budget using the AWS CLI, you define your budget limits and your notification preferences in two JSON files. First, specify the budget parameters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"BudgetName"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"homelab-guardrail"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"BudgetLimit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"Amount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"10"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"Unit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"USD"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"TimeUnit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MONTHLY"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"BudgetType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"COST"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, configure the notification to email you when your actual spend crosses 80 percent of the limit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"Notification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"NotificationType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ACTUAL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"ComparisonOperator"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"GREATER_THAN"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"Threshold"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"ThresholdType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"PERCENTAGE"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"Subscribers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nl"&gt;"SubscriptionType"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"EMAIL"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="nl"&gt;"Address"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"admin@example.com"&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the configuration with the AWS CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws budgets create-budget \
    --account-id 123456789012 \
    --budget file://budget.json \
    --notifications-with-subscribers file://notifications.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A critical constraint of AWS Budgets is its evaluation frequency. AWS Budgets information updates up to three times a day, typically every 8 to 12 hours. If a severe compute spike occurs between calculation windows, your usage will exceed the budget before the action triggers. It is a vital safety net, but it is not an instant kill switch.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS Cost Explorer: The Post-Mortem Tool
&lt;/h2&gt;

&lt;p&gt;When a budget alert fires, the resulting email tells you that money was spent, but it lacks the granular context to explain the root cause. This is where AWS Cost Explorer takes over.&lt;/p&gt;

&lt;p&gt;Cost Explorer is a visual query engine for your cloud bill. It allows you to group and filter your spending by service, region, instance type, or custom tags. The web interface is free to use. By default, it displays daily granularity. You can opt into hourly granularity; check the official AWS Cost Explorer pricing documentation for current rates. For a small homelab footprint, this hourly tracking costs fractions of a cent and provides critical visibility into short-lived tasks or auto-scaling events.&lt;/p&gt;

&lt;p&gt;While the web UI is free, programmatic access is not. Querying Cost Explorer via the API incurs a per-request fee; see the official AWS documentation for current pricing. If you use third-party FinOps tools or write custom bash scripts to pull daily cost metrics, those API calls compound quickly. Stick to the web console for standard homelab monitoring to avoid generating a bill simply by checking your bill.&lt;/p&gt;

&lt;p&gt;The primary limitation of Cost Explorer is its reporting lag. Usage data typically takes at least 24 hours to appear in the console, though some data can take longer. If you spin up a massive bare-metal instance by mistake and shut it down an hour later, you will not see that cost spike in Cost Explorer until the following day. It is strictly a retrospective diagnostic tool.&lt;/p&gt;

&lt;p&gt;To troubleshoot a spike, open the Cost Explorer UI and group your costs by &lt;strong&gt;Service&lt;/strong&gt; or &lt;strong&gt;Usage Type&lt;/strong&gt;. If you notice a generic category like "EC2-Instances" driving the cost, switch the grouping to &lt;strong&gt;Instance Type&lt;/strong&gt; or &lt;strong&gt;Region&lt;/strong&gt; to locate the exact resource. &lt;/p&gt;

&lt;p&gt;A common homelab trap involves cost allocation tags. Tagging your resources allows you to filter Cost Explorer data down to specific projects. However, tags do not appear in Cost Explorer automatically. You must explicitly activate user-defined cost allocation tags in the Billing and Cost Management console. Once activated, they take up to 24 hours to populate in your reports.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Homelab Strategy: Layering Your Defenses
&lt;/h2&gt;

&lt;p&gt;Self-hosters often try to rely solely on the AWS Free Tier or manual console checks. This strategy fails the moment an Elastic IP is left unattached or outbound bandwidth limits are exceeded. New AWS accounts receive generous 12-month Free Tier allowances, but when those expire, your architecture silently converts to standard pay-as-you-go pricing. Set up a layered defense using both tools to catch these transitions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Track Free Tier Usage:&lt;/strong&gt; AWS Budgets includes a specific Free Tier usage tracking option. Set it to alert you via email when you hit 80 percent of your limit. This catches runaway bandwidth or left-behind EBS volumes before they convert to paid, on-demand usage.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Set a Near-Zero Budget:&lt;/strong&gt; Create a $5 cost budget alerting at 100 percent. If your infrastructure is designed to run entirely within the Free Tier, this budget acts as a canary. It alerts you to the first few cents of unexpected overage, such as KMS API calls or Route 53 hosted zone charges.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automate the Stop:&lt;/strong&gt; Configure your second free action-enabled budget to stop non-critical EC2 instances if your spend hits $20. This prevents a misconfigured script from maxing out your credit card while you sleep.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Schedule a Weekly Cost Explorer Review:&lt;/strong&gt; Even if your budget alerts stay quiet, check Cost Explorer once a week. Group your view by &lt;strong&gt;Usage Type&lt;/strong&gt; and exclude credits. You might spot a few cents dripping away on inactive elastic IP addresses, NAT Gateway hourly charges, or CloudWatch metric storage. Identifying these micro-charges early prevents them from compounding.&lt;/p&gt;

&lt;p&gt;AWS Budgets acts as your smoke alarm. AWS Cost Explorer acts as your fire investigator. Relying on Budgets alone leaves you blind to where the leaks are coming from. Relying on Cost Explorer alone means you only find out about the fire after the damage is done. Configure the hard stops first to protect your account, then use the analytics to refine your architecture and cut waste.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/ten-euro-month-aws-stack/" rel="noopener noreferrer"&gt;A Minimal AWS Stack: VPS, DNS, Monitoring, Backups&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/when-to-move-homelab-to-aws/" rel="noopener noreferrer"&gt;When to Move Your Homelab Workload to AWS (And When Not To)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/aws-cost-guide-spot-reserved-savings/" rel="noopener noreferrer"&gt;AWS Spot, Reserved, and Savings Plans: Cost Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/aws-s3-homelab-backup/" rel="noopener noreferrer"&gt;AWS S3 Homelab Backups: Automated and Under €5/Month&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can AWS automatically shut down all services if I go over budget?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. AWS Budgets can stop specific EC2 or RDS instances using Budget Actions, or apply an IAM policy to prevent further resource creation. It cannot automatically terminate all resources across an account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is AWS Cost Explorer free?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The web UI is free with default daily granularity. Enabling hourly data granularity costs $0.01 per 1,000 usage records. Querying Cost Explorer programmatically via the API costs $0.01 per request.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why does my AWS bill not match Cost Explorer?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Cost Explorer data lags by up to 24 hours. Estimated charges for the current month might not reflect discounts, credits, or taxes exactly as they appear on your finalized monthly invoice.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/aws/aws-budget-vs-cost-explorer-guide/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>aws</category>
      <category>finops</category>
      <category>homelab</category>
    </item>
    <item>
      <title>Astro: Cloudflare Pages vs Workers Explained</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Fri, 13 Nov 2026 23:42:03 +0000</pubDate>
      <link>https://dev.to/linuxcore/astro-cloudflare-pages-vs-workers-explained-4jj5</link>
      <guid>https://dev.to/linuxcore/astro-cloudflare-pages-vs-workers-explained-4jj5</guid>
      <description>&lt;p&gt;If you build an Astro 7 site with Server-Side Rendering (SSR) today, you deploy to Cloudflare Workers. As of &lt;code&gt;@astrojs/cloudflare&lt;/code&gt; version 13, the adapter completely removed support for Cloudflare Pages. If your Astro project is fully static (SSG), you can still choose between Cloudflare Pages and the newer Cloudflare Workers Assets.&lt;/p&gt;

&lt;p&gt;The choice dictates your configuration, caching limits, local testing capabilities, and your monthly bill.&lt;/p&gt;

&lt;h2&gt;
  
  
  The End of Pages for Astro SSR
&lt;/h2&gt;

&lt;p&gt;Cloudflare acquired the Astro project in January 2026. Following the acquisition, the deployment ecosystem standardized around the native Workers runtime, known as &lt;code&gt;workerd&lt;/code&gt;. The &lt;code&gt;@astrojs/cloudflare&lt;/code&gt; adapter dropped Pages support entirely in version 13.&lt;/p&gt;

&lt;p&gt;When you configure Astro with &lt;code&gt;output: 'server'&lt;/code&gt; and add the Cloudflare adapter, the build process compiles your application into a Cloudflare Worker. The output splits into two components: a &lt;code&gt;dist/client&lt;/code&gt; directory for static files like stylesheets and images, and a &lt;code&gt;dist/_worker.js&lt;/code&gt; directory containing the application logic. &lt;/p&gt;

&lt;p&gt;You cannot upload this output to Cloudflare Pages and expect dynamic routes or API endpoints to function. Pages no longer handles the Astro SSR entrypoint. Any server-rendered components, API endpoints, or server islands require the Cloudflare Workers environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying Static Sites Without an Adapter
&lt;/h2&gt;

&lt;p&gt;If you use the default static output (SSG), you do not need the &lt;code&gt;@astrojs/cloudflare&lt;/code&gt; adapter. You compile your Markdown or MDX collections into static HTML and serve the resulting &lt;code&gt;dist&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;For static deployments, you have two native options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare Pages&lt;/strong&gt; via Git integration. You connect your repository in the Cloudflare dashboard, set the build command to &lt;code&gt;npm run build&lt;/code&gt;, and specify &lt;code&gt;dist&lt;/code&gt; as the output directory. The Pages service executes the build on its own infrastructure and serves the static files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloudflare Workers Assets&lt;/strong&gt;. You deploy the static site as a Worker asset bundle using the Wrangler CLI.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Workers Assets is the modern deployment path. You configure it by adding a &lt;code&gt;wrangler.jsonc&lt;/code&gt; file to your project root:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"astro-static-homelab"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"compatibility_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-13"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"assets"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"directory"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"./dist"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"not_found_handling"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"404-page"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;not_found_handling&lt;/code&gt; key tells Cloudflare to serve your custom &lt;code&gt;404.html&lt;/code&gt; page when a route goes unmatched, replicating standard web server behavior without extra routing rules.&lt;/p&gt;

&lt;p&gt;You deploy the static bundle directly from your terminal or CI pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Build the Astro static site locally or in CI&lt;/span&gt;
npm run build

&lt;span class="c"&gt;# Deploy to Cloudflare Workers Assets&lt;/span&gt;
npx wrangler deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This method bypasses the Cloudflare Pages build queue. Your CI runner manages the node modules and build steps, and Wrangler uploads the finished assets directly to the edge.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying SSR Sites With Cloudflare Workers
&lt;/h2&gt;

&lt;p&gt;Dynamic routes require the &lt;code&gt;@astrojs/cloudflare&lt;/code&gt; adapter. You must use this adapter if you implement server islands, authenticate users against a database, or render pages on demand.&lt;/p&gt;

&lt;p&gt;Install the adapter using the Astro CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx astro add cloudflare
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Configure your &lt;code&gt;astro.config.mjs&lt;/code&gt; for server output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'astro/config'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;cloudflare&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@astrojs/cloudflare'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;output&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'server'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;adapter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;cloudflare&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;imageService&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'passthrough'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The adapter configures the Vite plugin to generate the correct Worker manifest during the build. You still maintain a &lt;code&gt;wrangler.jsonc&lt;/code&gt; file to define environment variables, database connections, or key-value namespaces. &lt;/p&gt;

&lt;p&gt;Because Astro 7 relies on Node.js built-ins for specific SSR functionality, you must enable the &lt;code&gt;nodejs_compat&lt;/code&gt; flag in your configuration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"astro-ssr-homelab"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"compatibility_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-13"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"compatibility_flags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"nodejs_compat"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;imageService: 'passthrough'&lt;/code&gt; option tells Astro to skip local image optimization. The default image processor, Sharp, requires native binaries and does not run in the Cloudflare Workers V8 environment. You must pre-optimize your assets before deployment or use Cloudflare's edge image optimization service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Local Preview and the V8 Runtime
&lt;/h2&gt;

&lt;p&gt;Testing an SSR site locally requires an accurate emulation of the edge environment. Standard Node.js servers behave differently than Cloudflare Workers. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;@astrojs/cloudflare&lt;/code&gt; adapter integrates directly with Miniflare. When you run &lt;code&gt;astro build&lt;/code&gt; followed by &lt;code&gt;astro preview&lt;/code&gt;, the preview server runs &lt;code&gt;workerd&lt;/code&gt; locally. This setup catches V8 compatibility issues before deployment.&lt;/p&gt;

&lt;p&gt;If your code imports a Node.js library that relies on file system access (&lt;code&gt;fs&lt;/code&gt;) or child processes (&lt;code&gt;child_process&lt;/code&gt;), the preview server will throw an error. The V8 isolate model strictly limits these APIs for security and performance reasons. Running &lt;code&gt;astro preview&lt;/code&gt; ensures your dependencies are compatible with the edge limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting D1 and KV Bindings
&lt;/h2&gt;

&lt;p&gt;Deploying Astro to Cloudflare Workers gives you direct access to Cloudflare's data services. You configure bindings in your &lt;code&gt;wrangler.jsonc&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;To connect a D1 SQL database and a KV namespace:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json-doc"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"astro-database-app"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"compatibility_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2026-11-13"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"compatibility_flags"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"nodejs_compat"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"kv_namespaces"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"binding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"SESSIONS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"your-kv-id-here"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"d1_databases"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nl"&gt;"binding"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"DB"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"database_name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"homelab-db"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="nl"&gt;"database_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"your-d1-id-here"&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your server-rendered Astro components, you query the database directly through the provided environment context. This architecture keeps database queries at the edge, executing in milliseconds alongside your HTML generation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caching and Cost Trade-Offs
&lt;/h2&gt;

&lt;p&gt;The choice between static and SSR outputs dictates your Cloudflare bill.&lt;/p&gt;

&lt;p&gt;Cloudflare Workers uses a strict usage-based billing model. At the time of writing, the Workers Free plan allows 100,000 requests per day with a maximum of 10 milliseconds of CPU time per invocation. Exceeding this limit causes Cloudflare to drop incoming requests. &lt;/p&gt;

&lt;p&gt;The Workers Paid plan costs $5 USD per month minimum. This base fee includes 10 million requests and 30 million CPU milliseconds per month. Additional requests cost $0.30 USD per million. Cloudflare does not charge for egress bandwidth on either plan.&lt;/p&gt;

&lt;p&gt;If your Astro site uses SSR, every dynamic page load triggers a Worker execution. A high-traffic blog with server output will quickly exhaust the daily free tier limit, pushing you to the Paid plan. &lt;/p&gt;

&lt;p&gt;If your site is fully static (SSG) and deployed to Cloudflare Pages or Workers Assets, requests for HTML, CSS, and images bypass the Worker CPU limit. Static assets are served directly from the edge cache. A static Astro site can serve millions of page views per month without leaving the free tier. &lt;/p&gt;

&lt;p&gt;For homelab users hosting a public portfolio or documentation site, SSG is the cheapest and most resilient path. Reserve SSR for applications that require live database queries, form processing, or user sessions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment Variables and Secrets
&lt;/h2&gt;

&lt;p&gt;Node.js developers expect environment variables to reside in &lt;code&gt;process.env&lt;/code&gt;. The Cloudflare Workers runtime does not use the global Node.js process object.&lt;/p&gt;

&lt;p&gt;When you deploy an Astro SSR site to Workers, environment variables are passed through the request context. You configure secrets using Wrangler instead of a &lt;code&gt;.env&lt;/code&gt; file for production:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx wrangler secret put API_KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your Astro components, you access these variables using the &lt;code&gt;env&lt;/code&gt; object provided by the adapter runtime. Hardcoding &lt;code&gt;process.env&lt;/code&gt; in your scripts will cause the Worker to crash in production.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/nextjs-to-astro-5-migration-homelab-cost-performance/" rel="noopener noreferrer"&gt;Migrating Next.js to Astro: What Changes and Why&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-cloudflare-pages-html-caching-i18n-guide/" rel="noopener noreferrer"&gt;Astro Cloudflare Pages Caching: HTML &amp;amp; i18n Routes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-cloudflare-clerk-stripe-paywall/" rel="noopener noreferrer"&gt;Astro Paywall with Cloudflare, Clerk, and Stripe&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-7-alpha-vite-v8-upgrade-what-to-expect/" rel="noopener noreferrer"&gt;Astro 7 and Vite 8: What Changes When You Upgrade&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can I deploy Astro SSR to Cloudflare Pages?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Since Astro 6 and the @astrojs/cloudflare v13 adapter, Cloudflare Pages is no longer supported for Server-Side Rendering (SSR). You must use Cloudflare Workers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does it cost to host Astro on Cloudflare Workers?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The Free tier includes 100,000 requests per day. The Paid plan starts at $5 per month and includes 10 million requests and 30 million CPU milliseconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need the @astrojs/cloudflare adapter for a static site?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. If you build a purely static Astro site (SSG), you do not need the adapter. You can serve the static output directly via Cloudflare Workers Assets or Pages.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/astro/astro-cloudflare-pages-vs-workers-guide/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>astro</category>
      <category>cloudflare</category>
      <category>deployment</category>
    </item>
    <item>
      <title>Tailscale vs Headscale: Self-Hosting Control</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Wed, 11 Nov 2026 23:42:02 +0000</pubDate>
      <link>https://dev.to/linuxcore/tailscale-vs-headscale-self-hosting-control-kg8</link>
      <guid>https://dev.to/linuxcore/tailscale-vs-headscale-self-hosting-control-kg8</guid>
      <description>&lt;p&gt;Self-hosting Headscale is for homelab admins who require total sovereignty over their network control plane. For most users, Tailscale's official free tier offers enough capacity and removes the maintenance burden. This comparison breaks down the technical differences, deployment realities, and client configurations needed to run a fully self-hosted mesh network.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Control Plane vs the Data Plane
&lt;/h2&gt;

&lt;p&gt;Mesh VPNs replaced traditional hub-and-spoke networks by allowing devices to communicate directly. WireGuard made this practical by providing lightweight, high-performance encrypted tunnels. However, managing WireGuard keys across homelab servers, laptops, and mobile devices quickly becomes a configuration nightmare.&lt;/p&gt;

&lt;p&gt;The proprietary Tailscale coordination server securely distributes public keys to all authorized nodes. Headscale implements the exact same API endpoints. When a client authenticates, Headscale transmits a network map to the client, including the public keys and IP addresses of other nodes. The client configures its local WireGuard interface using this data.&lt;/p&gt;

&lt;p&gt;Headscale replaces only the coordination server. When you run Headscale, you still install the official Tailscale client software on your devices. You point those clients to your own server instead of the Tailscale cloud. The data plane remains exactly the same. Peer-to-peer tunnels never pass through your Headscale server unless they fall back to a relay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up Headscale in Your Homelab
&lt;/h2&gt;

&lt;p&gt;Headscale is distributed as a single Go binary or a Docker container. It requires a dedicated domain name and valid TLS certificates. Tailscale clients reject self-signed certificates without explicit overrides, making a valid Let's Encrypt certificate mandatory.&lt;/p&gt;

&lt;p&gt;Here is a minimal Docker Compose stack for Headscale using a host-mounted directory for configuration and data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;headscale&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;headscale/headscale:latest&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;headscale&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"127.0.0.1:8080:8080"&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./config:/etc/headscale&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s"&gt;./data:/var/lib/headscale&lt;/span&gt;
    &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;headscale serve&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You must place a valid &lt;code&gt;config.yaml&lt;/code&gt; in the configuration directory before starting the container. The default configuration uses SQLite for storage, which handles all Headscale use cases. PostgreSQL is supported for legacy reasons, but it is in maintenance mode and discouraged.&lt;/p&gt;

&lt;p&gt;A reverse proxy like Caddy, Traefik, or Nginx should sit in front of Headscale to handle HTTPS termination on port 443 and proxy the traffic to port 8080. You must ensure the host server has a static IP address or reliable dynamic DNS. Because Headscale orchestrates the entire mesh network, its endpoint requires high availability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Client Configuration and Device Registration
&lt;/h2&gt;

&lt;p&gt;Pointing official clients to your custom server requires overriding the default login URL. On Linux, run the client with the login server flag:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tailscale up --login-server https://headscale.example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Mobile platforms require different steps. On iOS, open the Tailscale app, tap the options menu on the login screen, and select the custom coordination server option. Enter your Headscale URL. Instructions for connecting Apple devices are available at the &lt;code&gt;/apple&lt;/code&gt; endpoint, with downloadable configuration profiles provided for macOS under &lt;code&gt;/apple/{platform}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Headscale provides no built-in web GUI for administration. You manage users and devices through the command line. To register a node, the client prints an authentication command. Run that command inside the Headscale container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec&lt;/span&gt; headscale headscale nodes register --user homelab --key nodekey:xxxxxxxxxxxxxxxxxxxx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, generate a pre-authentication key and pass it to the client during setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec&lt;/span&gt; headscale headscale preauthkeys create --user homelab --expiration 24h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then supply this key to your client:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;tailscale up --login-server https://headscale.example.com --authkey &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;your_key&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  DERP Relaying and NAT Traversal
&lt;/h2&gt;

&lt;p&gt;WireGuard connections often fail through restrictive firewalls or Carrier-Grade NAT. Tailscale implements Designated Encrypted Relay for Packets servers, commonly called DERP, to relay traffic when a direct peer-to-peer connection fails.&lt;/p&gt;

&lt;p&gt;Tailscale provides a global network of DERP relays for free. Self-hosting Headscale means you lose access to this global network. Headscale includes an embedded DERP server, but it only exists in the single geographic location where you deployed the container. If you have nodes in Europe and Asia falling back to a relay in North America, latency will spike.&lt;/p&gt;

&lt;p&gt;To support the embedded DERP server, you must expose UDP port 3478 and TCP port 443. For a true multi-region setup, you have to deploy and configure custom DERP nodes manually on separate virtual private servers and link them via the Headscale configuration file. This adds significant cost and maintenance overhead compared to the managed Tailscale service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Access Control Lists and Identity
&lt;/h2&gt;

&lt;p&gt;Tailscale uses a custom HuJSON format for Access Control Lists. Headscale parses this exact same format. Instead of editing policies in a web browser, you define your ACLs in a local file on the Headscale server and reference it in your main configuration. This approach works well for infrastructure-as-code workflows, allowing you to track network policies in a Git repository and deploy them alongside your server configuration.&lt;/p&gt;

&lt;p&gt;Headscale also supports OpenID Connect. This allows you to integrate self-hosted identity providers like Authelia, Authentik, or Keycloak. Users authenticate against your own identity stack before joining the mesh network. This integration replaces the standard Google, Microsoft, or GitHub single sign-on options provided by the official Tailscale service. By pairing Headscale with a self-hosted OIDC provider, your entire authentication chain remains fully offline and under your direct control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Maintenance vs Official Free Tier
&lt;/h2&gt;

&lt;p&gt;Running Headscale means taking on the operational burden of a critical network service. If your Headscale server goes down, existing peer-to-peer tunnels remain active until keys expire, but no new devices can join and IP roaming breaks.&lt;/p&gt;

&lt;p&gt;Maintaining Headscale involves tracking upstream Tailscale changes. Headscale developers frequently release updates to maintain compatibility with new Tailscale client versions. If you update your Tailscale clients on iOS or Android but leave Headscale running an outdated version, API mismatch errors occur and devices fail to authenticate.&lt;/p&gt;

&lt;p&gt;You must implement automated backups for the data directory. If you lose the SQLite database and private keys, you have to rebuild the entire network from scratch and re-register every single device.&lt;/p&gt;

&lt;p&gt;Tailscale offers a free Personal plan supporting up to 6 users and unlimited user devices. The official service provides high availability, global DERP relays, and a web-based admin console. Choose Headscale if your threat model forbids third-party metadata collection, or if you need to run an air-gapped network. Choose Tailscale for zero-maintenance operation. The decision comes down to the time you want to spend managing the network versus using the network.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/wireguard-tailscale-guide/" rel="noopener noreferrer"&gt;WireGuard vs Tailscale for Homelab Remote Access (2026)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/self-hosting-behind-cgnat-homelab-guide/" rel="noopener noreferrer"&gt;Self-Hosting Behind CGNAT: Tunnels and Relays&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/docker-compose-homelab-stack/" rel="noopener noreferrer"&gt;Docker Compose Homelab Stack: 20 Services, One File&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can Headscale use the official Tailscale client apps?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Headscale uses the exact same Tailscale clients for Linux, Windows, macOS, iOS, and Android. You point them to your custom coordination server instead of the default Tailscale infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Headscale have a web interface?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Headscale operates entirely via the command line by default. Community projects like Headplane provide a web UI, but require deploying and connecting a separate Docker container.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I lose access to Tailscale MagicDNS with Headscale?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. Headscale fully supports MagicDNS. You can configure your own base domain in the Headscale configuration file, and devices will resolve each other by hostname.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/homelab/tailscale-vs-headscale-self-hosted-guide/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>tailscale</category>
      <category>vpn</category>
      <category>networking</category>
    </item>
    <item>
      <title>Multipass 1.17 for Homelab: Fast Debian and Alpine VMs</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Fri, 06 Nov 2026 23:42:02 +0000</pubDate>
      <link>https://dev.to/linuxcore/multipass-117-for-homelab-fast-debian-and-alpine-vms-kob</link>
      <guid>https://dev.to/linuxcore/multipass-117-for-homelab-fast-debian-and-alpine-vms-kob</guid>
      <description>&lt;p&gt;Multipass 1.17 removes the Ubuntu-only restriction for local virtual machines. Canonical's lightweight CLI orchestrator now directly provisions Debian and Fedora instances. For homelabbers testing pipelines or experimenting with container stacks, Multipass replaces the heavy overhead of spinning up full Proxmox VMs or maintaining Vagrant toolchains. The software wraps native hypervisors (KVM on Linux, the Apple Virtualization Framework on macOS, and the Host Compute System API on Windows) to launch disposable Linux environments in seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  Non-Ubuntu Distros in Your Homelab
&lt;/h2&gt;

&lt;p&gt;The 1.17 release redesigns the Multipass image catalog to support third-party Linux distributions. Before this update, validating a service against a Debian environment meant provisioning a second virtualization stack or manually converting disk images. The tool now integrates a broader operating system catalog natively.&lt;/p&gt;

&lt;p&gt;Listing available images using the CLI confirms the newly supported distributions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass find
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output includes familiar Ubuntu LTS releases alongside &lt;code&gt;debian&lt;/code&gt; and &lt;code&gt;fedora&lt;/code&gt; images. Launching a Debian test node requires a single command specifying the distribution and the desired hardware resources.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass launch debian &lt;span class="nt"&gt;--name&lt;/span&gt; dev-debian &lt;span class="nt"&gt;--cpus&lt;/span&gt; 2 &lt;span class="nt"&gt;--memory&lt;/span&gt; 4G &lt;span class="nt"&gt;--disk&lt;/span&gt; 10G
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Multipass provisions the virtual disk, configures the network bridge, and injects the SSH keys. Once the CLI returns control, the Debian VM is active. Connecting to the shell is immediate.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass shell dev-debian
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Booting Alpine Linux from a Custom URL
&lt;/h2&gt;

&lt;p&gt;While Debian and Fedora are built into the default catalog, Multipass 1.17 also supports launching instances directly from custom image URLs. The CLI accepts &lt;code&gt;.img&lt;/code&gt; or &lt;code&gt;.qcow2&lt;/code&gt; files over HTTPS, making minimal distributions like Alpine Linux highly accessible.&lt;/p&gt;

&lt;p&gt;Alpine provides official QEMU &lt;code&gt;qcow2&lt;/code&gt; cloud images equipped with cloud-init. The Multipass daemon downloads the image, configures the hypervisor backend, and boots the VM.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass launch https://dl-cdn.alpinelinux.org/alpine/v3.20/releases/cloud/nocloud_alpine-3.20.3-x86_64-bios-cloudinit-r0.qcow2 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; alpine-node &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--cpus&lt;/span&gt; 1 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--memory&lt;/span&gt; 512M &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--disk&lt;/span&gt; 1G
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Multipass defaults to allocating 1 CPU core, 1GB of RAM, and a 5GB disk. While these settings suit Ubuntu, Alpine Linux requires far less overhead. A user can provision a functional Alpine VM with just 512MB of RAM and 1GB of disk space. Confirm the resource consumption by querying the instance status.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass info alpine-node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output displays the VM state, assigned IPv4 address, system architecture, and exact memory utilization.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud-Init for Cross-Distro Provisioning
&lt;/h2&gt;

&lt;p&gt;Multipass relies heavily on &lt;code&gt;cloud-init&lt;/code&gt; to customize virtual machines during the first boot. Launching non-Ubuntu images introduces a common access issue: the default user is no longer &lt;code&gt;ubuntu&lt;/code&gt;. Debian images default to the &lt;code&gt;debian&lt;/code&gt; user, and Alpine images default to &lt;code&gt;alpine&lt;/code&gt;. Furthermore, Multipass file transfer commands assume the &lt;code&gt;/home/ubuntu&lt;/code&gt; path exists.&lt;/p&gt;

&lt;p&gt;Passing a custom &lt;code&gt;cloud-config.yaml&lt;/code&gt; file normalizes access and configuration across all distributions. The following configuration creates a standard user, grants passwordless sudo access, and imports an SSH key from GitHub.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# cloud-config.yaml&lt;/span&gt;
&lt;span class="na"&gt;users&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;default&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;sysadmin&lt;/span&gt;
    &lt;span class="na"&gt;sudo&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ALL=(ALL) NOPASSWD:ALL&lt;/span&gt;
    &lt;span class="na"&gt;shell&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;/bin/bash&lt;/span&gt;
    &lt;span class="na"&gt;ssh_import_id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gh:yourgithubusername&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Apply the configuration during VM creation using the &lt;code&gt;--cloud-init&lt;/code&gt; flag.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass launch debian &lt;span class="nt"&gt;--name&lt;/span&gt; provisioned-debian &lt;span class="nt"&gt;--cloud-init&lt;/span&gt; cloud-config.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the VM boots, access the instance using standard SSH instead of the Multipass shell wrapper, or use &lt;code&gt;multipass exec provisioned-debian -- &amp;lt;command&amp;gt;&lt;/code&gt; to run scripts remotely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running Docker Inside a Multipass VM
&lt;/h2&gt;

&lt;p&gt;Homelab environments often require disposable Docker hosts. Multipass VMs provide strong isolation for testing untrusted containers without risking the host system or the primary Proxmox hypervisor. Deploying Docker via cloud-init automates the entire installation process. Save the following configuration as &lt;code&gt;docker-init.yaml&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# docker-init.yaml&lt;/span&gt;
&lt;span class="na"&gt;package_update&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
&lt;span class="na"&gt;packages&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;apt-transport-https&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;ca-certificates&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;curl&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;gnupg&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;lsb-release&lt;/span&gt;
&lt;span class="na"&gt;runcmd&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;curl -fsSL https://get.docker.com | sh&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;systemctl enable docker&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;systemctl start docker&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;usermod -aG docker debian&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Launch a dedicated Debian Docker host with two CPU cores and 4GB of RAM.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass launch debian &lt;span class="nt"&gt;--name&lt;/span&gt; docker-host &lt;span class="nt"&gt;--cpus&lt;/span&gt; 2 &lt;span class="nt"&gt;--memory&lt;/span&gt; 4G &lt;span class="nt"&gt;--cloud-init&lt;/span&gt; docker-init.yaml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wait a few moments for the package installation to finish. The VM operates as a fully functional, disposable Docker environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass &lt;span class="nb"&gt;exec &lt;/span&gt;docker-host &lt;span class="nt"&gt;--&lt;/span&gt; docker run hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Multipass Gotchas for Non-Ubuntu Distributions
&lt;/h2&gt;

&lt;p&gt;When running operating systems other than Ubuntu, certain default CLI behaviors fail because the underlying system assumptions change.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Mounting Host Directories&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;multipass mount&lt;/code&gt; command links a local host directory directly into the virtual machine's filesystem. This maps a source code folder into the VM so the host editor can modify files while the guest executes them.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass mount /local/path/to/project bridged-node:/mnt/project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the target path is omitted, the CLI automatically attempts to mount the directory into &lt;code&gt;/home/ubuntu/&amp;lt;folder&amp;gt;&lt;/code&gt;. This command fails silently or throws path errors on Debian or Alpine VMs because the directory structure differs. Always specify an explicit target path like &lt;code&gt;/mnt/project&lt;/code&gt; when working outside the Canonical ecosystem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;File Transfers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The same path limitation applies to the &lt;code&gt;multipass transfer&lt;/code&gt; command. Moving an archive into a non-Ubuntu VM requires explicitly targeting a universal directory such as &lt;code&gt;/tmp&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass transfer app-config.tar.gz dev-debian:/tmp/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Attempting to push files directly into the VM without a destination path defaults to &lt;code&gt;/home/ubuntu/&lt;/code&gt; and fails.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Network Isolation&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multipass networks default to NAT. Virtual machines share the host's IP address outbound but are not directly reachable from the wider local area network. To expose a Multipass VM to the rest of the homelab, use the &lt;code&gt;--network&lt;/code&gt; flag to bridge the connection.&lt;/p&gt;

&lt;p&gt;List the host's physical and virtual interfaces.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass networks
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pass the desired interface name to the launch command. The VM will request an IP address directly from the local DHCP server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass launch fedora &lt;span class="nt"&gt;--name&lt;/span&gt; bridged-node &lt;span class="nt"&gt;--network&lt;/span&gt; en0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Teardown and Resource Management
&lt;/h2&gt;

&lt;p&gt;The Multipass architecture treats virtual machines as temporary instances. When a test pipeline concludes or an Alpine container host is no longer required, destroy the VM to reclaim system resources.&lt;/p&gt;

&lt;p&gt;Stop the instance gracefully.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass stop dev-debian
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Delete the instance. This marks the VM for removal but retains the data temporarily.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass delete dev-debian
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Purge all deleted instances to free the disk space completely.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;multipass purge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The CLI leaves no orphaned virtual disks or stale network bridges behind. The tool abstracts the hypervisor cleanup, ensuring the host machine remains clean regardless of how many Debian or Alpine VMs are provisioned and destroyed daily.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/microvms-proxmox-ve-homelab-isolation/" rel="noopener noreferrer"&gt;MicroVMs in Proxmox: True Homelab Isolation, Simply&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/proxmox-homelab-setup/" rel="noopener noreferrer"&gt;Proxmox VE Homelab Setup: Install and Configure (2026)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/docker-compose-homelab-stack/" rel="noopener noreferrer"&gt;Docker Compose Homelab Stack: 20 Services, One File&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/linux-security-hardening/" rel="noopener noreferrer"&gt;Linux Homelab Security Hardening: Complete Checklist (2026)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can Multipass 1.17 run Alpine Linux natively?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multipass does not include Alpine in its default image catalog, but version 1.17 allows launching virtual machines directly from an Alpine .qcow2 URL.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Multipass support bridging to the local network?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Use the --network flag followed by the host's physical network interface name to bridge the VM and obtain a local DHCP address.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why do multipass mount commands fail on Debian VMs?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Multipass defaults to mounting directories inside /home/ubuntu. Specify an explicit target path like /mnt when working with non-Ubuntu distributions.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/homelab/canonical-multipass-non-ubuntu-distros-homelab-vms/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>multipass</category>
      <category>virtualmachines</category>
      <category>debian</category>
    </item>
    <item>
      <title>Systemd-nspawn Homelab Guide: Containers Without Docker</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Wed, 04 Nov 2026 23:42:02 +0000</pubDate>
      <link>https://dev.to/linuxcore/systemd-nspawn-homelab-guide-containers-without-docker-4hkm</link>
      <guid>https://dev.to/linuxcore/systemd-nspawn-homelab-guide-containers-without-docker-4hkm</guid>
      <description>&lt;p&gt;Systemd-nspawn is a namespace containerization tool built directly into systemd, allowing you to run fully isolated operating systems on your homelab without installing Docker or KVM. Most modern Linux distributions ship with it natively. Instead of running a single process behind a heavy daemon and overlay filesystem, systemd-nspawn boots a complete initialization tree directly on your host's network and storage. This guide covers how to deploy Debian 12 and Alpine Linux services using systemd-nspawn, the configurations required, and how this built-in tool compares to standard Docker setups.&lt;/p&gt;

&lt;h2&gt;
  
  
  Systemd-nspawn vs Docker for Homelab Servers
&lt;/h2&gt;

&lt;p&gt;When evaluating systemd-nspawn vs docker, the architecture dictates how you manage your homelab services. Docker and Podman are application containers. They package a single daemon, like Nginx or PostgreSQL, into immutable layers. The Docker engine manages NAT routing, volume mounts, and logs. &lt;/p&gt;

&lt;p&gt;Systemd-nspawn provides system containers. It operates identically to a Proxmox LXC container or a lightweight KVM virtual machine. You give it a root directory containing a full Linux filesystem, and it boots the OS inside a namespace. The container has its own PID 1, system logs, and user space. &lt;/p&gt;

&lt;p&gt;This architectural difference changes administration. With Docker, you pull a pre-configured image and pass environment variables. With systemd-nspawn, you drop into a shell, use a package manager to install your software, and configure it using standard Linux configuration files. You get the isolation of a container with the predictable, persistent filesystem of a bare-metal server. &lt;/p&gt;

&lt;p&gt;Storage handling presents another critical difference. Docker depends on overlayfs to stack read-only image layers with a read-write upper directory. While efficient for deploying hundreds of ephemeral web servers, overlayfs adds complexity for stateful homelab services. Persistent data in Docker requires mapping volumes or bind-mounting host paths to avoid data loss on recreation.&lt;/p&gt;

&lt;p&gt;Systemd-nspawn sidesteps overlayfs completely. It treats a standard host directory as the literal root filesystem. If you write a file to &lt;code&gt;/etc/nginx.conf&lt;/code&gt; inside the container, it appears instantly as a standard file on your host's disk. If your host uses a Btrfs filesystem, &lt;code&gt;machinectl&lt;/code&gt; automatically utilizes Btrfs subvolumes for zero-copy cloning and instant snapshots.&lt;/p&gt;

&lt;p&gt;Resource consumption also varies. Docker requires running the &lt;code&gt;dockerd&lt;/code&gt; and &lt;code&gt;containerd&lt;/code&gt; background daemons at all times, consuming RAM to manage the environment. Systemd-nspawn requires zero background management daemons on a modern Linux host. It is a native C binary that configures the kernel's control groups (cgroups) and namespaces, launches the guest init system, and exits the management path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating a Systemd-nspawn Debian Container
&lt;/h2&gt;

&lt;p&gt;To create a Debian environment, you need the base systemd container utilities and &lt;code&gt;debootstrap&lt;/code&gt;, which constructs the basic Debian filesystem hierarchy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;systemd-container debootstrap bridge-utils
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, bootstrap a fresh Debian 12 (Bookworm) environment directly into the default machines directory at &lt;code&gt;/var/lib/machines&lt;/code&gt;. Including the &lt;code&gt;dbus&lt;/code&gt; package is a documented requirement. Without it, you cannot spawn a shell session later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;debootstrap &lt;span class="nt"&gt;--include&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;systemd,dbus bookworm /var/lib/machines/debian-web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the filesystem finishes building, you manage the container using &lt;code&gt;machinectl&lt;/code&gt;. Start the container and open a root shell to configure your service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;machinectl start debian-web
&lt;span class="nb"&gt;sudo &lt;/span&gt;machinectl shell debian-web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the shell, you are running a fully isolated Debian system. You can run &lt;code&gt;apt install nginx&lt;/code&gt;, modify &lt;code&gt;/etc/nginx/nginx.conf&lt;/code&gt;, and use &lt;code&gt;systemctl enable nginx&lt;/code&gt; exactly as you would on a standalone VPS. To make the container automatically boot when your homelab server restarts, enable it on the host:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;systemd-nspawn@debian-web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Since systemd-nspawn containers are managed as standard systemd services on the host, you can apply resource limits using native systemd commands instead of Docker's specific runtime flags. If you want to limit the &lt;code&gt;debian-web&lt;/code&gt; container to 512MB of RAM and one CPU core, you apply the limit on the host via standard cgroups:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl set-property systemd-nspawn@debian-web.service &lt;span class="nv"&gt;MemoryMax&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;512M &lt;span class="nv"&gt;CPUQuota&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;100%
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Systemd writes these limits to a drop-in file under &lt;code&gt;/etc/systemd/system.control/&lt;/code&gt;, and the kernel enforces them instantly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alpine Linux Containers with Systemd-nspawn
&lt;/h2&gt;

&lt;p&gt;Alpine Linux remains popular for homelabs due to its minimal footprint. You can pull an Alpine environment using &lt;code&gt;machinectl pull-tar&lt;/code&gt;. The official Alpine minirootfs tarballs integrate directly.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;machinectl pull-tar https://dl-cdn.alpinelinux.org/alpine/v3.24/releases/x86_64/alpine-minirootfs-3.24.3-x86_64.tar.gz alpine-svc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is a common gotcha for Alpine containers. Alpine does not use systemd; it uses OpenRC. Furthermore, the standard minirootfs tarball lacks a functioning init system by default. If you run &lt;code&gt;machinectl start alpine-svc&lt;/code&gt; immediately, the boot process fails because it cannot locate &lt;code&gt;/sbin/init&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Before booting the container, you must bypass the standard startup to manually install OpenRC. Use the &lt;code&gt;systemd-nspawn&lt;/code&gt; command interactively:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemd-nspawn &lt;span class="nt"&gt;-D&lt;/span&gt; /var/lib/machines/alpine-svc /bin/sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside the chroot environment, install OpenRC and register the basic boot services:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apk add openrc
rc-update add sysinit
rc-update add bootmisc
rc-update add root
&lt;span class="nb"&gt;exit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you can start the Alpine container via &lt;code&gt;sudo machinectl start alpine-svc&lt;/code&gt;. Systemd-nspawn successfully executes the OpenRC initialization sequence.&lt;/p&gt;

&lt;p&gt;Another Alpine limitation is shell access. In a Debian container, you can type &lt;code&gt;machinectl shell debian-web&lt;/code&gt; to get a secure login prompt. This mechanism relies on &lt;code&gt;dbus&lt;/code&gt; and systemd's login services running inside the guest. Because Alpine runs OpenRC and lacks these systemd-specific integration services, &lt;code&gt;machinectl shell&lt;/code&gt; fails, throwing an error about a missing DBus connection.&lt;/p&gt;

&lt;p&gt;To administer an Alpine systemd-nspawn container after it boots, you have two options. You can use the raw nspawn command to execute a shell directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemd-nspawn &lt;span class="nt"&gt;-D&lt;/span&gt; /var/lib/machines/alpine-svc /bin/sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Alternatively, you can install an SSH server inside the Alpine container during your initial setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;apk add openssh
rc-update add sshd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once SSH runs, you manage the container exactly like any other remote Linux host on your network, decoupling your administration workflow from &lt;code&gt;machinectl&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Network Configuration and Storage Mounts
&lt;/h2&gt;

&lt;p&gt;Network behavior in systemd-nspawn frequently confuses administrators because the defaults change based on how you start the container. &lt;/p&gt;

&lt;p&gt;If you run &lt;code&gt;systemd-nspawn -D /var/lib/machines/debian-web&lt;/code&gt; directly from the command line, the container shares the host network namespace. However, when you use &lt;code&gt;machinectl start debian-web&lt;/code&gt;, it uses the &lt;code&gt;systemd-nspawn@.service&lt;/code&gt; template, which hardcodes the &lt;code&gt;--network-veth&lt;/code&gt; flag. This creates a virtual ethernet pair, placing the container in an isolated private network.&lt;/p&gt;

&lt;p&gt;To map ports from the host to your isolated container, similar to Docker's &lt;code&gt;-p 8080:80&lt;/code&gt; flag, you create an &lt;code&gt;.nspawn&lt;/code&gt; configuration file. Create a new directory and file at &lt;code&gt;/etc/systemd/nspawn/debian-web.nspawn&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Exec]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;Boot&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[Network]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;VirtualEthernet&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;Port&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;tcp:8080:80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart the container with &lt;code&gt;machinectl restart debian-web&lt;/code&gt;. The host forwards traffic on port 8080 directly to port 80 inside the container. &lt;/p&gt;

&lt;p&gt;If you prefer the container to obtain its own IP address directly from your homelab router, bind it to a host bridge interface instead. Assuming you have a bridge named &lt;code&gt;br0&lt;/code&gt; on your host:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Network]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;VirtualEthernet&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;Bridge&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;br0&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration makes the container operate identically to a KVM virtual machine on your local network, receiving its own DHCP lease without host NAT overhead.&lt;/p&gt;

&lt;p&gt;Homelab containers often need access to large storage pools, such as a media directory or a database backup folder. In Docker, you declare volume binds in a Compose file. With systemd-nspawn, you use the &lt;code&gt;[Files]&lt;/code&gt; section of the &lt;code&gt;.nspawn&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;To mount a host directory at &lt;code&gt;/mnt/homelab-media&lt;/code&gt; into the container at &lt;code&gt;/var/media&lt;/code&gt; in read-only mode, modify the &lt;code&gt;/etc/systemd/nspawn/debian-web.nspawn&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ini"&gt;&lt;code&gt;&lt;span class="nn"&gt;[Exec]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;Boot&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[Files]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;BindReadOnly&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;/mnt/homelab-media:/var/media&lt;/span&gt;
&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="nn"&gt;[Network]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="py"&gt;VirtualEthernet&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;yes&lt;/span&gt;
&lt;span class="py"&gt;Port&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;tcp:8080:80&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These declarative configuration files completely replace Docker Compose for system containers. You define network behavior, port forwards, storage mounts, and privilege drops in one place, and systemd applies them securely during every boot sequence.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/canonical-multipass-non-ubuntu-distros-homelab-vms/" rel="noopener noreferrer"&gt;Multipass 1.17 for Homelab: Fast Debian and Alpine VMs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/docker-container-not-a-sandbox-microvm-homelab-isolation/" rel="noopener noreferrer"&gt;Your Container Is Not a Sandbox: Use MicroVMs Instead&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/docker-compose-explained/" rel="noopener noreferrer"&gt;Docker Compose for Homelab: What It Is and How to Use It&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is systemd-nspawn?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Systemd-nspawn is a native Linux utility that spawns namespace containers. It operates as a virtual machine manager but uses lightweight containerization, booting a full init system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How is systemd-nspawn different from Docker?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Docker isolates single processes and relies heavily on image layers and a management daemon. Systemd-nspawn behaves more like a traditional Linux server, running a full OS tree and init system without requiring a daemon.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does systemd-nspawn work with non-systemd Linux distributions?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. While optimized for systemd guests like Debian, it can run Alpine Linux containers. You must manually install and configure an init system like OpenRC first.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/homelab/systemd-nspawn-lightweight-linux-containers-homelab-guide/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>systemdnspawn</category>
      <category>containers</category>
      <category>docker</category>
    </item>
    <item>
      <title>Fail2ban vs CrowdSec: Homelab IPS Battle</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Fri, 30 Oct 2026 23:42:02 +0000</pubDate>
      <link>https://dev.to/linuxcore/fail2ban-vs-crowdsec-homelab-ips-battle-j1f</link>
      <guid>https://dev.to/linuxcore/fail2ban-vs-crowdsec-homelab-ips-battle-j1f</guid>
      <description>&lt;p&gt;When evaluating fail2ban vs crowdsec for a homelab IPS, the choice replaces a local regex log scanner with a distributed consensus engine. While Fail2ban parses text logs and directly appends blocking rules to your firewall, CrowdSec separates the workload into a log parser, a Local API, and distinct remediation components (commonly known as CrowdSec bouncers). For a homelab administrator, the decision comes down to whether the immediate simplicity of a single Python script outweighs the performance and shared threat intelligence of a decoupled architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  How Fail2ban Processes Logs and Iptables Rules
&lt;/h2&gt;

&lt;p&gt;Fail2ban is the default intrusion prevention system for most self-hosted servers. The service is a Python daemon that runs regular expressions against system log files. When an IP address matches a failure condition too many times within a specific &lt;code&gt;findtime&lt;/code&gt; window, Fail2ban triggers an action. That action usually involves appending an IP block to an &lt;code&gt;iptables&lt;/code&gt; or &lt;code&gt;nftables&lt;/code&gt; chain on the local machine.&lt;/p&gt;

&lt;p&gt;The implementation requires zero external dependencies. You define a filter file containing a regex, link it to a jail in &lt;code&gt;jail.local&lt;/code&gt;, specify a ban duration, and start the service.&lt;/p&gt;

&lt;p&gt;The limitations appear under load. Regular expression evaluation is notoriously CPU-intensive. If a homelab exposes a public application that suffers an aggressive brute-force attack or a rapid vulnerability scan, the sudden influx of log entries forces the Python daemon to constantly evaluate complex regex rules against a fast-moving stream of text. Server CPU usage frequently spikes during these events.&lt;/p&gt;

&lt;p&gt;Relying on vanilla &lt;code&gt;iptables&lt;/code&gt; rules to drop connections from thousands of IP addresses forces the Linux kernel to perform linear searches. Unless Fail2ban is specifically configured to use an &lt;code&gt;ipset&lt;/code&gt; action, a large ban list severely degrades packet forwarding performance. A large list of banned IPs means every valid incoming packet must be checked against those sequential firewall rules before reaching its destination.&lt;/p&gt;

&lt;p&gt;Fail2ban also stores its active bans in a local SQLite database located at &lt;code&gt;/var/lib/fail2ban/fail2ban.sqlite3&lt;/code&gt;. If the &lt;code&gt;dbpurgeage&lt;/code&gt; parameter is not tuned correctly, this database grows massive over time and slows down service restarts.&lt;/p&gt;

&lt;h2&gt;
  
  
  CrowdSec Architecture and Bouncer Design
&lt;/h2&gt;

&lt;p&gt;CrowdSec is written in Go and fundamentally changes the intrusion prevention model. Instead of one monolithic script handling parsing, state management, and blocking, the architecture is split into discrete services.&lt;/p&gt;

&lt;p&gt;The core agent uses YAML configurations and Grok patterns to parse logs. Grok patterns execute much faster than raw regex evaluations in Python, reducing CPU overhead during high-volume attacks.&lt;/p&gt;

&lt;p&gt;When the agent detects malicious behavior based on defined scenarios, it does not touch the host firewall directly. Instead, it registers a decision with the Local API (LAPI), which stores the event in a local SQLite or PostgreSQL database.&lt;/p&gt;

&lt;p&gt;Remediation components (the CrowdSec bouncers) query this LAPI. The bouncer is responsible for enforcing the ban. If you install the host firewall bouncer, it creates an &lt;code&gt;ipset&lt;/code&gt; or &lt;code&gt;nftables&lt;/code&gt; set and adds the malicious IP address to it for fast lookups. Because the components communicate over an HTTP API, you can run the parsing agent on an internal web server and run the bouncer on your perimeter router.&lt;/p&gt;

&lt;p&gt;This architecture includes a community threat intelligence feature. The LAPI periodically sends anonymous data about banned IPs to a Central API. In return, your homelab receives a curated blocklist of IPs that have attacked other CrowdSec users. Your server drops packets from known malicious actors before they ever attempt a connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Deploying CrowdSec via Docker Compose
&lt;/h2&gt;

&lt;p&gt;Deploying Fail2ban in Docker often requires elevated privileges and messy host file mounts. CrowdSec is designed with containers in mind. The agent runs as a standard unprivileged container, and you configure your reverse proxy to share its log directory.&lt;/p&gt;

&lt;p&gt;Below is a minimal Docker Compose snippet based on the current official CrowdSec documentation. The configuration mounts the host log directory, exposes the Local API on port 8080, and installs common collections.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;services&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;crowdsec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;image&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;crowdsecurity/crowdsec:latest&lt;/span&gt;
    &lt;span class="na"&gt;container_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;crowdsec&lt;/span&gt;
    &lt;span class="na"&gt;environment&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;COLLECTIONS=crowdsecurity/linux crowdsecurity/traefik crowdsecurity/http-cve&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;GID=1000&lt;/span&gt;
    &lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;crowdsec-db:/var/lib/crowdsec/data/&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;crowdsec-config:/etc/crowdsec/&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/var/log/auth.log:/var/log/auth.log:ro&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;/path/to/proxy/logs:/var/log/proxy:ro&lt;/span&gt;
    &lt;span class="na"&gt;ports&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;127.0.0.1:8080:8080"&lt;/span&gt;
    &lt;span class="na"&gt;restart&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;unless-stopped&lt;/span&gt;

&lt;span class="na"&gt;volumes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;crowdsec-db&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;crowdsec-config&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;COLLECTIONS&lt;/code&gt; environment variable automatically downloads parsers and scenarios from the CrowdSec Hub. A collection is a bundled set of parsing rules and detection thresholds for a specific service. The Local API binds to &lt;code&gt;127.0.0.1&lt;/code&gt; so that host-level bouncers can query it securely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting CrowdSec Bouncers to the LAPI
&lt;/h2&gt;

&lt;p&gt;Running the CrowdSec agent alone only populates a database with decisions; it does not block anything. You must install a bouncer to apply the remediations. &lt;/p&gt;

&lt;p&gt;Bouncers come in two primary categories: Infrastructure-level (Layer 3/4) and Application-level (Layer 7). &lt;br&gt;
The infrastructure bouncer (&lt;code&gt;crowdsec-firewall-bouncer&lt;/code&gt;) runs directly on the host operating system and issues kernel-level drops. &lt;br&gt;
The application bouncers integrate directly into reverse proxies like Traefik, Caddy, or Nginx. Instead of dropping the packet at the kernel, a Layer 7 bouncer can return a 403 Forbidden HTTP error or serve a CAPTCHA challenge to suspicious IPs.&lt;/p&gt;

&lt;p&gt;To connect a bouncer, you must generate an API token using the &lt;code&gt;cscli&lt;/code&gt; command line tool inside the CrowdSec container:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;docker &lt;span class="nb"&gt;exec &lt;/span&gt;crowdsec cscli bouncers add homelab-firewall
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The command outputs an alphanumeric token. You paste this token into the bouncer's configuration file and restart the bouncer service.&lt;/p&gt;

&lt;h2&gt;
  
  
  Homelab Gotchas: WAL Mode and Docker Networking
&lt;/h2&gt;

&lt;p&gt;The distributed design introduces management complexity. Moving from Fail2ban to CrowdSec requires learning a new taxonomy of agents, scenarios, parsers, and bouncers. You will rely heavily on the &lt;code&gt;cscli&lt;/code&gt; tool to inspect decisions and manage collections.&lt;/p&gt;

&lt;p&gt;The SQLite database lock issue is a documented gotcha for high-traffic homelabs. By default, the CrowdSec container initializes a standard SQLite database. When multiple logs are parsed rapidly and the bouncer pulls updates simultaneously, the database can throw a "database is locked" error in the container logs. The fix requires manually adding &lt;code&gt;use_wal: true&lt;/code&gt; to the &lt;code&gt;db_config&lt;/code&gt; section of &lt;code&gt;/etc/crowdsec/config.yaml&lt;/code&gt; to enable Write-Ahead Logging, followed by a container restart.&lt;/p&gt;

&lt;p&gt;Docker networking creates another frequent issue with bouncers. If you run a bouncer in a separate Docker container on a custom bridge network, it communicates with the LAPI via a dynamic container IP address. If the bouncer container updates or restarts, Docker assigns it a new internal IP. The CrowdSec LAPI sees a new connection and leaves the old bouncer registered. Over time, stale bouncer registrations accumulate. Administrators must implement static container IPs or prune inactive bouncers periodically using the &lt;code&gt;cscli bouncers prune&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Conversely, Fail2ban requires almost no maintenance once the jail is dialed in. If you have a single virtual private server or a single home server running SSH, Fail2ban is highly effective. You install the package, enable the &lt;code&gt;sshd&lt;/code&gt; jail, and the configuration survives system reboots and package updates without demanding attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to Stick With Fail2ban vs CrowdSec
&lt;/h2&gt;

&lt;p&gt;A homelab running a simple WireGuard endpoint and SSH does not require CrowdSec. Fail2ban provides immediate protection with minimal setup. The CPU penalty of regex parsing is irrelevant when your public attack surface is restricted to a single port and traffic volume is low.&lt;/p&gt;

&lt;p&gt;Homelabs hosting multiple public-facing web applications behind a reverse proxy gain significant advantages from CrowdSec. The Go-based log parsing handles heavy traffic without spiking processor usage. The community threat intelligence preemptively drops known malicious scanners, reducing the sheer volume of traffic hitting your applications. Most importantly, the bouncers allow you to decouple detection from enforcement, parsing proxy logs safely inside an isolated container while executing the ban via the host network stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/linux-security-hardening/" rel="noopener noreferrer"&gt;Linux Homelab Security Hardening: Complete Checklist (2026)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/docker-compose-homelab-stack/" rel="noopener noreferrer"&gt;Docker Compose Homelab Stack: 20 Services, One File&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/self-host-static-ip-living-room-homelab/" rel="noopener noreferrer"&gt;Self-Hosting on a Static IP: The No-Nonsense Homelab Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is the main difference between Fail2ban and CrowdSec?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Fail2ban uses local regex log parsing to update iptables directly. CrowdSec uses a decoupled architecture with Go-based grok parsing and a distributed threat intelligence network.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can Fail2ban and CrowdSec run together?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Running both on the same logs creates duplicate firewall rules and race conditions. Pick one intrusion prevention system per service.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do CrowdSec bouncers cost money?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The core CrowdSec engine and standard bouncers are free and open-source. The project limits API pulls for enterprise volume, but standard homelab usage remains free.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/homelab/fail2ban-vs-crowdsec-homelab-firewall/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>fail2ban</category>
      <category>crowdsec</category>
      <category>homelab</category>
    </item>
    <item>
      <title>Astro MD vs MDX: Content Collection Build Performance</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Wed, 28 Oct 2026 23:42:02 +0000</pubDate>
      <link>https://dev.to/linuxcore/astro-md-vs-mdx-content-collection-build-performance-1m9p</link>
      <guid>https://dev.to/linuxcore/astro-md-vs-mdx-content-collection-build-performance-1m9p</guid>
      <description>&lt;p&gt;Standard Markdown (&lt;code&gt;.md&lt;/code&gt;) and MDX (&lt;code&gt;.mdx&lt;/code&gt;) process content drastically differently within Astro content collections. The build pipeline parses standard Markdown as raw text data, requiring minimal memory and scaling linearly. The build process compiles MDX files into full JSX components, forcing the Vite bundler to process every &lt;code&gt;.mdx&lt;/code&gt; file as a discrete JavaScript module. This architectural difference means MDX processing introduces significant parser overhead and increases build times on low-resource homelab CI runners. Use standard Markdown for static text and reserve MDX strictly for files requiring embedded interactive components.&lt;/p&gt;

&lt;h2&gt;
  
  
  Astro Markdown vs MDX: Parser Architecture
&lt;/h2&gt;

&lt;p&gt;Standard &lt;code&gt;.md&lt;/code&gt; files in Astro bypass the JavaScript module graph entirely. When the content collections API processes a &lt;code&gt;.md&lt;/code&gt; file, the parser reads the frontmatter for validation against your defined Zod schema. The standard remark and rehype plugins then transform the body text into HTML. The default Astro pipeline relies on a Rust-powered processor that significantly improves build times. The content remains isolated from the application's core JavaScript bundle.&lt;/p&gt;

&lt;p&gt;MDX skips lightweight text processing. When you install the &lt;code&gt;@astrojs/mdx&lt;/code&gt; package, the compiler evaluates every &lt;code&gt;.mdx&lt;/code&gt; file as a functional component. The parser transforms your Markdown syntax into JSX, injects imports for any Astro, Vue, or React components referenced in the file, and hands the resulting code to Vite. The pipeline then adds these modules to the overall dependency graph.&lt;/p&gt;

&lt;p&gt;This fundamental shift alters how the server builds the site. A basic Markdown file maps directly to static HTML output. An MDX file requires the build system to resolve imports, manage potential hydration directives, and pass the output through the Vite build pipeline before generating that same static HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build Speeds and Parser Overhead
&lt;/h2&gt;

&lt;p&gt;If you run builds on a minimal Proxmox virtual machine or a cheap VPS, the performance delta between &lt;code&gt;.md&lt;/code&gt; and &lt;code&gt;.mdx&lt;/code&gt; becomes a hard limit. A content collection containing 1,000 standard Markdown files compiles in under a few seconds. Converting those same 1,000 files to MDX pushes the build time into the double digits and routinely triggers out-of-memory kills on runners with under 2GB of RAM.&lt;/p&gt;

&lt;p&gt;The performance drop stems from the compilation pipeline. When the build pipeline encounters an MDX file, it does not just render text. The &lt;code&gt;@mdx-js/mdx&lt;/code&gt; compiler parses the document into a Markdown Abstract Syntax Tree (AST), applies any configured remark plugins, and converts the output to an HTML AST. The compiler then applies rehype plugins and maps the resulting structure into raw JSX syntax. Finally, the process passes this JSX to the internal bundler to transpile into standard JavaScript. This entire chain executes for every single MDX file. Processing 2,000 blog posts requires 2,000 distinct JavaScript module compilations.&lt;/p&gt;

&lt;p&gt;When a homelab CI runner hits the default Node.js heap limit during an Astro build, the pipeline crashes. You can temporarily bypass the crash by forcing Node to use more memory, but this is a patch, not a fix.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Expanding the heap size for heavy MDX builds&lt;/span&gt;
&lt;span class="nv"&gt;NODE_OPTIONS&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"--max-old-space-size=4096"&lt;/span&gt; npm run build
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The proper fix is limiting MDX usage to files that actually require it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Component Architecture and Hydration
&lt;/h2&gt;

&lt;p&gt;Standard Markdown restricts you to standard HTML tags. You can apply custom styling via CSS, but you cannot embed stateful client-side code directly into the prose. &lt;/p&gt;

&lt;p&gt;Many developers assume they need MDX just to add custom CSS classes to alerts or styled callouts. You do not need MDX for basic structural changes. You can write or import custom remark and rehype plugins for standard Markdown that automatically inject HTML &lt;code&gt;div&lt;/code&gt; wrappers or CSS classes around standard blockquotes. Standard Markdown in Astro also utilizes Shiki for syntax highlighting by default, meaning you do not need MDX just to render formatted code blocks.&lt;/p&gt;

&lt;p&gt;MDX exists specifically to import UI components directly into the content body. This is necessary when an article requires a functional, interactive element, like a live search bar, a dynamic data table fetched from an API, or a React component tracking client-side state.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
title: "Server Status"
pubDate: 2026-10-27
---

import PingTest from '../../components/PingTest.jsx';

The current server latency is listed below. Click the button to refresh the ping.

&amp;lt;PingTest client:load target="192.168.1.100" /&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because Astro uses an Islands architecture, the MDX file itself still renders to static HTML. Client-side JavaScript only ships to the browser if you explicitly append a client directive like &lt;code&gt;client:load&lt;/code&gt; or &lt;code&gt;client:visible&lt;/code&gt; to the embedded component. Without the directive, the component renders strictly on the server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing MDX in Astro Content Collections
&lt;/h2&gt;

&lt;p&gt;If your project requires embedded islands, you must explicitly enable MDX integration and configure your content loader to recognize the extension. &lt;/p&gt;

&lt;p&gt;Install the official integration using the Astro CLI:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx astro add mdx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Optimize the &lt;code&gt;@astrojs/mdx&lt;/code&gt; integration in your configuration file. The &lt;code&gt;optimize&lt;/code&gt; flag instructs the internal rehype plugin to generate a smaller abstract syntax tree, which cuts down build times and reduces memory consumption for large collections. If you do not require standard Markdown configuration settings to apply to your MDX files, setting &lt;code&gt;extendMarkdownConfig&lt;/code&gt; to &lt;code&gt;false&lt;/code&gt; ignores inherited project-level Markdown options entirely.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// astro.config.mjs&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;astro/config&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;mdx&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@astrojs/mdx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nf"&gt;defineConfig&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;integrations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="nf"&gt;mdx&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;optimize&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;extendMarkdownConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, configure your content collection loader to target both file types. Astro uses the &lt;code&gt;glob&lt;/code&gt; loader for local file fetching. You can mix &lt;code&gt;.md&lt;/code&gt; and &lt;code&gt;.mdx&lt;/code&gt; files in the same directory by defining a multi-extension pattern. The &lt;code&gt;[^_]&lt;/code&gt; regex ensures Astro ignores files prefixed with an underscore.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// src/content/config.ts&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;defineCollection&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;astro:content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;glob&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;astro/loaders&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;docsCollection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defineCollection&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;loader&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;glob&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;**/[^_]*.{md,mdx}&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;base&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./src/content/docs&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}),&lt;/span&gt;
  &lt;span class="na"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;object&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;string&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;pubDate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;date&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;draft&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;z&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;boolean&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;collections&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;docs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;docsCollection&lt;/span&gt; &lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When rendering the collection in a dynamic route, the &lt;code&gt;render()&lt;/code&gt; function parses both file types automatically.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;---
// src/pages/docs/[...slug].astro
import { getCollection, render } from 'astro:content';

export async function getStaticPaths() {
  const docs = await getCollection('docs');
  return docs.map(entry =&amp;gt; ({
    params: { slug: entry.id },
    props: { entry },
  }));
}

const { entry } = Astro.props;
const { Content } = await render(entry);
---

&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;{entry.data.title}&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;article&amp;gt;
      &amp;lt;Content /&amp;gt;
    &amp;lt;/article&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  When to Choose Raw Astro Markdown
&lt;/h2&gt;

&lt;p&gt;Stick to &lt;code&gt;.md&lt;/code&gt; files if your content consists only of headings, paragraphs, standard code blocks, and images. The native Astro content collections API handles all frontmatter validation and basic HTML rendering automatically. &lt;/p&gt;

&lt;p&gt;Standard Markdown formatting keeps your content portable. If you migrate away from Astro in the future, raw Markdown transfers cleanly to Hugo, Jekyll, or any other static site generator. MDX files littered with framework-specific component imports require manual clean-up and regex replacements to become standard text again. &lt;/p&gt;

&lt;p&gt;Integrating a headless CMS like Decap or Ghost is much simpler with standard Markdown. Remote content management systems typically export plain text or JSON. Forcing remote content into an MDX pipeline requires custom loaders and complex hydration strategies that break the native Astro content flow.&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;.mdx&lt;/code&gt; exclusively when a specific document requires interactivity that standard Markdown cannot provide. You can safely mix &lt;code&gt;.md&lt;/code&gt; and &lt;code&gt;.mdx&lt;/code&gt; within the same Astro content collection. Keep the bulk of your site as fast-compiling Markdown, and selectively upgrade individual files to MDX when the content demands custom React, Vue, or Svelte components. This split approach maintains fast build times on limited CI runners while preserving the ability to embed complex UI elements.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-7-4-build-timings-parallel-prerendering-guide/" rel="noopener noreferrer"&gt;Astro 7.4 Build Timings &amp;amp; Parallel Prerendering&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/astro-7-alpha-vite-v8-upgrade-what-to-expect/" rel="noopener noreferrer"&gt;Astro 7 and Vite 8: What Changes When You Upgrade&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/astro/nextjs-to-astro-5-migration-homelab-cost-performance/" rel="noopener noreferrer"&gt;Migrating Next.js to Astro: What Changes and Why&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Can I mix Markdown and MDX files in the same Astro content collection?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. The glob loader accepts multiple extensions. Configure the pattern to '*&lt;em&gt;/[^_]&lt;/em&gt;.{md,mdx}' to process both file types in a single collection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does MDX ship JavaScript to the browser by default?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. MDX compiles to HTML at build time. Client-side JavaScript only ships if you append a client directive like client:load to the embedded framework component.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why are my Astro MDX builds failing with out-of-memory errors?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Vite bundles every MDX file as a discrete JavaScript module. Large MDX collections overwhelm CI runners with limited RAM. Enable the optimize flag in the MDX integration or increase runner memory.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/astro/astro-md-vs-mdx-performance-guide/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>astro</category>
      <category>mdx</category>
      <category>markdown</category>
    </item>
    <item>
      <title>Expose Share Links on Private Homelab Apps With Caddy</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Fri, 23 Oct 2026 22:42:02 +0000</pubDate>
      <link>https://dev.to/linuxcore/expose-share-links-on-private-homelab-apps-with-caddy-4fmo</link>
      <guid>https://dev.to/linuxcore/expose-share-links-on-private-homelab-apps-with-caddy-4fmo</guid>
      <description>&lt;p&gt;Homelab administrators often lock down self-hosted applications using an identity provider like Authelia or Authentik. This creates a hard authentication barrier before a visitor reaches the application backend. Strict zero-trust access blocks brute-force attacks and vulnerability exploits, but it breaks a common workflow: sharing a public link with users who do not have an SSO account. You can solve this by configuring Caddy to bypass the authentication gateway for specific URLs, exposing only the exact paths required for the share links to function.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caddy Forward Auth Mechanics
&lt;/h2&gt;

&lt;p&gt;Caddy provides the &lt;code&gt;forward_auth&lt;/code&gt; directive to handle external authentication. It proxies a clone of the incoming HTTP request to an authentication gateway. If the gateway returns a successful 2xx status code, Caddy copies the authorized user headers and passes the request to your application. If the gateway returns any other status code, Caddy forwards the gateway's response back to the client. This usually triggers an HTTP 302 redirect to the SSO login portal.&lt;/p&gt;

&lt;p&gt;To protect an entire application, a basic Caddyfile block looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nextcloud.example.com {
    forward_auth authelia:9091 {
        uri /api/verify?rd=https://auth.example.com
        copy_headers Remote-User Remote-Groups Remote-Name Remote-Email
    }
    reverse_proxy nextcloud:80
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration rejects all unauthenticated traffic. No public share links will load under this block because the authentication gateway intercepts every request.&lt;/p&gt;

&lt;h2&gt;
  
  
  Configuring Homelab Reverse Proxy Public Share Links
&lt;/h2&gt;

&lt;p&gt;To allow external users to access specific files without a login, you must split the Caddy configuration. Caddy uses named matchers and the &lt;code&gt;handle&lt;/code&gt; directive to apply rules selectively based on the request path.&lt;/p&gt;

&lt;p&gt;For Nextcloud, public shares are generated under the &lt;code&gt;/s/&lt;/code&gt; path. Bypassing this single path is not enough. The user will see a broken HTML page without styling. Nextcloud requires CSS, JavaScript, and image assets located in other directories to render the share page correctly.&lt;/p&gt;

&lt;p&gt;This Caddyfile snippet bypasses authentication for the required paths and protects the rest of the application:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;nextcloud.example.com {
    # Match the share path and necessary asset directories
    @public path /s/* /index.php/s/* /apps/* /core/* /dist/* /img/* /js/* /css/* /avatar/* /svg/*

    # Allow public access to the matched paths
    handle @public {
        reverse_proxy nextcloud:80
    }

    # Protect everything else with Authelia
    handle {
        forward_auth authelia:9091 {
            uri /api/verify?rd=https://auth.example.com
            copy_headers Remote-User Remote-Groups Remote-Name Remote-Email
        }
        reverse_proxy nextcloud:80
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This setup routes any request matching the &lt;code&gt;@public&lt;/code&gt; rules directly to Nextcloud. All other requests fall through to the second &lt;code&gt;handle&lt;/code&gt; block and hit the &lt;code&gt;forward_auth&lt;/code&gt; directive.&lt;/p&gt;

&lt;p&gt;You apply the same logic if you use Authentik instead of Authelia. The URI endpoint and the copied headers differ, but the Caddy &lt;code&gt;handle&lt;/code&gt; structure remains identical:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    # Protect everything else with Authentik
    handle {
        forward_auth authentik:9000 {
            uri /outpost.goauthentik.io/auth/caddy
            copy_headers X-Authentik-Username X-Authentik-Groups X-Authentik-Email X-Authentik-Name X-Authentik-Uid
        }
        reverse_proxy nextcloud:80
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The API Trap with Immich
&lt;/h2&gt;

&lt;p&gt;Not all applications handle public shares using simple static HTML paths. Modern platforms often operate as single-page applications that rely heavily on backend APIs.&lt;/p&gt;

&lt;p&gt;When you create a shared link in Immich, the frontend loads via the &lt;code&gt;/share/&lt;/code&gt; path. The frontend then makes asynchronous calls to the &lt;code&gt;/api/&lt;/code&gt; endpoints to fetch the actual photo data. If you bypass just the &lt;code&gt;/share/&lt;/code&gt; path, the user gets a blank interface. The initial page loads, but Authelia blocks the subsequent API requests.&lt;/p&gt;

&lt;p&gt;Whitelist the entire &lt;code&gt;/api/&lt;/code&gt; path and you expose the administrative endpoints, nullifying the security benefits of the reverse proxy. To securely expose Immich share links via Caddy, you must whitelist the exact API routes required for shared links. These specific routes change across major updates.&lt;/p&gt;

&lt;p&gt;Because maintaining a precise list of API paths requires constant intervention, administrators often deploy the community-maintained Immich Public Proxy. This runs as a separate, stateless Docker container that exclusively handles shared links. It strips metadata and blocks unauthorized paths automatically, removing the need to modify your Caddy forward auth rules for the main Immich instance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caddy Protect Self Hosted Apps and Mobile Clients
&lt;/h2&gt;

&lt;p&gt;Many administrators implement Caddy protect self hosted apps setups to block automated scanners, but this approach breaks native mobile clients. Mobile applications for Nextcloud, Immich, and Jellyfin expect direct access to the application API. When Caddy intercepts a mobile app's API request and returns an Authelia HTML login redirect, the mobile app fails to parse the response. The application crashes or hangs. It will not display the SSO login portal.&lt;/p&gt;

&lt;p&gt;You have three options to handle native mobile applications:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Bypass the API paths completely. This reduces the security benefit of the identity provider because scanners can hit the application's login form directly.&lt;/li&gt;
&lt;li&gt;Require a VPN like Tailscale or WireGuard on mobile devices. The application stays fully internal, and you only use the public domain for web access.&lt;/li&gt;
&lt;li&gt;Use application-specific bypass headers. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some mobile clients allow you to inject custom HTTP headers into your requests. You can configure Caddy to bypass &lt;code&gt;forward_auth&lt;/code&gt; if a specific secret header is present.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;immich.example.com {
    @mobile_bypass header Immich-Skip-Authelia "SuperSecretString123"

    handle @mobile_bypass {
        reverse_proxy immich:2283
    }

    handle {
        forward_auth authelia:9091 {
            uri /api/verify?rd=https://auth.example.com
            copy_headers Remote-User
        }
        reverse_proxy immich:2283
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This configuration acts as a static API key. If the header is present, the request bypasses Authelia. You must use TLS (HTTPS) on your public domain to encrypt the header in transit and prevent interception. &lt;/p&gt;

&lt;h2&gt;
  
  
  Preventing Header Spoofing Vulnerabilities
&lt;/h2&gt;

&lt;p&gt;When Caddy validates a request through the authentication gateway, it copies identity headers to the backend application. The application reads these headers to log the user in automatically. &lt;/p&gt;

&lt;p&gt;You must ensure external users cannot spoof these headers to gain administrative access on the bypassed public routes. Caddy normally clears incoming headers before passing them to the application if configured properly, but explicit bypass blocks require manual intervention.&lt;/p&gt;

&lt;p&gt;In your Caddyfile, ensure the &lt;code&gt;reverse_proxy&lt;/code&gt; directive does not implicitly trust incoming identity headers from the outside. If an attacker visits a bypassed path like &lt;code&gt;/s/xyz&lt;/code&gt; and manually includes a &lt;code&gt;Remote-User: admin&lt;/code&gt; HTTP header, Caddy must strip it. The &lt;code&gt;forward_auth&lt;/code&gt; directive automatically overwrites these headers on a successful login, but for paths in the &lt;code&gt;@public&lt;/code&gt; block, no overwrite occurs.&lt;/p&gt;

&lt;p&gt;You must manually strip the headers from unauthenticated requests to prevent privilege escalation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;handle @public {
    request_header -Remote-User
    request_header -Remote-Groups
    request_header -Remote-Name
    request_header -Remote-Email
    reverse_proxy nextcloud:80
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This directive removes the headers before the request reaches Nextcloud. &lt;/p&gt;

&lt;p&gt;The backend application also needs verification. Nextcloud requires the &lt;code&gt;trusted_proxies&lt;/code&gt; array in its &lt;code&gt;config.php&lt;/code&gt; file to validate where the headers come from.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="s1"&gt;'trusted_proxies'&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'192.168.1.100'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set this to the IP address of your Caddy server or Docker network gateway. If you leave &lt;code&gt;trusted_proxies&lt;/code&gt; empty or misconfigured, Nextcloud may accept spoofed headers from untrusted sources, rendering your SSO setup useless.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/ansible-homelab/" rel="noopener noreferrer"&gt;Ansible for Homelabbers: Automate From One Playbook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/lets-encrypt-64-day-certificates-homelab-reverse-proxy-guide/" rel="noopener noreferrer"&gt;Let's Encrypt 64-Day Certificates: Homelab SSL Automation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/homelab/proxmox-homelab-setup/" rel="noopener noreferrer"&gt;Proxmox VE Homelab Setup: Install and Configure (2026)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Does forward_auth break native mobile apps?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Mobile apps expect direct API access and fail when redirected to a login portal. You must either bypass the API paths, use custom headers, or rely on a VPN for mobile access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do I need to bypass CSS and JS paths for share links?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Usually, yes. Nextcloud share pages rely on assets in the /apps/ and /core/ directories. Bypassing only the /s/ path results in a broken layout.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use Authentik instead of Authelia?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. Caddy's forward_auth directive works with any authentication gateway that supports the forward authentication specification.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/homelab/caddy-forward-auth-public-share-links-homelab/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>caddy</category>
      <category>authelia</category>
      <category>nextcloud</category>
    </item>
    <item>
      <title>Amazon ECS Gateway: Cheap Ingress for AWS Homelabs</title>
      <dc:creator>Sergej Voronko</dc:creator>
      <pubDate>Thu, 22 Oct 2026 04:46:56 +0000</pubDate>
      <link>https://dev.to/linuxcore/amazon-ecs-gateway-cheap-ingress-for-aws-homelabs-1714</link>
      <guid>https://dev.to/linuxcore/amazon-ecs-gateway-cheap-ingress-for-aws-homelabs-1714</guid>
      <description>&lt;p&gt;Amazon ECS Gateway solves the most expensive part of running hybrid homelab workloads on AWS: the idle Application Load Balancer (ALB). Instead of permanently running a dedicated ALB at $16.42 per month base fee (in us-east-1) at the time of writing just to wait for failover traffic, this managed ingress resource dynamically provisions your load balancer only when a container service connects. When your homelab is healthy and your cloud tasks scale to zero, ECS removes the ALB, completely eliminating the standby cost.&lt;/p&gt;

&lt;p&gt;Before October 2026, exposing an Amazon Elastic Container Service (ECS) cluster cheaply required painful trade-offs. You either ran AWS Fargate tasks with public IP addresses, which change on every deployment and force you to script your own Route 53 DNS updates, or you provisioned an ALB. An ALB provides static endpoints, AWS Certificate Manager (ACM) TLS certificates, and clean host-based routing, but AWS bills a base hourly rate regardless of traffic volume. For a homelab admin keeping a secondary Nextcloud or Bitwarden instance in AWS for disaster recovery, paying nearly $200 a year for an idle load balancer defeats the purpose of cheap cloud storage.&lt;/p&gt;

&lt;p&gt;Amazon ECS Gateway completely abstracts the load balancer away from individual services. It operates as an account-level infrastructure manager. You define your ingress standards just once, specifying your VPC subnets, security groups, and listener rules.&lt;/p&gt;

&lt;p&gt;When you create or update an ECS service, you opt in by adding a gateway connector parameter. ECS then automatically provisions the required resources directly in your account. If it is the first service connecting, ECS creates an ALB. It generates a unique DNS hostname, requests an ACM certificate, and configures the target groups automatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sharing ALBs for Cheap ECS Ingress
&lt;/h2&gt;

&lt;p&gt;Running multiple lightweight containers in the cloud usually causes ALB sprawl. Standard configurations require either multiple ALBs or manual manipulation of listener rules to share one. ECS Gateway handles shared hosting natively. A single gateway supports up to 25 services sharing the same underlying ALB using host-based routing. You pay only for the actual infrastructure provisioned in your account. Whether you expose one homelab dashboard or twenty separate microservices, your base AWS bill remains tied to a single load balancer.&lt;/p&gt;

&lt;p&gt;Once you connect a 26th service, ECS automatically provisions a second ALB to handle the capacity, immediately doubling your base infrastructure cost. Keep your total active service count under the limit if budget optimization is your primary goal.&lt;/p&gt;

&lt;p&gt;Before ECS Gateway, sharing an ALB meant manually creating Route 53 DNS records for each new service and mapping them to the ALB canonical name. ECS Gateway handles the DNS provisioning automatically. Each service connecting to the gateway receives a unique DNS hostname instantly. You can point your homelab CNAME records directly at these dynamically generated endpoints. When the gateway tears down the ALB during scale-to-zero operations, your CNAME remains intact, ready to route traffic the moment the ALB spins back up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scale-to-Zero AWS Cloud Fallback
&lt;/h2&gt;

&lt;p&gt;The defining feature for hybrid homelabs is automated lifecycle management. The official documentation confirms that ECS removes the underlying ALB when no services remain connected to the gateway.&lt;/p&gt;

&lt;p&gt;If your local server loses power, you scale your standby ECS services from zero to one. ECS registers the connected service, provisions the ALB, requests the ACM certificate, and begins routing traffic. Your disaster recovery site comes online with secure ingress automatically configured. Once your local Proxmox host is restored and you scale the AWS services back to zero, ECS tears down the ALB. Your monthly AWS bill drops back to standard object storage and idle database rates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Creating an Amazon ECS Gateway
&lt;/h2&gt;

&lt;p&gt;Setting up an ECS Gateway requires an IAM role granting ECS permission to provision ALBs, security groups, and certificates on your behalf. Once the IAM role is ready, you create the gateway using the AWS CLI.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws ecs create-gateway &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--name&lt;/span&gt; homelab-fallback &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--infrastructure-role-arn&lt;/span&gt; arn:aws:iam::123456789012:role/ECSGatewayRole &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--configuration&lt;/span&gt; &lt;span class="s1"&gt;'{ "HostSharedAlb": { "networkConfiguration": { "subnets": [ "subnet-0abcd1234efgh5678" ] } } }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;--configuration&lt;/code&gt; flag accepts a JSON object defining your infrastructure limits. By specifying &lt;code&gt;HostSharedAlb&lt;/code&gt;, you instruct the gateway to use standard Application Load Balancers configured for host-based routing. The &lt;code&gt;networkConfiguration&lt;/code&gt; block accepts your VPC subnets, dictating exactly where the load balancer interfaces are placed. If your ECS tasks sit in private subnets, ensure you select public subnets here so the ALB can route external internet traffic into your private tasks.&lt;/p&gt;

&lt;p&gt;Specific configuration settings are immutable. Your gateway name, traffic routing scheme, VPC, subnets, and listener port cannot be modified after creation. Modifying your subnets later requires creating an entirely new gateway and migrating your active services over.&lt;/p&gt;

&lt;h2&gt;
  
  
  ECS awsvpc Network Mode Requirements
&lt;/h2&gt;

&lt;p&gt;When defining your ECS task, you must specify the &lt;code&gt;awsvpc&lt;/code&gt; network mode. ECS Gateway relies on this specific networking mode to enforce security group rules. ECS automatically generates a service security group that permits inbound traffic exclusively from the ALB. This completely isolates your containers from direct internet access, even if placed in a public subnet.&lt;/p&gt;

&lt;p&gt;This requirement requires no changes if you use AWS Fargate, as &lt;code&gt;awsvpc&lt;/code&gt; is the default and only supported mode. If you run your containers on self-managed EC2 instances to save money, you must ensure your task definitions explicitly declare the &lt;code&gt;awsvpc&lt;/code&gt; mode.&lt;/p&gt;

&lt;h2&gt;
  
  
  AWS WAF and Security Integration
&lt;/h2&gt;

&lt;p&gt;Publicly exposing internal services carries risk, especially during an automated failover where you might not be actively monitoring logs. Previously, attaching an AWS WAF required manually linking it to an existing ALB. ECS Gateway accepts a WAF Web ACL directly in the core gateway configuration. &lt;/p&gt;

&lt;p&gt;When ECS provisions the underlying ALB, it automatically attaches the firewall rules. You can define IP allowlists limiting access strictly to your home static IP or your WireGuard exit node. If your homelab fails over to AWS, the WAF rules immediately protect the exposed containers from automated scraping and exploitation attempts.&lt;/p&gt;

&lt;h2&gt;
  
  
  ECS Gateway IAM Role Requirements
&lt;/h2&gt;

&lt;p&gt;Because ECS Gateway automates infrastructure creation, it depends on an infrastructure IAM role. ECS assumes this role to generate the ACM certificates, deploy the ALB, and configure the necessary security groups. You must create a dedicated role with trust policies allowing the &lt;code&gt;ecs.amazonaws.com&lt;/code&gt; service principal to assume it. &lt;/p&gt;

&lt;p&gt;Never reuse your standard ECS execution task roles for this purpose. The infrastructure role requires extensive permissions for Elastic Load Balancing, ACM, and Amazon EC2 security group management. Keeping this role strictly scoped prevents an attacker inside a compromised container from provisioning arbitrary AWS networking infrastructure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitoring ECS Gateway Costs
&lt;/h2&gt;

&lt;p&gt;While the load balancer provisioning happens automatically in the background, the resulting ALB exists directly in your AWS account. You retain full visibility into the network traffic. Standard ALB metrics automatically populate in Amazon CloudWatch. You can inspect target health, request latency, and HTTP 5xx error rates exactly as you would with a manually provisioned ALB. &lt;/p&gt;

&lt;p&gt;If a container crashes, standard Elastic Load Balancing target health checks mark the task unhealthy and stop routing traffic. Because the resources live visibly in your account, they also show up in AWS Cost Explorer, allowing you to track the exact hourly spend of your ALB while your disaster recovery site remains active.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's Next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/when-to-move-homelab-to-aws/" rel="noopener noreferrer"&gt;When to Move Your Homelab Workload to AWS (And When Not To)&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/aws-cost-guide-spot-reserved-savings/" rel="noopener noreferrer"&gt;AWS Spot, Reserved, and Savings Plans: Cost Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/ten-euro-month-aws-stack/" rel="noopener noreferrer"&gt;A Minimal AWS Stack: VPS, DNS, Monitoring, Backups&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://linuxcore.dev/aws/aws-lambda-web-functions-homelab-api-guide/" rel="noopener noreferrer"&gt;Host Homelab APIs on AWS Lambda Web Functions&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;What is Amazon ECS Gateway?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is an account-level resource that automates ingress for ECS services by dynamically provisioning Application Load Balancers, TLS certificates, and DNS records on demand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does Amazon ECS Gateway cost extra?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;No. The gateway itself is free. You only pay for the underlying infrastructure (like ALBs) while it is actively provisioned for connected services.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can I use ECS Gateway for Fargate tasks?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Yes. ECS Gateway supports the awsvpc network mode, which is required for AWS Fargate.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://linuxcore.dev/aws/amazon-ecs-gateway-ingress-homelab-cost-guide/" rel="noopener noreferrer"&gt;linuxcore.dev&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>aws</category>
      <category>ecs</category>
      <category>homelab</category>
    </item>
  </channel>
</rss>
