dynamic_dns
Version, currently 0.2.11 version
- 0.2.1latestMay 14, 2021
github.com/dscottboggs/dynamic-dns
An automated dynamic DNS solution for Docker and DigitalOcean
Installation
# Add this to your shard.yml
dependencies:
dynamic_dns:
github: dscottboggs/dynamic-dns
version: ~> 0.2.1Then run:
shards installshard.yml
- Crystal
1.0.0- License
- MIT
- Author
- Scott Boggs
- Target
dynamic_dnsfrom src/run.cr
Dependencies
Runtime Dependencies
- xdg*github: dscottboggs/xdg.cr
README
dynamic_dns
A highly opinionated dynamic DNS solution. Ideal for self-hosters, small business, or other small-to-medium sized deployments. I use it on my home server for my personal services as well as a VPS for more public-facing services (I don't have great upload speeds).
Features
- Subdomain discovery from Docker container labels
- Integration with DigitalOcean
- Structured Logging (ideal for monitoring and alerting)
- SystemD integration (some manual setup required for now)
Things I don't plan to add (but would accept a PR for)
- Integration with other dynamic DNS services
- Support for other methods of rule discovery
Non-goals
- support for swarms, clusters, or however you want to call multi-server deployments. My use case is well-suited to a few single servers which each host a few services separately from each other, so the added complexity is not worth it to me.
Usage
Rules are defined with a docker label on a relevant container. For example, my ethercalc deployment right now uses the following configuration in it's docker-compose.yml
version: "2.0"
services:
ethercalc:
# ... other options ...
labels:
# ... other labels ...
tech.tams.dns_hosts: sheets.tams.tech sheets.madscientists.co sht.tams.tech
# ... other options ...
By simply labelling the container with the whitespace-separated list of domains it will use, the service will automatically have Digital Ocean point those domains at your IP address.
Installation
Configuration
- Get a DigitalOcean API key with Read and Write access.
- Create a config file in
$XDG_CONFIG_HOME/dynamic-dns/config.json:
{
"auth_key": "your DigitalOcean API key",
"domains": ["tams.tech"]
}
- Copy the dynamic-dns.service and dynamic-dns.timer files to
/etc/systemd/systemand runsystemctl enable dynamic-dnsto install the service to run periodically
Installation from a binary
Download the binary and place it on your path, for example:
wget `curl -sL https://api.github.com/repos/dscottboggs/dynamic-dns/releases/latest | jq -r '.assets[].browser_download_url' `
sudo mv dynamic-dns /usr/local/bin
Installation from source
Clone the repository and run the following commands from the project directory to compile it and install:
shards build --production --release
sudo mv bin/dynamic_dns /usr/local/bin
Running manually after changes
If you know you've made some changes recently and want to force an update, just run systemctl start dynamic-dns.
Contributing
- Fork it (https://github.com/dscottboggs/dynamic-dns/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Scott Boggs - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.2.1- Tagged
- May 14, 2021
- Commit
1cd10b1c166d- Crystal
1.0.0- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/dscottboggs/dynamic-dns
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 26, 2026
- Synced
- Sep 26, 2026
- Versions
- 1