This post will guide you through creating a Cloudflare Tunnel for a local Lando service container.
Prequisites
You will need...
A Cloudflare account
A domain connected to your Cloudflare account which will be used to route external traffic
Lando with a configured project
Create Tunnel
Create a new directory
.cloudflare
in your project rootAuthorize Argo Tunnel for Domain
Select your domain
A file
cert.pem
will be starting to download
Store
cert.pem
in.cloudflare/cert.pm
Run
cloudflared tunnel --config=.cloudflare/config.yml --origincert=./.cloudflare/cert.pem create "RabbitHole"
The output should be
Created tunnel RabbitHole with id
<TUNNEL-ID>
Set the value of the
tunnel
attribute in.cloudflare/config.yml
to the previously returned<TUNNEL-ID>
For example
tunnel: fbedd849-eadc-47f1-82aa-02458008fd2f
Create DNS CNAME record with any custom subdomain (like "local.domain.tld") pointing to
<TUNNEL-ID>.cfargotunnel.com
Start Tunnel via the script below
Start Tunnel
In my case I want to expose the appserver_nginx
Lando service to the tunnel.
1cloudflared tunnel \ 2 --config=.cloudflare/config.yml \ 3 --origincert=./.cloudflare/cert.pem \ 4 run \ 5 --url=$(lando info --filter "service=appserver_nginx" --format json | jq '.[0].urls[1]' | sed 's/\"//g')
You can debug all requests using the --loglevel debug
flag.
Fin
You should now reach your Lando service externally using your previously added CNAME DNS record ("local.domain.tld").
Read more...
No, you can't use your $6,299.00 Camera as a Webcam. That will be $5
$30 billion company want's you to pay $5 for using your own camera as a webcam
Fix Laravel Job Queue not processing with MaxAttemptsExceededException
Fix issues with the Laravel Job Queue not processing jobs due to max attempts exceeding.