Skip to content

Instantly share code, notes, and snippets.

@wojtekadams
Created August 11, 2025 11:56
Show Gist options
  • Select an option

  • Save wojtekadams/f745e2ca86e8e9a0b41a720f8b0d53af to your computer and use it in GitHub Desktop.

Select an option

Save wojtekadams/f745e2ca86e8e9a0b41a720f8b0d53af to your computer and use it in GitHub Desktop.
Correct configuration to run Cockpit via Cloudflare Zero Trust

/etc/cockpit/cockpit.conf

[WebService]
Origins = https://cloudflare.domain wss://cloudflare.domain http://cockpitIP:9090 wss://cockpitIP:9090
ProtocolHeader = X-Forwarded-Proto
AllowUnencrypted = true

[Session]
Banner = /etc/issue

/etc/cloudflared/config.yml

tunnel: cloudflare_tunnel_id
credentials-file: cloudflare_cred_file.json
ingress:
  - hostname: cloudflare.domain
    service: http://cockpitIP:9090
    originRequest:
      noTLSVerify: true
  - service: http_status:404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment