This repository contains the configuration to self-host n8n using Docker Compose or Podman, with Traefik as a reverse proxy and secured by Cloudflare Zero Trust.
This setup is based on the excellent tutorial by Kjetil Furas: Self-Host n8n with Cloudflare Zero Trust and Docker.
The goal of this setup is to provide a secure, scalable, and easy-to-maintain n8n instance. The key components are:
- n8n: The core workflow automation tool.
- Traefik: A modern reverse proxy.
- Cloudflare Tunnel: To securely expose the n8n instance to the internet without opening firewall ports.
- Clone this repository.
- Follow the instructions in the original tutorial to set up your Cloudflare Tunnel and obtain the necessary credentials.
- Create a
.envfile and populate it with your configuration. You can use the.env.examplefile as a template. - Proceed to the appropriate documentation for your container engine.
Detailed setup and usage instructions are located in the /docs directory:
- Docker Usage Guide: For running the stack with Docker Compose.
- Podman (Rootless) Setup Guide: For a full setup guide on a rootless Podman host.
- Traffic Security Analysis: A breakdown of the security for ingress and egress traffic.
- Backup and Restore Guide: Instructions for backing up and restoring your Docker data volumes. The script handles container lifecycle and dynamic naming.
- Changelog: For a full list of changes from the original tutorial and ongoing updates.
This project is designed with security in mind. For details on the security model and how to report vulnerabilities, please see the Security Policy.
This project is based on the excellent tutorial by Kjetil Furas. If you use this project as a starting point, a link back to this repository is appreciated as a courtesy.
This project is licensed under the MIT License. See the LICENSE file for details.