A Gamers Grind / XFGN / LM
Status
  • 🖥️www.agamersgrind.com
  • 🏙️--- Public Files ---
    • 👋Welcome, friends
    • ⛑️I need help!
    • ☕Buy me a Coffee
  • 📚Guides
    • Mini Guides
      • Valheim FPS Boost
      • Redirect domain to Google Site
      • Docker Compose
        • 'All' Compose File
        • Add Health Check to Container
        • Mount NFS Share to Container
        • Map hostname to container
    • Portainer and GitOps
      • Set up GitHub
      • Install Portainer
      • Create your first GipOps Compose file
      • Deploy your first GitOps stack
      • Managing your production compose files
    • Cloudflare
      • Domains
      • Generate an API Key
      • Tunnel
        • Create a Tunnel
        • Create a Proxy (Public Hostname)
        • Access Groups & Authentication
      • Dynamic DNS
    • Pterodactyl
      • Creating a new Panel
      • Creating a new Wings node
      • Join servers via domain
      • Configuring your Node Database
      • Server Best Practices & Suggestions
      • Troubleshooting
  • 🎮Game Servers
    • Valheim Public
    • Valheim Private
    • MultiMC (Minecraft)
    • CreateCraft (Minecraft)
    • Insurgency Sandstorm
  • ⚔️AGG Moderation
    • ❔Creating a new Server
    • Approving Valheim Application
  • 🗄️Internal Documentation
Powered by GitBook
On this page
  • Requirements
  • Compose Files
  • Some things to note
  • Confirm the Container is working

Was this helpful?

  1. Guides
  2. Cloudflare

Dynamic DNS

PreviousAccess Groups & AuthenticationNextPterodactyl

Last updated 11 months ago

Was this helpful?

You can use a Dynamic DNS container to automatically update your Cloudflare managed domain, to keep it up to date with your dynamic public IP address

Requirements

  • A Cloudflare API key per Generate an API Key

  • Your domains DNS will need to be managed by Cloudflare, per Domains

Compose Files

You will be able to use the https://github.com/trentnbauer/agg-docs/blob/main/guides/cloudflare/broken-reference/README.md guide to put these compose files into production

Example .ENV file

CLOUDFLARE_APIKEY=
DOMAIN=
SUBDOMAIN=
PROXIED=true

Some things to note

  • If you are setting up DDNS for your root domain, leave the subdomain variable blank

  • It is recommended to leave proxied as true but if your service fails to load, try it as false.

  • You may need to configure a Cloudflare tunnel, per Tunnel

Confirm the Container is working

Log into Portainer and view the logs for the container, you should see something similar to below

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 30-cloudflare-setup: executing... 
DNS Zone: <REDACTED> (ebf622fd8125a2b85523ddd64814a66e)
DNS record for '<REDACTED>' was not found in <REDACTED> zone. Creating now...
DNS Record: <REDACTED> (5109ffe562242554b4a4599b06ffa0f0)
[cont-init.d] 30-cloudflare-setup: exited 0.
[cont-init.d] 50-ddns: executing... 
No DNS update required for <REDACTED> (<REDACTED>).
[cont-init.d] 50-ddns: exited 0.
[cont-init.d] done.
[services.d] starting services
Starting crond...
crond: crond (busybox 1.31.1) started, log level 6
[services.d] done.
📚

Time Required

5 Minutes

Difficulty

Low

https://github.com/trentnbauer/agg/blob/main/docker-compose/ddns.yml
version: "3"
services:
  play:
    image: oznu/cloudflare-ddns:latest
    restart: always
    environment:
      - API_KEY=$CLOUDFLARE_APIKEY     #Required
      - ZONE=$DOMAIN                   #Required
      - SUBDOMAIN=$SUBDOMAIN           #Not required
      - PROXIED=$PROXIED               #Required: true/false
    logging:
      driver: "json-file"
      options:
        max-size: "5m"
        max-file: "3"