brent Posted February 15 Share Posted February 15 Are you hosting service on a dynamic IP and receiving a new IP when bouncing your router or firewall? prerequisites: Cloud Flare API token Portainer *Optional* Docker Compose from here. 1. In portainer go to stacks. and create a new stack. 2. Copy the below docker-compose into the editor adding your API key. version: '2' services: cloudflare-ddns: image: oznu/cloudflare-ddns:latest restart: always environment: - API_KEY=xxxxxxx - ZONE=example.com - SUBDOMAIN=subdomain #remove - PROXIED=yes 3. I remove the "SUBDOMAIN" environment as I use CNAME for all my subdomains. Meaning if I update the IP of my A record then my subdomains that use CNAME records are updated. 4. Before clicking on deployment let's set up a test scenario. Go to Cloud Flare and change the last octet of the IP. 5. Back in Portainer click deploy. 6. Go to container logs and verify the container is running. You should see the IP change. 7. In cloud flare verify the DNS has changed to reflect your current IP. 8. In the environment you will see a cron job to run every 5 minutes. This can be changed to your needs. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now