From b6d28f06a45aa33a2acbac42e09a7e7ba5cbd5ef Mon Sep 17 00:00:00 2001 From: Oleg Koretsky Date: Tue, 9 Jan 2024 22:14:37 +0200 Subject: [PATCH] App Submission: Cloudflare Tunnel (#891) --- cloudflared/.gitattributes | 1 + cloudflared/data/.gitkeep | 0 cloudflared/docker-compose.yml | 35 +++++++++++++++++++++++++++++ cloudflared/exports.sh | 1 + cloudflared/umbrel-app.yml | 40 ++++++++++++++++++++++++++++++++++ 5 files changed, 77 insertions(+) create mode 100644 cloudflared/.gitattributes create mode 100644 cloudflared/data/.gitkeep create mode 100644 cloudflared/docker-compose.yml create mode 100644 cloudflared/exports.sh create mode 100644 cloudflared/umbrel-app.yml diff --git a/cloudflared/.gitattributes b/cloudflared/.gitattributes new file mode 100644 index 000000000..808a4d72a --- /dev/null +++ b/cloudflared/.gitattributes @@ -0,0 +1 @@ +exports.sh -crlf \ No newline at end of file diff --git a/cloudflared/data/.gitkeep b/cloudflared/data/.gitkeep new file mode 100644 index 000000000..e69de29bb diff --git a/cloudflared/docker-compose.yml b/cloudflared/docker-compose.yml new file mode 100644 index 000000000..f449ad59b --- /dev/null +++ b/cloudflared/docker-compose.yml @@ -0,0 +1,35 @@ +version: "3.7" + +services: + app_proxy: + environment: + APP_HOST: cloudflared-web + APP_PORT: 3000 + + web: + image: ghcr.io/radiokot/umbrel-cloudflared:1.0.1-cf.2023.10.0@sha256:77a0fe80bd9c8c1fa83290bbffbb1d478a047c4103ecd2aa5826bd9f19f84f18 + hostname: cloudflared-web + restart: on-failure + stop_grace_period: 1s + depends_on: + - connector + volumes: + - ${APP_DATA_DIR}/data:/app/data + environment: + CLOUDFLARED_HOSTNAME: "cloudflared-connector" + CLOUDFLARED_METRICS_PORT: "${APP_CLOUDFLARED_METRICS_PORT}" + CLOUDFLARED_TOKEN_FILE: "/app/data/token" + + connector: + image: ghcr.io/radiokot/umbrel-cloudflared-connector:1.0.0-cf.2023.10.0@sha256:4e8daf3826c1717cce0b37dda927f0a255ca87d6bb75e4d97e5412643a531abe + hostname: cloudflared-connector + restart: on-failure + stop_grace_period: 5s + volumes: + - ${APP_DATA_DIR}/data:/data + environment: + CLOUDFLARED_METRICS_PORT: "${APP_CLOUDFLARED_METRICS_PORT}" + CLOUDFLARED_TOKEN_FILE: "./data/token" + extra_hosts: + - "host.docker.internal:host-gateway" + - "${APP_DOMAIN}:host-gateway" diff --git a/cloudflared/exports.sh b/cloudflared/exports.sh new file mode 100644 index 000000000..c463eac9a --- /dev/null +++ b/cloudflared/exports.sh @@ -0,0 +1 @@ +export APP_CLOUDFLARED_METRICS_PORT="40901" \ No newline at end of file diff --git a/cloudflared/umbrel-app.yml b/cloudflared/umbrel-app.yml new file mode 100644 index 000000000..d990ed567 --- /dev/null +++ b/cloudflared/umbrel-app.yml @@ -0,0 +1,40 @@ +manifestVersion: 1 +id: cloudflared +name: Cloudflare Tunnel +tagline: Access your Umbrel apps from the Internet using Cloudflare network +category: networking +version: "2023.10.0 (web 1.0.1)" +port: 4499 +description: >- + Start a secure tunnel to access your Umbrel apps from the Internet using the Cloudflare network. + With Cloudflare Tunnel, you do not send traffic to an external IP — instead, + this app contains a lightweight tunneling daemon (cloudflared) that creates outbound-only + connections to Cloudflare's global network. + + + To use this app, you must have a Cloudflare account set up with your own domain(s) configured. + Once you have set up a Cloudflare account, check out this guide with examples to configure your own tunnel: + https://github.com/Radiokot/umbrel-cloudflared/wiki/How-to-set-up-Cloudflare-Tunnel-on-your-Umbrel + + + ⚠️ Apps accessible from the Internet incentivize attackers and bots to hack into them. + Only expose harmless apps or those having strong internal access control. + + + Powered by Cloudflare. + +developer: Radiokot +website: https://www.cloudflare.com/products/tunnel/ +submitter: Radiokot +submission: https://github.com/getumbrel/umbrel-apps/pull/891 +repo: https://github.com/Radiokot/umbrel-cloudflared +support: https://github.com/Radiokot/umbrel-cloudflared/issues +gallery: + - 1.jpg + - 2.jpg + - 3.jpg +releaseNotes: "" +dependencies: [] +path: "" +defaultUsername: "" +defaultPassword: ""