An automated setup for Cloudflare's Argo Tunnel using Docker. The repository contains scripts to seamlessly generate the necessary credentials and run a dockerized Argo Tunnel for your projects.
- Register on Cloudflare, and sign in to your account.
- In the dashboard, click the
+Add a Site
button at the top. - Enter your domain name, then click
Add Site
. - Choose a plan (linking a bank card may be required), and proceed to setup.
- Cloudflare will automatically scan and import your DNS records. Review and confirm them.
- After adding your site to Cloudflare, navigate to the
DNS
tab in your site's dashboard. - Here, you'll find your
Cloudflare Nameservers
. Note down the two nameservers listed.
- Log in to your domain registrar's control panel (the process varies depending on the registrar).
- Locate the section to change your domain's nameservers
(usually under
Domain Settings
,DNS Management
, or similar). - Replace the existing nameservers with the two nameservers provided by Cloudflare.
- Save the changes.
Note: After updating your nameservers, it may take up to 48 hours for the changes to propagate across the internet. Cloudflare will send an email once the nameserver update is complete.
- Docker Desktop installed on your system.
Run the following command:
sudo sh cloudflare-login.sh
A URL will be displayed.
- Open this URL in a web browser. It will redirect you to the Cloudflare login page.
- Log into your Cloudflare account.
- You will be prompted to select a domain for tunneling setup.
- Choose the domain you intend to use for your project.
This will be part of the
DOMAIN
value in your.env
file.
DOMAIN=myproject.myteam.com
Replace myteam.com
with the domain you selected during
the Cloudflare authorization process.
You can execute example
run configuration from any JetBrains IDE or run the following command:
docker compose up --build --force-recreate
If you lose the data stored in the ~/.cloudflared/
, which includes access credentials to your account and tunnels,
manual intervention is required. You'll have to remove the corresponding tunnel and DNS record from Cloudflare.
- Log into your Cloudflare account.
- Navigate to the
Zero Trust
from the sidebar menu. - Select
Access
from the sidebar menu. - Select
Tunnels
from the dropdown. - You'll see a list of your tunnels.
Locate the one that matches the DOMAIN defined in your .env file and click
Delete
. - Confirm the deletion.
- From the Cloudflare dashboard, select the domain associated with the tunnel.
- Navigate to the
DNS
section. - You'll see a list of your DNS records.
Identify the record that corresponds to your tunnel and click
Delete
. - Confirm the deletion.