Skip to content

Commit 38dbbab

Browse files
committed
fix(n8n): pin docker bridge MTU to 1280 to avoid timeouts on lower-MTU hosts
1 parent 6ef7416 commit 38dbbab

1 file changed

Lines changed: 14 additions & 31 deletions

File tree

infra/n8n/docker-compose.yml

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,9 @@
33
#
44
# Default deployment (MVP, no domain):
55
# - n8n bound to 127.0.0.1:5678 on the host (not reachable from the internet).
6-
# - Access the UI via SSH tunnel from your workstation:
7-
# ssh -L 5678:127.0.0.1:5678 ubuntu@ssh.gsmsv.site -p 27113
8-
# then open http://localhost:5678 in your browser.
9-
# - GitHub webhooks cannot reach this yet (no public HTTPS). Enable the Caddy
10-
# service below once a domain points at this host.
6+
# - Public HTTPS exposure via Tailscale Funnel (see infra/n8n/README.md).
7+
# Funnel proxies to http://127.0.0.1:5678 on the host, so the loopback
8+
# binding above is sufficient.
119

1210
services:
1311
n8n:
@@ -26,32 +24,17 @@ services:
2624
retries: 5
2725
start_period: 30s
2826

29-
# Enable when a domain is pointed at this host.
30-
# 1) Point DNS A record (e.g. n8n.example.com) at this server.
31-
# 2) Open firewall ports 80 and 443.
32-
# 3) Copy Caddyfile.example to Caddyfile and set your real domain.
33-
# 4) In .env switch N8N_HOST / N8N_PROTOCOL / WEBHOOK_URL to your HTTPS URL.
34-
# 5) Remove the "127.0.0.1:" prefix from the n8n ports binding above so Caddy
35-
# (in the same compose network) can reach n8n at http://n8n:5678 — actually
36-
# inter-container traffic does not need the host port at all, so prefer:
37-
# ports: [] # remove host binding entirely
38-
# 6) docker compose up -d caddy
39-
#
40-
# caddy:
41-
# image: caddy:2-alpine
42-
# container_name: n8n-caddy
43-
# restart: unless-stopped
44-
# ports:
45-
# - "80:80"
46-
# - "443:443"
47-
# volumes:
48-
# - ./Caddyfile:/etc/caddy/Caddyfile:ro
49-
# - caddy_data:/data
50-
# - caddy_config:/config
51-
# depends_on:
52-
# - n8n
27+
networks:
28+
# MTU pinned to 1280 because (a) the school NAT's eth0 only carries 1400 byte
29+
# frames and (b) Tailscale's tailscale0 interface is 1280. Without this,
30+
# Docker's default 1500-byte bridge fragments large outbound POSTs (e.g.
31+
# n8n -> api.github.com workflow_dispatch) and they get silently dropped,
32+
# surfacing as "connection timed out" / "connection closed unexpectedly" in
33+
# the n8n HTTP Request node.
34+
default:
35+
driver: bridge
36+
driver_opts:
37+
com.docker.network.driver.mtu: "1280"
5338

5439
volumes:
5540
n8n_data:
56-
# caddy_data:
57-
# caddy_config:

0 commit comments

Comments
 (0)