OVH
This page connects piqueld to the OVHcloud API, so that it can prove control of your domains hosted at OVH. piqueld then gets DNS-01 certificates for your private and wildcard routes, and can manage their DNS records.
Before you start
- Your domain’s DNS zone is hosted at OVHcloud.
- You can create API keys for the OVHcloud account that holds the zone.
Create the API keys
piqueld signs its requests with three values: an application key, an application secret, and a consumer key. You create all three at once on OVHcloud’s token creation page; OVHcloud’s first steps with the API explains how.
When the page asks for the rights, add these:
| Method | Path | piqueld uses it to |
|---|---|---|
GET | /domain/zone | list your zones |
POST | /domain/zone/* | create records, and apply the zone’s changes |
DELETE | /domain/zone/* | delete records |
If piqueld manages your routes’ DNS records, add these too:
| Method | Path | piqueld uses it to |
|---|---|---|
GET | /domain/zone/* | read records |
PUT | /domain/zone/* | update records |
piqueld uses the keys for as long as the daemon runs. Choose a validity that doesn’t expire, or replace the keys before they do.
Set it up
-
Save each value in its own file that only root can read, such as agenix or sops-nix secrets.
-
Add the provider to your configuration.
endpointis the region of your OVHcloud account:services.piqueld.settings.dns.providers = [ { kind = "ovh"; endpoint = "ovh-eu"; application_key_file = "/run/secrets/ovh-application-key"; application_secret_file = "/run/secrets/ovh-application-secret"; consumer_key_file = "/run/secrets/ovh-consumer-key"; # Only to let piqueld manage routes' DNS records. manage_records = true; } ];endpointAccount region API ovh-euEurope https://eu.api.ovh.com/1.0ovh-caCanada https://ca.api.ovh.com/1.0ovh-usUnited States https://api.us.ovhcloud.com/1.0In
/etc/piqueld/config.toml, pass each file to the service withLoadCredential=, as for the tailnet auth key, and refer to it by name:[[dns.providers]] kind = "ovh" endpoint = "ovh-eu" application_key_file = "ovh-application-key" application_secret_file = "ovh-application-secret" consumer_key_file = "ovh-consumer-key" manage_records = true[[dns.providers]]lists every provider setting. -
Restart the daemon, which reads the files only when it starts. On NixOS, rebuild the system. Elsewhere, reload the unit you edited first:
sudo systemctl daemon-reload sudo systemctl restart piqueld
Check that it works
Ask piqueld to list your zones now. In the dashboard, select Check DNS
providers in System status: the DNS provider row shows the result.
On the host, with piquelctl:
$ sudo piquelctl dns refresh
DNS provider: ovh (healthy, manages route records): example.com
It lists every zone the keys can see. piqueld also lists them when it starts,
and every hour, so a zone you add later is found within the hour. Checking
needs the system:operate permission,
and seeing the result system:read.
How piqueld uses OVH
- OVHcloud applies record changes only when the zone is refreshed. piqueld refreshes the zone after each change.
- Changes can take several minutes to reach OVHcloud’s nameservers. Before it
asks for a certificate, piqueld waits up to 10 minutes for its
_acme-challengerecord to appear on each of them. - OVHcloud can’t proxy records like Cloudflare does, so a Cloudflare Tunnel can’t serve routes in an OVH zone.
Troubleshooting
dns refreshreportsunhealthywithZone discovery failed. The message ends with OVHcloud’s answer. AnHTTP 403means the keys are wrong, expired or missing a right from the tables above. piqueld keeps using the zones it found before, and tries again within a minute.- You replaced a key file, and nothing changed. piqueld only reads the files when it starts. Restart the daemon.
- A certificate fails with
was not visible on every authoritative nameserver. The zone’s change didn’t propagate within 10 minutes. piqueld tries again later; see renewal. - A tunnel route’s DNS records stay
pending. Tunnel routes need a proxied CNAME record, which only a Cloudflare zone can hold. Move the zone to Cloudflare, or serve the route on ports 80 and 443.