Code Monkey home page Code Monkey logo

lima-city-ddns's Introduction

lima-city-ddns

GitHub Tag GitHub License Static Badge

โ„น๏ธ This app allows you to have Dynamic DNS for your lima-city DNS server.

Alt

Gaining required values

At first, you should create an API-Key in the lima-city settings. You should assign the domains.admin and dns.admin permissions. Then you can execute curl https://www.lima-city.de/usercp/domains.json -u api:<YOUR_API_KEY> and read the domain ID from the JSON. After that you can get the ID of the A record you want to update by reading the response of curl https://www.lima-city.de/usercp/domains/<YOUR_DOMAIN_ID>/records.json -u api:<YOUR_API_KEY>.

Formatting your DOMAIN_DATA

To provide your domain IDs and record IDs to the DDNS server, you need to form a special string. The syntax is as following: <YOUR_DOMAIN_ID_1>:<YOUR_RECORD_ID_1>,<YOUR_RECORD_ID_n>;<YOUR_DOMAIN_ID_n>:<...> There MUST NOT be a semicolon at the end!

By that, you can update multiple records of multiple domains at the same time.

Docker Compose

External API mode

This mode fetches your public IP address from the ipfy API every minute. If there should be a new one, it will update your records. For example, you could design your Docker compose like that:

services:
  ddns:
    image: "ghcr.io/minomy13/lima-city-ddns:latest"
    restart: always
    environment:
      AUTH: "<YOUR_API_KEY>"
      DOMAIN_DATA: "<YOUR_DOMAIN_DATA>"

Router mode

This mode hosts a web server waiting for a DDNS request of your router. I can provide you with precise setup guides for the AVM FritzBox and the UniFi UDM Pro. [COMING SOON] For any other router you should be able to figure it out yourself with the following information:

  • The Update-URL should be as following: <address>/?password=<password>&ip=<ip_address>. The password and ip_address fields vary depending on your router. For the FritzBox for example they are <pass> and <ipaddr>, for inadyn-based software however, like on the UDM Pro, it would be %p and %i.
  • The password is the one you'll set the PASSWORD environment variable to. Must be URL encoded - this website worked perfectly for me.
  • The username really doesn't matter - get creative! ๐Ÿ˜‰
  • The same applies to the host.

So, your docker compose could look like that:

services:
  ddns:
    image: "ghcr.io/minomy13/lima-city-ddns:latest"
    restart: always
    environment:
      AUTH: "<YOUR_API_KEY>"
      DOMAIN_DATA: "<YOUR_DOMAIN_DATA>"
      MODE: "router"
      PASSWORD: "<YOUR_CUSTOM_PASSWORD>"

Environment variables

Variable Usage Default Required
AUTH lima-city auth token used to authorize with the lima-city API. yes
DOMAIN_DATA String containing domain and record IDs that should be updated. Take a look at the #formatting-your-domain_data section. yes
MODE Select the mode you want to use. It is either router or external_api. The modes are described in the #docker-compose section. external_api no
PASSWORD Password to authenticate in router mode. Must be URL encoded - this website worked perfectly for me. only in router mode

Roadmap

  • Adding support for PTR records

lima-city-ddns's People

Contributors

dependabot[bot] avatar minomy13 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.