{"id":13680360,"url":"https://github.com/olimpo88/PyDDNS","last_synced_at":"2025-04-29T23:31:14.413Z","repository":{"id":41284399,"uuid":"160567056","full_name":"olimpo88/PyDDNS","owner":"olimpo88","description":"Complete system to create your own server ddns","archived":false,"fork":false,"pushed_at":"2024-04-12T21:48:37.000Z","size":2231,"stargazers_count":72,"open_issues_count":7,"forks_count":36,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-11T23:37:23.117Z","etag":null,"topics":["ddns","ddns-client","ddns-manager","ddns-updater","dinamic","django","dns-server","dyndns2","free","opensource","python"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olimpo88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-05T19:20:31.000Z","updated_at":"2024-11-07T09:37:02.000Z","dependencies_parsed_at":"2024-08-02T13:29:37.636Z","dependency_job_id":null,"html_url":"https://github.com/olimpo88/PyDDNS","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olimpo88%2FPyDDNS","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olimpo88%2FPyDDNS/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olimpo88%2FPyDDNS/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olimpo88%2FPyDDNS/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olimpo88","download_url":"https://codeload.github.com/olimpo88/PyDDNS/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251599965,"owners_count":21615613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ddns","ddns-client","ddns-manager","ddns-updater","dinamic","django","dns-server","dyndns2","free","opensource","python"],"created_at":"2024-08-02T13:01:16.297Z","updated_at":"2025-04-29T23:31:09.391Z","avatar_url":"https://github.com/olimpo88.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# ![PyDDNS](https://i.imgur.com/kOrgTBW.png)\nComplete system to create your own dynamic DNS server.\n\nBased on the \u003cb\u003edprandzioch\u003c/b\u003e project: https://github.com/dprandzioch/docker-ddns\n\n\n## Description\nPyDDNs is a complete solution, allows you to set up and manage their own dns, compatible with the dyndns2 protocol, the user can update his ip by web interface or using a compatible client for example ddclient.\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n### Screenshots\n![screenshots](https://i.imgur.com/6HTwrfn.png)\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n**VIDEO**: https://www.youtube.com/watch?v=ALN9901EoyA\u0026feature=youtu.be\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n\n### Prerequisites\nInstall git\n\nInstall docker - Dockerhttps://docs.docker.com/install/\n\nInstall docker-composer - https://docs.docker.com/compose/install/\n\n**important**: if you use ubuntu 18 you should see the note at the end of this text\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n## Quick Start\n\n**IMPORTANT**: If you are using PyDDNS v1 before updating, make a backup of the file docker-compose.yml\n\n- Clone de proyect\n- ```cd PyDDNS```\n- copy the configuration file ```cp .env-demo .env```\n- Edit the configuration file ```nano .env```\n\n```\nDOMAIN=ddns.demo.com  \u003c-- our domain\nSHARED_SECRET=el@sadsadyS58 \u003c-- password for internal API-REST\n\nDATABASE_NAME=pyddns\nDATABASE_USER=pyddns\nDATABASE_PASS=PyDyn@m1cDNSP0s\nDATABASE_HOST=postgres\nDATABASE_PORT=5432\n\nDJANGO_SU_NAME=admin\nDJANGO_SU_EMAIL=admin@company.com\nDJANGO_SU_PASSWORD=1234 \u003c-- Password to default administrator\nDJANGO_DEBUG=1\nDJANGO_LOG_LEVEL=INFO\nDJANGO_PYTHONUNBUFFERED=1\nOWN_ADMIN: 1  \u003c-- 1 = all users can create subdomains, 0 = only the administrator can create subdomains\nDNS_ALLOW_AGENT: ddclient3,ddclient \u003c-- If you want to control by client, put their names separated by comma\n\nWEB_PORT=80\nDNS_PORT=53\n```\n\n- Install docker and docker-compose\n- Start with command: `docker-compose up`\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Configuration of DNS\nYou need a subdomain for example: ddns.demo.com\n\nThen you must create an **NS record** as follows:\nddns.demo.com IN NS X.X.X.X \u003c-- SERVER PUBLIC IP (CHECK)\n\n\nExample in bind9:\n\n```\nddns.demo.com.\tIN\tA\tX.X.X.X\n$ORIGIN ddns.demo.com.\n@                       IN NS   ddns.demo.com.\n```\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Create SSL certificate\nAs web today is almost required to have SSL the package is setup for that by default.\n\n1. Create folder `mkdir -p data/certs/`\n2. To generate a certificate do `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout data/certs/https.key -out data/certs/https.crt`\n3. Then send to your certificate authority and get the server.crt file back\n4. Install the key and crt files into certificate store in `/data/certs`\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Running without SSL\nIt is not recomended to run without SSL but if you wish to\n\nEdit `/config/nginx/mydjango.conf` and comment this line:\n```\nreturn 302 https://$host$request_uri;\n```\n    \n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Edit static records or glue records\nThis is usefull for creating the @ A X.X.X.X that is needed from above.\nSometimes you wish to have some static records or change the zone file outside of what you can do via gui.\n\n1. Enter the container console: `docker-compose exec ddns bash`\n2. You must execute the following command, replacing the last attribute: `rndc freeze ddns.demo.com`\n3. Edit the zone file: `data/bind-data/ddns.demo.com.zone`\n4. Thaw the zone: `rndc thaw ddns.demo.com`\n\nAdd the A record line (change to your PUBLIC IP).\nYour file will look something like this,\n\n```\n$ORIGIN .\n$TTL 86400      ; 1 day\nddns.demo.com           IN SOA  localhost. root.localhost. (\n                                75         ; serial\n                                3600       ; refresh (1 hour)\n                                900        ; retry (15 minutes)\n                                604800     ; expire (1 week)\n                                86400      ; minimum (1 day)\n                                )\n                        NS      localhost.\n                        A       1.2.3.4\n$ORIGIN ddns.demo.com.\n$TTL 60 ; 1 minute\n\n```\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Friendly URL for the web interface\nsometimes we want to have a friendly url for the web interface, in this case, you don't need edit static records or glue records.\nFor example, if you want to use myip.ddns.com for your web interface. Then you only need to create an A record in your DNS pointing to the public IP of PYDDNS.\n\nNow you will have myip.demo.com for the web interface and ddns.demo.com for the dynamic dns service.\n\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n## Architecture\n![screenshots](https://i.imgur.com/KWZzxOs.png)\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n## DDNS clients\nYou can use any client compatible with the DynDNS2 protocol.\n\n###### For Windows\nI recommend using `DynDNS Simply Client`, you can download it here: https://sourceforge.net/projects/dyndnssimplycl/\n![screenshots](https://i.imgur.com/cTwjRFS.png)\n\n\n###### For Linux and Mac OS X\nI recommend using `ddclient`, basic configuration:\n```\nprotocol=dyndns2\nuse=web, web=checkip.dyndns.com, web-skip='IP Address'\nserver=localhost.com\nssl=no\nlogin=userdemo\npassword='userpassword'\nyourdomain.ddns.demo.com\n```\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Translation :us::es:\nThe system automatically detects the language of your browser.\nIf you want to add your translations you must follow the following steps:\n\n1. Enter the container console: `docker-compose exec python bash`\n2. You must execute the following command, replacing the last attribute: `python manage.py makemessages --locale es`\n3. Edit the file: `appdata/pyddns/locale/XXXX/LC_MESSAGES/django.po`\n4. Once the translations are finished, it must be compiled: `python manage.py compilemessages`\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Change default language\n- open file --\u003e nano ~/PyDDNS/appdata/pyddns/pyddns/settings.py\n- change the variable in line 149/185 to --\u003e LANGUAGE_CODE = 'en-En'\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### TODO\nConfig default language in .env file\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Notes for Ubuntu 18 and later\nOn Ubuntu , port 53 is most likeley already busy with the systemd-resolve service.\n\nTo check this run this command.\n```\nsudo lsof -i :53\n```\n\nIf the command shows that systemd-resolve then we need to change so that it does not bind the port. First, edit /etc/systemd/resolved.conf, and for DNS enter your dns server ip (1.1.1.1 for cloudflare or 8.8.8.8 for google).\n```\n[Resolve]\nDNS=1.1.1.1\n#FallbackDNS=\n#Domains=\n#LLMNR=no\n#MulticastDNS=no\n#DNSSEC=no\n#DNSOverTLS=no\n#Cache=no\nDNSStubListener=no\n#ReadEtcHosts=yes\n```\n\nThen link the file to etc\n\n```\nsudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf\n```\n\nAnd lastly reboot:\n\n```\nsudo reboot\n```\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n### Contact :email:\nhttps://www.linkedin.com/in/peraltaleandro/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folimpo88%2FPyDDNS","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folimpo88%2FPyDDNS","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folimpo88%2FPyDDNS/lists"}