My photostructure server is behind my home network which has a dynamic IP address and various NAT routers
I set up the ‘caddy’ reverse proxy and the basic authentication – see elsewhere on the photostructure documentation
Once I tested caddy, then I added cloudflare tunnel.
Note: you will need your own domain name, and will need to be able to point it to the cloudflare domain nameservers
These instructions should get you started:
Next you will need to install the ‘cloudflared’ program, and configure it. Here are the instructions I followed:
My system is Ubuntu, and ‘caddy’ is listening on port 1234
Here are the commands I typed to get the ‘cloudflare tunnel’ up and running.
sudo dpkg -i cloudflared-stable-linux-amd64.deb # installs the program cd ~/.cloudflared/ cloudflared tunnel login # one-time authorization cloudflared tunnel create photos # create your tunnel and give it a name cloudflared tunnel route dns photos photos.mydomain.com # adds the dns entry.
create the two-line config.yml file
url: http://0.0.0.0:1234 logfile: ./cloudflared.log
and then run
cloudflared tunnel run photos
that is all!