The base Caddy Docker image is intentionally lean—around 50MB—to avoid bundling unnecessary components. However, if you need extra functionality, such as automatic SSL certificate issuance using the ACME DNS challenge via Cloudflare and Let’s Encrypt (as I did), you’ll need an image that includes the required plug-in. You have two options: use a community-maintained prebuilt image (the easy way), or build your own (the hard way). Here, we’re going with the hard way.
Posts for: #RaspberryPi
n8n Local Hosting with Cloudflare Tunnels - Quick Version
These are the bare bones, just tell me what to do set of instructions. See the previous article for a detailed explanation each step.
What you’ll need:
- A machine to host n8n. This can be a spare PC or Raspberry Pi.
- A free Cloudflare account.
- A web domain that lives on Cloudflare’s nameservers. You can purchase a new one from Cloudflare or move a domain you already own to the Cloudflare nameservers.
Step 1 - Install Docker:
Here’s the official documentation on how to install Docker: https://docs.docker.com/engine/install/
n8n Local Hosting with Cloudflare Tunnels - Long Version
Using Cloudflare Tunnels with self-hosted n8n offers a secure and hassle-free way to expose your automation workflows to the internet without opening ports or configuring firewalls. It eliminates the need for a static IP or dynamic DNS by creating an encrypted outbound connection from your server to Cloudflare’s edge network. This not only simplifies deployment but also adds a layer of protection against DDoS attacks and unauthorized access. With built-in TLS and fine-grained access controls, Cloudflare Tunnels make it easy to trigger n8n webhooks and integrations from anywhere while keeping your infrastructure locked down.