This repository contains a Docker Compose setup for running a Cloudflare tunnel.
cloudflared
: This service runs the latest version of thecloudflared
image from Cloudflare. It starts a Cloudflare tunnel with a specified token.
-
Set your tunnel token as an environment variable named
TOKEN
. You can do this in your shell:export TOKEN=your-token-here
Or you can set it in an
.env
file in the same directory as yourdocker-compose.yml
:TOKEN=your-token-here
-
Run Docker Compose:
docker-compose up
This will start the cloudflared
service and create a Cloudflare tunnel with your specified token. The service will restart automatically unless it is explicitly stopped.