https://github.com/mwdle/cloudflaretunnelconfig
A sample Docker Compose file and brief guide for Cloudflare Zero Trust Tunnels.
https://github.com/mwdle/cloudflaretunnelconfig
cloudflare cloudflare-tunnel cloudflare-tunnels configuration-files docker docker-compose guide
Last synced: 7 months ago
JSON representation
A sample Docker Compose file and brief guide for Cloudflare Zero Trust Tunnels.
- Host: GitHub
- URL: https://github.com/mwdle/cloudflaretunnelconfig
- Owner: mwdle
- License: gpl-3.0
- Created: 2024-08-16T05:47:22.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-20T06:45:55.000Z (over 1 year ago)
- Last Synced: 2025-03-30T20:18:04.701Z (11 months ago)
- Topics: cloudflare, cloudflare-tunnel, cloudflare-tunnels, configuration-files, docker, docker-compose, guide
- Homepage:
- Size: 310 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Cloudflare Tunnel Docker Compose Configuration
A sample Docker Compose file and brief guide for Cloudflare Zero Trust Tunnels.
## Table of Contents
* [Description](#cloudflare-tunnel-docker-compose-configuration)
* [Getting Started](#getting-started)
* [License](#license)
* [Disclaimer](#disclaimer)
## Getting Started
1. Clone the repository:
```shell
git clone https://github.com/mwdle/CloudflareTunnelConfig.git
```
2. Create a file called `.env` in the same directory as `docker-compose.yml` containing the following property:
```properties
TUNNEL_TOKEN=
```
3. Open a terminal in the directory containing the docker-compose file.
4. Create a docker network for the container:
```shell
docker network create CloudflareTunnel
```
5. Start the container:
```shell
docker compose up -d
```
6. Attach other containers to the CloudflareTunnel network you created earlier by executing the following:
```shell
docker network connect CloudflareTunnel
```
7. Configure a tunnel with a service URL that is the name of the container you want to tunnel:

8. If using a reverse proxy, simply use the name of your reverse proxy container, add the Origin Server Name, HTTP Host Header and HTTP/2 like in the following example:

Your container should be up and running and your tunnels should be accessible according to your configuration. Attach your reverse proxy container to the previously created Docker Network and configure it accordingly.
## License
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the [LICENSE](LICENSE.txt) file for details.
## Disclaimer
This repository is provided as-is and is intended for informational and reference purposes only. The author assumes no responsibility for any errors or omissions in the content or for any consequences that may arise from the use of the information provided. Always exercise caution and seek professional advice if necessary.