If you already have installed Docker, Docker Compose, and the NPM on your server you can start with section 2:
1) Docker installation:
mkdir docker && cd docker
wget https://library.ahadiani.ca/install_docker_nproxyman.sh
chmod +x install_docker_nproxyman.sh
./install_docker_nproxyman.sh
2) Now after the Docker installation and the NPM also we should go into the Portainer web console and the stack section and make the needed stack as below:
version: '2'
services:
cloudflare-ddns:
image: oznu/cloudflare-ddns:latest
restart: always
environment:
- API_KEY=xxxxxxx
- ZONE=example.com
- SUBDOMAIN=subdomain
- PROXIED=false
Note1: the default IP update interval for this docker container would be every 5 minutes.
Note2: for creating the needed API key in Cloudflare please refer to the related video on Youtube.
When you deploy this created stack, you will see that each time your WAN IP address changes you will have access to your local services if you have already completed the needed port forwarding in your modem or network firewall, as I described in the related learning video on Youtube.
Windows users click here…