It provides a simple DynDNS service running on https://hostsharing.net/ and running with Fritz!Box.
  • Go 93.4%
  • Shell 4.2%
  • Makefile 2.4%
Find a file
Sebastian Schulz 2e4e876e3f
All checks were successful
/ test-all (push) Successful in 1m1s
docs(changelog): prepare v1.1.0 release
2026-07-19 15:04:32 +00:00
.forgejo chore(deps): pin Go toolchain to go1.26.5 via go.mod 2026-07-19 14:58:51 +00:00
.vscode Provide scaffolding of Go app 2024-07-12 21:20:24 +02:00
cmd feat(build): expose version via --version 2026-07-18 20:26:11 +00:00
internal/server build: update httplog to v3 and fix logging calls 2026-07-19 14:37:06 +00:00
.devcontainer.json chore(devcontainer): Use standard image and mount host .copilot 2026-07-07 21:58:30 +00:00
.gitignore refactor: split source into cmd and internal/server 2026-07-16 14:26:12 +00:00
AGENTS.md chore(deps): pin Go toolchain to go1.26.5 via go.mod 2026-07-19 14:58:51 +00:00
CHANGELOG.md docs(changelog): prepare v1.1.0 release 2026-07-19 15:04:32 +00:00
go.mod chore(deps): pin Go toolchain to go1.26.5 via go.mod 2026-07-19 14:58:51 +00:00
go.sum build: update httplog to v3 and fix logging calls 2026-07-19 14:37:06 +00:00
install.sh fix(install): rename downloaded binary 2026-07-19 13:44:37 +00:00
LICENSE Initial commit 2024-07-12 20:44:11 +02:00
main.go refactor: split source into cmd and internal/server 2026-07-16 14:26:12 +00:00
Makefile feat(build): expose version via --version 2026-07-18 20:26:11 +00:00
README.md docs: add release and CI status badges 2026-07-19 15:03:36 +00:00
renovate.json ci: pin upload/download-artifact actions to v4 2026-07-19 14:03:39 +00:00

hostsharing-dyndns

A DynDNS service for Hostsharing e.G., tested with Fritz!Box routers but compatible with any DynDNS client. The service runs as a FastCGI application under Apache and is started automatically - no manual server startup is required.

Go Release Test License: MIT

Overview

This service enables dynamic DNS updates for domains hosted on the Managed Operations Platform. It is tested with Fritz!Box routers but works with any client that supports standard DynDNS update requests.

The application runs as a FastCGI binary under Apache. The Managed Operations Platform automatically starts the service when requests are received at the configured URL.

For more information about FastCGI on the Managed Operations Platform, see the official documentation.

For support or questions, you can also contact the author via contact page.

Features

  • IPv4 and IPv6 support - Handles both address families for complete DNS coverage
  • Secure authentication - Uses Argon2id password hashing (plaintext passwords are never stored)
  • Automatic zonefile generation - Creates and updates DNS zone files automatically
  • Sensible defaults - Minimal configuration required for standard setups

Prerequisites

  • A Web Hosting Package on the Managed Operations Platform with FastCGI access
  • A DynDNS-compatible client (tested with Fritz!Box)

Installation

One-line install

SSH into your Hostsharing server, change into the FastCGI folder of the domain you want to serve the DynDNS endpoint from, then run:

cd ~/doms/dyndns.example.com/fastcgi-ssl
curl -fsSL https://forge.sebatec.eu/sebatec-eu/hostsharing-dyndns/raw/branch/main/install.sh | bash

The binary lands in the current directory, already executable. Apache's FastCGI wiring picks it up automatically.

Substitute dyndns.example.com with the actual domain whose doms/ directory you want to use.

Build the binary

make build

This creates a statically linked binary named hostsharing-dyndns in the current directory.

Deploy to Hostsharing

Set your SSH host and destination path in Makefile.variables:

SSH_HOST=your-hostsharing-server
SCP_DEST=doms/dyndns.example.com/fastcgi-ssl/

Then deploy:

make deploy

This copies the binary to doms/dyndns.example.com/fastcgi-ssl/hostsharing-dyndns on the Managed Operations Platform, where it will be accessible at:

https://dyndns.example.com/fastcgi-bin/hostsharing-dyndns

Usage

Configure Fritz!Box

In your Fritz!Box DynDNS configuration, use this URL format:

https://dyndns.example.com/fastcgi-bin/hostsharing-dyndns?user=home&passwd=<password>&ipaddr=<ipv4>&ip6addr=<ipv6>

Replace <password> with the base64-RawURL encoded password generated by the generatePassword command (see below). The user parameter defaults to home if not specified.

For Fritz!Box configuration instructions, see the official AVM documentation.

Generate a password

Generate a secure password and configuration block:

hostsharing-dyndns generatePassword

This outputs two parts:

  1. A YAML configuration block for your config file (contains the Argon2id hash and salt)
  2. The base64-RawURL encoded password to use in your Fritz!Box URL

Important: The plaintext password is never stored. Only the Argon2id hash (Key) and Salt are saved in the configuration file.

Validate configuration

Check your configuration file for errors:

hostsharing-dyndns validateConfig

Configuration

The service requires a YAML configuration file located at:

~/doms/dyndns.example.com/etc/hostsharing-dyndns/config

Create the directory and file:

mkdir -p ~/doms/dyndns.example.com/etc/hostsharing-dyndns
vim ~/doms/dyndns.example.com/etc/hostsharing-dyndns/config

Minimal configuration

Only the Password block is required. All other fields use sensible defaults:

UpdaterHandler:
  Password:
    Key: <base64-RawURL>
    Salt: <base64-RawURL>
    Time: 8
    Memory: 65536
    Threads: 4
    KeyLen: 32

Use the output from hostsharing-dyndns generatePassword for the Password block values.

Full configuration with defaults

All available configuration options with their default values:

UpdaterHandler:
  User: home
  DomainSubpart: home
  Filename: ~/doms/dyndns.example.com/etc/pri.dyndns.example.com
  Password:
    Key: <base64-RawURL>
    Salt: <base64-RawURL>
    Time: 8
    Memory: 65536
    Threads: 4
    KeyLen: 32
Logger:
  Enabled: true
Field Default Description
User home Username for authentication
DomainSubpart Same as User Subdomain part for the DNS record
Filename Derived from FCGI path Path to the generated zonefile
Logger.Enabled true Enable request logging

Local development

For local testing without FastCGI, set the configuration base path:

CONFIG_BASE_PATH=/home/pacs/<pac>/users/<user>/doms/dyndns.example.com/svc \
  ./hostsharing-dyndns validateConfig

Troubleshooting

403 Forbidden

Verify that:

  • The user parameter in your URL matches the configured User (default: home)
  • The passwd parameter is the correct base64-RawURL encoded password
  • The binary is deployed to the correct FastCGI directory

Configuration errors

Use hostsharing-dyndns validateConfig to check your configuration file for syntax errors or missing required fields.

IP address errors

Ensure that:

  • ipaddr contains a valid IPv4 address (if provided)
  • ip6addr contains a valid IPv6 address (if provided)