Download your NameOcean SSL certificate
NameOcean issues free wildcard certificates for domains on its nameservers and renews them
automatically. The certificate zips are private: download them with an API key that has the
ssl:read scope (Dashboard → API).
Put the key in API_KEY next to these scripts (or in NAMEOCEAN_API_KEY), then:
$> /path/to/ssl-downloader/download.sh https://nameocean.net/api/v1/ssl/example.com/certificate.zip
The files land in /path/to/ssl-downloader/example.com/ (fullchain.pem, privkey.pem, ...).
Several certificates
Write one URL per line into SSL_URLS next to the scripts, then run:
$> /path/to/ssl-downloader/download_multiple.sh
--reload-nginx reloads nginx afterwards. Run it from cron (certificates are renewed 28 days
before they expire), for example weekly.
NameOcean's own servers (Proxmox hosts, neo, neo2, dns4, backup1) use
https://nameocean.net/api/v2/certs/zip/<domain>.zip without a key: the site knows them by
their address.
Dependencies
wget and unzip (Debian/Ubuntu: apt install wget unzip).
License
MIT, see LICENSE.