{"id":48448592,"url":"https://github.com/chatmail/hetzner-relay","last_synced_at":"2026-04-06T19:02:49.308Z","repository":{"id":343471568,"uuid":"1166762016","full_name":"chatmail/hetzner-relay","owner":"chatmail","description":"A script to get a VPS from hetzner and deploy a chatmail relay on it.","archived":false,"fork":false,"pushed_at":"2026-03-10T13:12:50.000Z","size":85,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-10T19:54:26.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/chatmail.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"chatmail"}},"created_at":"2026-02-25T15:24:09.000Z","updated_at":"2026-03-10T13:12:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chatmail/hetzner-relay","commit_stats":null,"previous_names":["chatmail/hetzner-relay"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/chatmail/hetzner-relay","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatmail%2Fhetzner-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatmail%2Fhetzner-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatmail%2Fhetzner-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatmail%2Fhetzner-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chatmail","download_url":"https://codeload.github.com/chatmail/hetzner-relay/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chatmail%2Fhetzner-relay/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31485516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-06T19:02:37.359Z","updated_at":"2026-04-06T19:02:49.301Z","avatar_url":"https://github.com/chatmail.png","language":"Python","funding_links":["https://opencollective.com/chatmail"],"categories":[],"sub_categories":[],"readme":"# hetzner-relay\n\nThis script can be used to allocate a fresh VPS from a hetzner project,\ndeploy a local checkout of the https://github.com/chatmail/relay/ repository to it,\ntest it with the appropriate DNS settings,\nand rebuild it\nso it can be reused for another deployment.\n\n## Getting Started\n\n```\ngit clone https://github.com/chatmail/relay\ngit clone https://github.com/chatmail/hetzner-relay\ncd hetzner-relay\nuv pip install -e .\nexport HETZNER_API_TOKEN=\u003ctoken\u003e\nuv run hetzner-relay ../relay --test --rebuild\n```\n\n### Usage\n\nThe script has 5 sections. Four of them, you have enable by CLI flags:\n\n* First, it will allocate a VPS from a Hetzner project.\n* Then, if `--deploy` is passed, it will deploy chatmail/relay to the VPS (implied by `--dns` and `--test`)\n* Then, if `--dns` is passed, it will deploy the DNS records to a name server\n* Then, if `--test` is passed, it will run the chatmail/relay tests\n* Then, if `--rebuild` is passed, it will rebuild the VPS so others can use it.\n\n### Pre-Necessities\n\n#### Hetzner Console Project with ready VPS\n\nTo run this script,\nyou need access to a Hetzner Console Project\nwith at least one pre-ordered Virtual Private Server (VPS).\n\nA usable VPS in the project MUST:\n- have a public IPv4 address,\n- have an A record with a domain name pointed to it,\n- have a CNAME record for `www` pointed to it,\n- have a CNAME record for `mta-sts` pointed to it,\n- be named after its domain name.\n\nEither pass the server's name to the script\nwith the `--vps` flag,\nor give it a `state:ready` label,\nso the script can use it.\n\n#### Hetzner API Token\n\nTo obtain a Hetzner API Token,\ngo to the Hetzner Console Project's \"Security \u003e API tokens\" settings\n(e.g. \u003chttps://console.hetzner.com/projects/2718696/security/tokens\u003e),\nand generate a new one.\n\nYou can pass it via\n`HETZNER_API_TOKEN` environment variable\nor the `--hetzner-api-token` flag.\n\n#### SSH Access\n\nFor `--deploy`, `--test`, and `--dns`,\nyour computer needs root SSH access to the VPS.\nYou can tell the script the path to the key with `-i PATH`.\n\nIf you have access to delta's pass repository,\nyou can find an SSH key at\n`pass delta/staging.testrun.org/github-actions/STAGING_SSH_KEY`.\n\nHetzner automatically rebuilds a VPS\nwith the SSH keys that were selected during the purchase.\n\n#### DNS Server\n\nFor deploying DNS records dynamically during the test with `--dns`,\nyou can pass a DNS server.\nIt needs to provide root access with the same SSH key as the VPS itself.\n\nIf you only pass `--dns` the script will try to use `ns.testrun.org`.\n\n### Caching ACME \u0026 DKIM state\n\nWe try to cache ACME \u0026 DKIM state between runs:\n1. to avoid running into [Let's Encrypt Rate Limits](https://letsencrypt.org/docs/rate-limits/),\n2. and to avoid flaky tests in case DKIM DNS records don't propagate quickly enough.\n\nIf `--dns` is supplied,\nthe script will try to use it as a cache.\nOtherwise it will cache the state locally.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchatmail%2Fhetzner-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchatmail%2Fhetzner-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchatmail%2Fhetzner-relay/lists"}