A complete self-hosted DDNS solution alternative to DuckDNS.
Requirements
- A custom domain. If you're using an apex domain, you'll need to set up glue records, or you can use a different domain for nameservers to avoid loopback issues. Learn more here.
- A server with Docker installed, and it should support Docker Compose.
4321
fornamik-ddns
53
forpowerdns
(DNS over TCP)80
and443
forcaddy
(HTTP/HTTPS)
53
forpowerdns
(DNS over UDP)
To set up the DNS, you will need the following records:
- NS (Nameserver)
- A (for IPv4) or AAAA (for IPv6)
- Glue Records (if using custom nameservers on the same domain)
For more details on glue records, check this link.
If you're using an apex domain (like website.com
), you'll need to create glue records. Glue records ensure that DNS resolvers know the IP address of your custom nameservers.
-
In your domain registrar, create at least one custom nameserver (e.g.,
ns1.website.com
). Some registrars require two or more nameservers, but you can set up as many as six. -
For each nameserver (e.g.,
ns1.website.com
,ns2.website.com
), add glue records that point to the IP address (IPv4 or IPv6 or both) of the server hosting your app. -
Update your DNS zone for
website.com
to use the custom nameservers you just created (ns1.website.com
andns2.website.com
). -
Lastly, in your
docker-compose.yml
file, replace the following environment variables with your own:BASE_DOMAIN
NAMESERVERS
EMAIL
If you don’t want to create glue records, you can use another domain for the nameservers, pointing it to your server’s IP address. This setup works just as well.
You can also use a subdomain for your app without creating glue records. Here’s how:
-
Create a nameserver record like
nameserver.example.com
with an A (or AAAA) record that points to your server’s IP address. -
Use
d.example.com
as your base domain. Create an NS record ford.example.com
that points tonameserver.example.com
. -
This will delegate all subdomains under
d.example.com
to the DNS server running atnameserver.example.com
, allowing you to manage DNS dynamically.
-
Clone the Repository:
git clone https://github.com/Akid-Affian/namik-ddns.git
-
Run the Application:
cd namik-ddns/docker docker compose up --build
Note: Before running the command, make sure to edit
docker/docker-compose.yml
and replace theBASE_DOMAIN
,NAMESERVERS
, andEMAIL
values in the environment section with your own. -
Complete the Setup:
Visithttp://localhost:4321/setup
orhttp://your-ip:4321/setup
to complete the setup and create your account.
Our API is very similar to DuckDNS API see the docs here.
Join our telegram here