Simple Scaleway dynamic DNS service using API
3.5K
Simple Scaleway dynamic DNS service by API written in Crystal.
:rocket: Suggestions for new improvements are welcome in the issue tracker.
You can run scaleway-ddns using Docker or Docker Compose. Replace example values with your actual configuration.
Run directly from Docker Hub:
docker run -d \
--name scaleway-ddns \
-e SCW_SECRET_KEY="your-scaleway-secret-key" \
-e IDLE_MINUTES="10" \
-e DOMAIN_LIST="myfirstdomain.com,anotherone.com" \
-e ENABLE_IPV4="true" \
-e ENABLE_IPV6="false" \
d1ceward/scaleway-ddns:latest
Run from GitHub Container Registry:
docker run -d \
--name scaleway-ddns \
-e SCW_SECRET_KEY="your-scaleway-secret-key" \
-e IDLE_MINUTES="10" \
-e DOMAIN_LIST="myfirstdomain.com,anotherone.com" \
-e ENABLE_IPV4="true" \
-e ENABLE_IPV6="false" \
ghcr.io/d1ceward/scaleway-ddns:latest
Recommended for multi-container setups or easier management:
services:
scaleway_ddns:
image: d1ceward/scaleway-ddns:latest # Use Docker Hub image
# Or use GitHub Packages:
# image: ghcr.io/d1ceward/scaleway-ddns:latest
restart: unless-stopped
environment:
SCW_SECRET_KEY: your-scaleway-secret-key
IDLE_MINUTES: 10
DOMAIN_LIST: myfirstdomain.com,anotherone.com
ENABLE_IPV4: true # Optional, enables IPv4 address updates (default: true)
ENABLE_IPV6: false # Optional, enables IPv6 address updates (default: true)
Environment Variables:
SCW_SECRET_KEY (required): Your Scaleway API secret key.IDLE_MINUTES: Minutes between IP checks (default: 60, min: 1, max: 1440).DOMAIN_LIST: Comma-separated domains to update, see below.ENABLE_IPV4: Set to true or false to enable/disable IPv4 updates (default: true).ENABLE_IPV6: Set to true or false to enable/disable IPv6 updates (default: true).Domains and DNS zones:
Scaleway stores every record inside a DNS zone, so each DOMAIN_LIST entry is split in two: the zone
to query, and the name of the record to update inside that zone. The zone is assumed to be the last
two labels of the entry, which covers example.com and anything below it. If your zone has more
labels, such as example.co.uk, write it explicitly after a colon.
DOMAIN_LIST entry | Zone queried | Record updated |
|---|---|---|
example.com | example.com | the zone apex |
home.example.com | example.com | home |
nas.home.example.com | example.com | nas.home |
home.example.co.uk:example.co.uk | example.co.uk | home |
The record has to exist beforehand: the service refreshes the address of an existing A or AAAA
record and never creates one, logging a warning when no record matches. An entry made of a single
label, or whose name does not belong to the zone written after the colon, is skipped with a warning
while the remaining entries are still updated.
Download the executable:
wget --no-verbose -O scaleway-ddns https://github.com/d1ceward/scaleway-ddns/releases/download/v2.3.1/scaleway-ddns-linux-amd64
Make it executable:
chmod +x scaleway-ddns
Run the service:
./scaleway-ddns run
Documentation available here : https://d1ceward.github.io/scaleway-ddns/
Bug reports and pull requests are welcome on GitHub at https://github.com/d1ceward/scaleway-ddns. By contributing you agree to abide by the Code of Merit.
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature).tool-versions file)shards installshards buildThe newly created binary should be at bin/scaleway-ddns
crystal spec
Content type
Image
Digest
sha256:abf241d81…
Size
13 MB
Last updated
3 days ago
docker pull d1ceward/scaleway-ddns