cflare-ddns


Namecflare-ddns JSON
Version 0.2.4 PyPI version JSON
download
home_pagehttps://github.com/ianpogi5/cflare-ddns
SummaryYet another Cloudflare DDNS
upload_time2023-12-17 01:38:51
maintainer
docs_urlNone
authorIan Dela Cruz
requires_python
license
keywords cloudflare ddns dynamic dns
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cflare-ddns

This is yet another Cloudflare Dynamic DNS application.

[![PyPI - Version](https://img.shields.io/pypi/v/cflare-ddns)](https://pypi.org/project/cflare-ddns/) [![Docker Pulls](https://img.shields.io/docker/pulls/ianpogi5/cflare-ddns)](https://hub.docker.com/r/ianpogi5/cflare-ddns) [![Docker Image Size (tag)](https://img.shields.io/docker/image-size/ianpogi5/cflare-ddns/latest)](https://hub.docker.com/r/ianpogi5/cflare-ddns) ![Python](https://img.shields.io/badge/python-3670A0?logo=python&logoColor=ffdd54) ![Cloudflare](https://img.shields.io/badge/Cloudflare-F38020?logo=Cloudflare&logoColor=white) [![License](https://img.shields.io/github/license/Ileriayo/markdown-badges)](./LICENSE)

## Installation

```shell
pip install cflare-ddns
```

## Usage

First is you need to create a config file. You can place it in the default location `/etc/cflare-ddns.json` or anywhere in your filesystem that is readable by the script. You'll need to pass that config location in the cli if it's not the default location.

Edit the config file, you'll need to provide the following:

- `api_key` - You can get this in your cloudflare dashboard. Follow this [link](https://developers.cloudflare.com/fundamentals/api/get-started/keys/) to get full instructions.
- `email` - The email account you use in cloudflare.
- `zone_id` - [Zone ID](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/) of your domain name.
- `domain` - The domain name. Example: `example.com`
- `record_name` - The sub domain you want to update with your public ip. This subdomain should be an `A` record type. Example: `www`

Configuration file example:

```json
{
  "api_key": "xxxx",
  "email": "xxxx@gmail.com",
  "records": [
    {
      "zone_id": "xxxx",
      "domain": "example.xyz",
      "record_name": "vpn"
    },
    {
      "zone_id": "xxxx",
      "domain": "example.sh",
      "record_name": "www"
    }
  ]
}
```

Running the script with config in the default location:

```shell
cflare-ddns
```

Running the script with config in non-default location:

```shell
cflare-ddns -c /opt/somewhere/config.json
```

You can add this to your [cronjobs](https://crontab.guru/) to run periodically.

```shell
* * * * * cflare-ddns
- - - - -
| | | | |
| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)
| | | ------- Month (1 - 12)
| | --------- Day of month (1 - 31)
| ----------- Hour (0 - 23)
------------- Minute (0 - 59)
```

To run every 15 minutes:

```cron
*/15 * * * * cflare-ddns
```

### CLI Reference

```shell
usage: cflare-ddns [-h] [-c CONFIG_FILE] [-i INTERVAL] [-v]

options:
  -h, --help            show this help message and exit
  -v, --version         App version
  -c CONFIG_FILE, --config CONFIG_FILE
                        Path to your configuration file.
                        Default paths:
                          /etc/cflare-ddns.json,
                          cflare-ddns.json
  -i INTERVAL, --interval INTERVAL
                        Number of seconds between each sync. This will make the program run
                        forever.Hit Ctrl-C to stop.
```

## Docker

Example on running on docker:

```shell
docker run -e CF_DDNS_INTERVAL=900 -v $(pwd)/cflare-ddns.json:/etc/cflare-ddns.json --rm ianpogi5/cflare-ddns:latest
```

Example using `docker-compose.yml`:

```yaml
version: "3.9"
services:
  cflare-ddns:
    image: ianpogi5/cflare-ddns:latest
    container_name: cflare-ddns
    environment:
      - CF_DDNS_INTERVAL=900
    volumes:
      - /YOUR/PATH/TO/cflare-ddns.json:/etc/cflare-ddns.json
    restart: unless-stopped
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ianpogi5/cflare-ddns",
    "name": "cflare-ddns",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "cloudflare,ddns,dynamic,dns",
    "author": "Ian Dela Cruz",
    "author_email": "iandc76@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/7c/c7/65bcd14e800cc0c7e2c1e1b34cc450cf0a9760dfd007a26a0e1646102535/cflare-ddns-0.2.4.tar.gz",
    "platform": null,
    "description": "# cflare-ddns\n\nThis is yet another Cloudflare Dynamic DNS application.\n\n[![PyPI - Version](https://img.shields.io/pypi/v/cflare-ddns)](https://pypi.org/project/cflare-ddns/) [![Docker Pulls](https://img.shields.io/docker/pulls/ianpogi5/cflare-ddns)](https://hub.docker.com/r/ianpogi5/cflare-ddns) [![Docker Image Size (tag)](https://img.shields.io/docker/image-size/ianpogi5/cflare-ddns/latest)](https://hub.docker.com/r/ianpogi5/cflare-ddns) ![Python](https://img.shields.io/badge/python-3670A0?logo=python&logoColor=ffdd54) ![Cloudflare](https://img.shields.io/badge/Cloudflare-F38020?logo=Cloudflare&logoColor=white) [![License](https://img.shields.io/github/license/Ileriayo/markdown-badges)](./LICENSE)\n\n## Installation\n\n```shell\npip install cflare-ddns\n```\n\n## Usage\n\nFirst is you need to create a config file. You can place it in the default location `/etc/cflare-ddns.json` or anywhere in your filesystem that is readable by the script. You'll need to pass that config location in the cli if it's not the default location.\n\nEdit the config file, you'll need to provide the following:\n\n- `api_key` - You can get this in your cloudflare dashboard. Follow this [link](https://developers.cloudflare.com/fundamentals/api/get-started/keys/) to get full instructions.\n- `email` - The email account you use in cloudflare.\n- `zone_id` - [Zone ID](https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/) of your domain name.\n- `domain` - The domain name. Example: `example.com`\n- `record_name` - The sub domain you want to update with your public ip. This subdomain should be an `A` record type. Example: `www`\n\nConfiguration file example:\n\n```json\n{\n  \"api_key\": \"xxxx\",\n  \"email\": \"xxxx@gmail.com\",\n  \"records\": [\n    {\n      \"zone_id\": \"xxxx\",\n      \"domain\": \"example.xyz\",\n      \"record_name\": \"vpn\"\n    },\n    {\n      \"zone_id\": \"xxxx\",\n      \"domain\": \"example.sh\",\n      \"record_name\": \"www\"\n    }\n  ]\n}\n```\n\nRunning the script with config in the default location:\n\n```shell\ncflare-ddns\n```\n\nRunning the script with config in non-default location:\n\n```shell\ncflare-ddns -c /opt/somewhere/config.json\n```\n\nYou can add this to your [cronjobs](https://crontab.guru/) to run periodically.\n\n```shell\n* * * * * cflare-ddns\n- - - - -\n| | | | |\n| | | | ----- Day of week (0 - 7) (Sunday=0 or 7)\n| | | ------- Month (1 - 12)\n| | --------- Day of month (1 - 31)\n| ----------- Hour (0 - 23)\n------------- Minute (0 - 59)\n```\n\nTo run every 15 minutes:\n\n```cron\n*/15 * * * * cflare-ddns\n```\n\n### CLI Reference\n\n```shell\nusage: cflare-ddns [-h] [-c CONFIG_FILE] [-i INTERVAL] [-v]\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --version         App version\n  -c CONFIG_FILE, --config CONFIG_FILE\n                        Path to your configuration file.\n                        Default paths:\n                          /etc/cflare-ddns.json,\n                          cflare-ddns.json\n  -i INTERVAL, --interval INTERVAL\n                        Number of seconds between each sync. This will make the program run\n                        forever.Hit Ctrl-C to stop.\n```\n\n## Docker\n\nExample on running on docker:\n\n```shell\ndocker run -e CF_DDNS_INTERVAL=900 -v $(pwd)/cflare-ddns.json:/etc/cflare-ddns.json --rm ianpogi5/cflare-ddns:latest\n```\n\nExample using `docker-compose.yml`:\n\n```yaml\nversion: \"3.9\"\nservices:\n  cflare-ddns:\n    image: ianpogi5/cflare-ddns:latest\n    container_name: cflare-ddns\n    environment:\n      - CF_DDNS_INTERVAL=900\n    volumes:\n      - /YOUR/PATH/TO/cflare-ddns.json:/etc/cflare-ddns.json\n    restart: unless-stopped\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Yet another Cloudflare DDNS",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/ianpogi5/cflare-ddns"
    },
    "split_keywords": [
        "cloudflare",
        "ddns",
        "dynamic",
        "dns"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "26d039eeaffd472dcb87438d513c05929085e371802740ade9dbd2f4b8dd1605",
                "md5": "32ef894a159d04e9747a78eefc6e8c94",
                "sha256": "bee83cfc4440c5a58d4153fa373c134794abf3973d85ccf8133c9e67c3488acb"
            },
            "downloads": -1,
            "filename": "cflare_ddns-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "32ef894a159d04e9747a78eefc6e8c94",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8406,
            "upload_time": "2023-12-17T01:38:50",
            "upload_time_iso_8601": "2023-12-17T01:38:50.188065Z",
            "url": "https://files.pythonhosted.org/packages/26/d0/39eeaffd472dcb87438d513c05929085e371802740ade9dbd2f4b8dd1605/cflare_ddns-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7cc765bcd14e800cc0c7e2c1e1b34cc450cf0a9760dfd007a26a0e1646102535",
                "md5": "09445de3be14210930b5a99e200c2cdb",
                "sha256": "ffb2df88048a28b9f1896e23eef40f36db323edbd72ae9fb6eb7080cd16a6fc6"
            },
            "downloads": -1,
            "filename": "cflare-ddns-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "09445de3be14210930b5a99e200c2cdb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7855,
            "upload_time": "2023-12-17T01:38:51",
            "upload_time_iso_8601": "2023-12-17T01:38:51.624458Z",
            "url": "https://files.pythonhosted.org/packages/7c/c7/65bcd14e800cc0c7e2c1e1b34cc450cf0a9760dfd007a26a0e1646102535/cflare-ddns-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-17 01:38:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ianpogi5",
    "github_project": "cflare-ddns",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "cflare-ddns"
}
        
Elapsed time: 0.17615s