Skip to content

Commit f20af52

Browse files
authored
Merge pull request #1675 from reptil1990/pr/ddns-updater
feat(ddns-updater): add DDNS-Updater LXC container script
2 parents aa51e3c + 1d93731 commit f20af52

4 files changed

Lines changed: 163 additions & 0 deletions

File tree

ct/ddns-updater.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: reptil1990
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/qdm12/ddns-updater
7+
8+
APP="DDNS-Updater"
9+
var_tags="${var_tags:-network}"
10+
var_cpu="${var_cpu:-1}"
11+
var_ram="${var_ram:-512}"
12+
var_disk="${var_disk:-2}"
13+
var_os="${var_os:-debian}"
14+
var_version="${var_version:-13}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
17+
header_info "$APP"
18+
variables
19+
color
20+
catch_errors
21+
22+
function update_script() {
23+
header_info
24+
check_container_storage
25+
check_container_resources
26+
if [[ ! -d /opt/ddns-updater ]]; then
27+
msg_error "No ${APP} Installation Found!"
28+
exit
29+
fi
30+
if check_for_gh_release "ddns-updater" "qdm12/ddns-updater"; then
31+
msg_info "Stopping Service"
32+
systemctl stop ddns-updater
33+
msg_ok "Stopped Service"
34+
35+
msg_info "Backing up Data"
36+
cp -r /opt/ddns-updater/data /opt/ddns-updater_data_backup
37+
msg_ok "Backed up Data"
38+
39+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "ddns-updater" "qdm12/ddns-updater" "singlefile" "latest" "/opt/ddns-updater" "ddns-updater_*_linux_amd64"
40+
41+
msg_info "Restoring Data"
42+
cp -r /opt/ddns-updater_data_backup/. /opt/ddns-updater/data/
43+
rm -rf /opt/ddns-updater_data_backup
44+
msg_ok "Restored Data"
45+
46+
msg_info "Starting Service"
47+
systemctl start ddns-updater
48+
msg_ok "Started Service"
49+
msg_ok "Updated successfully!"
50+
fi
51+
exit
52+
}
53+
54+
start
55+
build_container
56+
description
57+
58+
msg_ok "Completed successfully!\n"
59+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
60+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
61+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8000${CL}"

ct/headers/ddns-updater

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
____ ____ _ _______ __ __ __ __
2+
/ __ \/ __ \/ | / / ___/ / / / /___ ____/ /___ _/ /____ _____
3+
/ / / / / / / |/ /\__ \_____/ / / / __ \/ __ / __ `/ __/ _ \/ ___/
4+
/ /_/ / /_/ / /| /___/ /____/ /_/ / /_/ / /_/ / /_/ / /_/ __/ /
5+
/_____/_____/_/ |_//____/ \____/ .___/\__,_/\__,_/\__/\___/_/
6+
/_/

install/ddns-updater-install.sh

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: reptil1990
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/qdm12/ddns-updater
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
fetch_and_deploy_gh_release "ddns-updater" "qdm12/ddns-updater" "singlefile" "latest" "/opt/ddns-updater" "ddns-updater_*_linux_amd64"
17+
18+
msg_info "Configuring DDNS-Updater"
19+
mkdir -p /opt/ddns-updater/data
20+
cat <<EOF >/opt/ddns-updater/data/config.json
21+
{
22+
"settings": [
23+
{
24+
"provider": ""
25+
}
26+
]
27+
}
28+
EOF
29+
msg_ok "Configured DDNS-Updater"
30+
31+
msg_info "Creating Service"
32+
cat <<EOF >/etc/systemd/system/ddns-updater.service
33+
[Unit]
34+
Description=DDNS-Updater
35+
After=network.target
36+
37+
[Service]
38+
Type=simple
39+
ExecStart=/opt/ddns-updater/ddns-updater
40+
Environment=DATADIR=/opt/ddns-updater/data
41+
Environment=LISTENING_ADDRESS=:8000
42+
Environment=LOG_LEVEL=info
43+
Environment=PERIOD=5m
44+
WorkingDirectory=/opt/ddns-updater
45+
Restart=on-failure
46+
RestartSec=5
47+
48+
[Install]
49+
WantedBy=multi-user.target
50+
EOF
51+
systemctl enable -q --now ddns-updater
52+
msg_ok "Created Service"
53+
54+
motd_ssh
55+
customize
56+
cleanup_lxc

json/ddns-updater.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"name": "DDNS-Updater",
3+
"slug": "ddns-updater",
4+
"categories": [
5+
4
6+
],
7+
"date_created": "2026-04-06",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 8000,
12+
"documentation": "https://github.com/qdm12/ddns-updater/wiki",
13+
"website": "https://github.com/qdm12/ddns-updater",
14+
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/ddns-updater.webp",
15+
"config_path": "/opt/ddns-updater/data/config.json",
16+
"description": "Lightweight universal DDNS updater with web UI, supporting 60+ DNS providers including Cloudflare, Namecheap, GoDaddy, DuckDNS and more.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/ddns-updater.sh",
21+
"resources": {
22+
"cpu": 1,
23+
"ram": 512,
24+
"hdd": 2,
25+
"os": "Debian",
26+
"version": "13"
27+
}
28+
}
29+
],
30+
"default_credentials": {
31+
"username": null,
32+
"password": null
33+
},
34+
"notes": [
35+
{
36+
"text": "Edit /opt/ddns-updater/data/config.json with your DNS provider settings before use.",
37+
"type": "warning"
38+
}
39+
]
40+
}

0 commit comments

Comments
 (0)