Project Goal
Run n8n locally on a Raspberry Pi using Docker Compose with persistent storage and HTTPS via a self‑signed certificate. No public access, only LAN usage.
Initial Situation
- Hardware: Raspberry Pi 4 (8 GB)
- OS: Raspberry Pi OS (Debian based)
- Services: Docker & Docker Compose
- Access: Local only, secured with self‑signed TLS + optional Basic Auth
Implementation Steps
- Created project directory with
docker-compose.yml and .env.
- Generated ECC self‑signed certs (
secp384r1) and mounted them into the container.
- Configured environment variables for protocol, port, host, Basic Auth, and timezone.
- Mounted persistent volume
./data:/home/node/.n8n for workflows and credentials.
- Deployed with
docker compose up -d.
Result
- n8n accessible at
https://<raspi-host>:<port> in local network.
- Data persists across restarts.
- HTTPS active with self‑signed cert.
Lessons Learned
- Self‑signed cert is fine for local use; public exposure should use reverse proxy + Let’s Encrypt.
- UID 1000 file ownership is critical for persistence.
- Basic Auth adds an extra security layer even in LAN.