{"id":18452387,"url":"https://github.com/tmzane/porkcron","last_synced_at":"2025-09-04T10:47:04.027Z","repository":{"id":132889750,"uuid":"523950077","full_name":"tmzane/porkcron","owner":"tmzane","description":"🔏 Automatically renew SSL certificate for your Porkbun domain","archived":false,"fork":false,"pushed_at":"2025-02-11T22:16:55.000Z","size":31,"stargazers_count":41,"open_issues_count":5,"forks_count":10,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-28T17:07:59.795Z","etag":null,"topics":["cron","docker","letsencrypt","nginx","porkbun","python","ssl","systemd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmzane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-08-12T04:04:06.000Z","updated_at":"2025-08-07T08:57:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"887feec4-5ce4-4a49-9f99-5d57eab0c501","html_url":"https://github.com/tmzane/porkcron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tmzane/porkcron","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmzane%2Fporkcron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmzane%2Fporkcron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmzane%2Fporkcron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmzane%2Fporkcron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmzane","download_url":"https://codeload.github.com/tmzane/porkcron/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmzane%2Fporkcron/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273595765,"owners_count":25134258,"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","status":"online","status_checked_at":"2025-09-04T02:00:08.968Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cron","docker","letsencrypt","nginx","porkbun","python","ssl","systemd"],"created_at":"2024-11-06T07:31:05.022Z","updated_at":"2025-09-04T10:47:03.970Z","avatar_url":"https://github.com/tmzane.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# porkcron\n\nAutomatically renew SSL certificate for your Porkbun domain.\n\n## 📌 About\n\n`porkcron` is a simple alternative to [certbot][1].\nIf you own a domain registered by [Porkbun][2], they offer you a [free SSL certificate][3] issued by [Let's Encrypt][4].\nSo instead of getting it from scratch yourself, you can periodically download the certificate using the [Porkbun API][5].\n`porkcron` is designed to automate this process.\nIt can be run as a [systemd timer][6] or in a Docker container.\n\n## 📦 Install\n\nFirst, you need to generate the API keys following [this guide][7].\nDo not forget to enable the API access for your domain!\n\nWhen you're ready, clone the repository somewhere on your server:\n\n```shell\ngit clone https://github.com/tmzane/porkcron\n```\n\nTake a look at the `.env.example` file.\nIt contains all the environment variables used by `porkcron`.\nRename it to `.env` and fill it with the values you got earlier.\n\n| Name             | Description                         | Required | Default                                |\n|------------------|-------------------------------------|:--------:|----------------------------------------|\n| DOMAIN           | your Porkbun domain(s)              | yes      | -                                      |\n| API_KEY          | your Porkbun API key                | yes      | -                                      |\n| SECRET_KEY       | your Porkbun API secret key         | yes      | -                                      |\n| API_URL          | the Porkbun API address             | no       | https://api.porkbun.com/api/json/v3    |\n| CERTIFICATE_PATH | the path to save the certificate to | no       | /etc/porkcron/{domain}/certificate.pem |\n| PRIVATE_KEY_PATH | the path to save the private key to | no       | /etc/porkcron/{domain}/private_key.pem |\n\nNote the `{domain}` placeholder in the paths.\nIt will be automatically replaced with your domain.\nYou can use the placeholder in non-default paths as well.\n\n`porkcron` can also work with multiple domains at once.\nYou can set `DOMAIN` to a comma-separated list of domains.\nIn this case, both `CERTIFICATE_PATH` and `PRIVATE_KEY_PATH` must contain the `{domain}` placeholder.\n\nOnce you have filled in all the values, you can proceed to choosing the installation method.\n\n### Using systemd\n\nRun the following commands:\n\n```shell\ncd systemd\nchmod +x install.sh\n./install.sh\n```\n\nThis will install the script in `/usr/local/bin` and enable the timer.\nThe first run will be triggered immediately, check the log to make sure it was successful:\n\n```shell\nsystemctl status porkcron.service\n```\n\n### Using Docker\n\nRun the following commands:\n\n```shell\ncd docker\ndocker compose up\n```\n\nThis will create the `porkcron` container and download the certificate bundle into the `ssl` volume.\n\n### Changing the run schedule\n\nBy default, the script is run once per week,\nwhich is plenty since the certificate is valid for 3 months.\nYou can change the schedule by modifying `systemd/porkcron.timer` (for systemd) or `docker/crontab` (for Docker).\n\n### Configuring a web server\n\nThis repository contains an example for the [nginx][8] web server,\nbut you can use `porkcron` with the one of your choice.\nSee [Mozilla's SSL config generator][9] for a quick start.\n\nFor nginx, see `nginx/nginx.conf` for a minimal SSL-ready config.\nYou should modify it for your needs.\n\nIf you're using systemd, copy the modified config to `/etc/nginx/conf.d` and reload nginx.\nThen uncomment the `ExecStartPost` line in `systemd/porkcron.service`.\n\nIf you're using Docker, just uncomment the `nginx` section in `docker/compose.yml`.\n\nFinally, reinstall `porkcron` to apply the changes and try hitting `https://your.domain`.\nThe rest is up to you, happy hacking!\n\n[1]: https://certbot.eff.org\n[2]: https://porkbun.com\n[3]: https://kb.porkbun.com/article/71-how-your-free-ssl-certificate-works\n[4]: https://letsencrypt.org\n[5]: https://porkbun.com/api/json/v3/documentation\n[6]: https://wiki.archlinux.org/title/systemd/Timers\n[7]: https://kb.porkbun.com/article/190-getting-started-with-the-porkbun-dns-api\n[8]: https://nginx.org\n[9]: https://ssl-config.mozilla.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmzane%2Fporkcron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmzane%2Fporkcron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmzane%2Fporkcron/lists"}