A DDNS daemon written in Rust
- Cloudflare
- Namesilo
cargo build --release
USAGE:
rust-ddns.exe [OPTIONS]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-b, --backend <BACKEND> Backend of the DDNS service (cloudflare or ddns)
-d, --domain <DOMAIN> full domain (e.g. www.example.com)
-k, --key <APIKEY> API key for your account
-
Install NSSM
-
Open an commmand prompt with elevated permission
-
Type in the following commands
cd %PROJECT_ROOT% mkdir %PROJECT_ROOT%/logs nssm.exe install rust-ddns %CD%\target\release\rust-ddns.exe nssm.exe set rust-ddns AppDirectory %CD%\target\release nssm.exe set rust-ddns AppExit Default Restart nssm.exe set rust-ddns AppStdout %CD%\logs\stdout.txt nssm.exe set rust-ddns AppStderr %CD%\logs\stderr.txt nssm.exe set rust-ddns AppRotateFiles 1 nssm.exe set rust-ddns AppRotateOnline 1 nssm.exe set rust-ddns AppRotateBytes 50000 nssm.exe set rust-ddns Description "A DDNS service written in Rust" nssm.exe set rust-ddns DisplayName "Rust DDNS" nssm.exe set rust-ddns ObjectName LocalSystem nssm.exe set rust-ddns Start SERVICE_AUTO_START nssm.exe set rust-ddns Type SERVICE_WIN32_OWN_PROCESS
Create a service description file rust-ddns.service
under /etc/systemd
.
[Unit]
Description=A DDNS daemon written in Rust
After=network.target
Wants=network-online.target
[Service]
Restart=always
Type=simple
ExecStart=/project/target/release/rust-ddns
Environment=
[Install]
WantedBy=multi-user.target
Then, service rust-ddns start
could be used to start this application as a service. Finally, you may use systemctl enable rust-ddns
to enable the service automatically on reboot.
This is enabled as a feature in rust. Following are the steps to enable it.
-
Writing down the configurations in the following files
APIKEY -> config/api_key_default.txt BACKEND -> config/backend_default.txt DOMAIN -> config/domain_default.txt
-
Build with the feature enabled
cargo build --release --features=default-config
- IPV6 support
- Multiple domains
- Config file