Appearance
Cloudflare
Cloudflare does DNS, TLS at the edge, the login wall and backup storage for the stu-bot.uk zone.
DNS and TLS
- All the stack's records are proxied, which they have to be because of the firewall (see Networking).
- When an app gets a domain, Coolify creates its DNS record itself, through a Cloudflare integration token that can only edit DNS.
- SSL mode is Full. Traefik on the server gets Let's Encrypt certificates using the HTTP challenge, which works through the proxy because "Always use HTTPS" is off at Cloudflare.
Access (the login wall)
Cloudflare Zero Trust, free plan. Login is by one-time PIN: you enter the email address and type in the code.
| Access app | Covers | Policy |
|---|---|---|
| coolify | coolify.stu-bot.uk | my email |
| coolify api + mcp | /api, /mcp | service token or my email |
| coolify webhooks | /webhooks | bypass (GitHub needs it) |
| ops | ops.stu-bot.uk | my email |
| n8n | n8n.stu-bot.uk | my email |
| n8n webhooks | /webhook, /webhook-test | bypass |
A path-specific app wins over the hostname app, which is how webhooks get through while the UI stays locked.
Claude Code on my Mac uses a service token: it sends CF-Access-Client-Id and CF-Access-Client-Secret headers alongside Coolify's bearer token. Sessions last 24 hours.
A bypassed webhook path is open to the world, so whatever receives it has to check its own secret (an HMAC signature or a header token).
R2
- Bucket
stu-infra-backups, Western Europe, private (no publicr2.devURL). - A lifecycle rule deletes objects older than 30 days and aborts unfinished multipart uploads after a day.
- Coolify talks to it over the S3 API. The S3 key pair is derived from the main API token (access key = token id, secret = sha256 of the token), so rolling that token breaks backups until Coolify's storage is updated.
API tokens
| Token | Can do | Used by |
|---|---|---|
| main infra token | DNS, zone settings, Access, Workers, R2 | the infra CLI on my Mac |
| DNS-only token | edit DNS | Coolify's integration |
| R2 read-only | read R2 usage and analytics | the ops page |
Cloudflare's bot check blocks the default Python user agent (error 1010), so anything scripted sends its own User-Agent.