From d59a16f299153b41695ef14df1d6689c3fe1f5c4 Mon Sep 17 00:00:00 2001 From: rafal Date: Thu, 29 Jan 2026 20:47:50 +0000 Subject: [PATCH] Update README.md --- README.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d02eaf4..8d42e0f 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,68 @@ It is recommended to install this in a system directory. ```bash sudo mkdir -p /opt/ionos-ddns sudo git clone [https://github.com/TWOJA_NAZWA/ionos-ddns.git](https://github.com/TWOJA_NAZWA/ionos-ddns.git) /opt/ionos-ddns -cd /opt/ionos-ddns \ No newline at end of file +cd /opt/ionos-ddns + +### 2. Install dependencies +''' +sudo apt update +sudo apt install python3-pip +sudo pip3 install -r requirements.txt +''' + +### 3. Configuration +''' +sudo nano config.json +''' +Fill in your api_prefix and api_secret. + +Domains List: Edit domains.txt and add domains one per line: +''' +sudo nano domains.txt +''' +Example: +''' +mydomain.com +vpn.mydomain.com +server.other-domain.net +''' + +### 4. Install System Service +Copy the service file to systemd directory: +''' +sudo cp ionos-ddns.service /etc/systemd/system/ +''' +Reload daemon, enable and start the service: +''' +sudo systemctl daemon-reload +sudo systemctl enable ionos-ddns.service +sudo systemctl start ionos-ddns.service +''' + +### Monitoring +Check the service status: +''' +sudo systemctl status ionos-ddns.service +''' +View logs: +''' +tail -f /var/log/ionos-ddns.log +''' + +### How it works +The script runs in an infinite loop (every 10 minutes). + +Fetches your current Public IP. + +Reads domains.txt. + +For each domain: + +Finds the correct Zone ID via API. + +Checks if an A-Record exists. + +If exists: Checks if IP matches. If not, performs PUT (Update). + +If missing: Performs POST (Create). +