Dynamic DNS: Difference between revisions

Arnecc (talk | contribs)
Created page with "[https://en.wikipedia.org/wiki/Dynamic_DNS Dynamic DNS] (DDNS) is a method that automatically updates name server records with current information such as hostnames and IP addresses. This is particularly useful for users hosting services on a home network with a dynamic public IP address, which can change over time due to ISP policies or network restarts. By using DDNS, users can maintain consistent access to their services over the internet via a fixed domain name, eve..."
 
Onny (talk | contribs)
 
(2 intermediate revisions by the same user not shown)
Line 10: Line 10:


{{file|/etc/nixos/hardware-configuration.nix|nix|<nowiki>
{{file|/etc/nixos/hardware-configuration.nix|nix|<nowiki>
services.ddns-updater.enable = true;
services.ddns-updater = {
      services.ddns-updater.environment = {
  enable = true;
        SERVER_ENABLED="no";
  environment = {
        CONFIG_FILEPATH = "/etc/ddns-updater/config.json";
    SERVER_ENABLED="no";
        PERIOD = "5m";
    CONFIG_FILEPATH = "/etc/ddns-updater/config.json";
      };
    PERIOD = "5m";
  };
};
</nowiki>}}
</nowiki>}}


Where <code>CONFIG_FILEPATH</code> should correspond to the location of your config.json file.
Where <code>CONFIG_FILEPATH</code> should correspond to the location of your config.json file.


The following is an example for Porkbun. Consult the documentation of your DNS provider for proper formatting and make sure to enable API access if needed.   
The following is an example for the provider [https://porkbun.com Porkbun]. Consult the documentation of your DNS provider for proper formatting and make sure to enable API access if needed.   


{{file|config.json|json|<nowiki>
{{file|config.json|json|<nowiki>
Line 27: Line 29:
     {
     {
       "provider": "porkbun",
       "provider": "porkbun",
       "domain": "1234567890abcdefg1234567890",
       "domain": "example.org",
       "api_key": "pk1_1234567",
       "api_key": "pk1_1234567",
       "secret_api_key": "1234567890abcdefg1234567890"
       "secret_api_key": "1234567890abcdefg1234567890"
Line 33: Line 35:
     {
     {
       "provider": "porkbun",
       "provider": "porkbun",
       "domain": "subdomain.domain.example",
       "domain": "subdomain.example.org",
       "api_key": "pk1_1234567890abcdefg1234567890",
       "api_key": "pk1_1234567890abcdefg1234567890",
       "secret_api_key": "sk1_1234567890abcdefg1234567890"
       "secret_api_key": "sk1_1234567890abcdefg1234567890"