Skip to content

About

Alerts within seconds when Hetzner Cloud reports a sold-out server type orderable again. Free, no account.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ServerSnag

ServerSnag alerts you within seconds when Hetzner Cloud reports a sold-out server type orderable again in a location you watch. It is free, needs no account, and delivers to Telegram, browser push, email, ntfy, Discord, Slack or a webhook.

This repository is the source of serversnag.com.

How it works

One Go binary polls the Hetzner Cloud API (GET /v1/server_types) every few seconds with a read-only token, compares each server type and location with its last known state, and sends an alert when a pair turns from sold out to orderable. A static Vue site shows the live board and sets up alerts.

  • No account. Every alert set is controlled by a manage link; every message carries a stop link.
  • Calm by design. A pair that flickers within 60 seconds counts as one comeback, each destination gets at most 6 alerts per pair an hour, and a response that changes more than 10 pairs at once is confirmed by the next poll before anyone is alerted.
  • An indicator, not a guarantee. Hetzner's availability flag can be ahead of or behind what an order accepts. An alert means "worth trying now".

Agents

An anonymous MCP server runs at https://mcp.serversnag.com/mcp (Streamable HTTP, no key, no account). Tools: get_availability, get_server_type, list_providers and prepare_alert.

Agents prepare, you confirm. prepare_alert creates nothing: it returns a link that opens serversnag.com with the alert form filled in. You review where alerts go and press "Turn on alerts". The manage link goes to you, never to the agent. Alerts through prepare_alert are Hetzner-only for now; the read tools list the whole board.

It is off unless MCP_BASE_URL is set (the MCP host, such as https://mcp.example.com). MCP_RATE_PER_MINUTE (default 600) limits requests per client address. Self-hosters: leave MCP_BASE_URL unset to keep it off. If you turn it on, your proxy must preserve the Host header and set CF-Connecting-IP.

What is stored

The schema is in internal/storage/migrations: the destinations you add and what they watch, the server type catalogue, the last known state of each server type and location, availability events, delivery records, and counters for the spam check and the daily email cap. There are no user accounts and no passwords. Deleting your alerts from the manage link removes them at once.

Run it locally

You need Go, bun and just; nix develop provides all three and the linters.

just deps    # Go modules and web dependencies
just check   # lint and test the Go code
bun run test # test the web code

Start the API with your own Hetzner token, then the site:

HCLOUD_TOKEN=... SITE_URL=http://localhost:5173 API_BASE_URL=http://localhost:8080 \
  DATABASE_PATH=./serversnag.db ALTCHA_HMAC_KEY=$(openssl rand -hex 32) \
  TOKEN_HMAC_KEY=$(openssl rand -hex 32) go run . server
bun start

Configuration

Everything is an environment variable. contrib/systemd/serversnag.env.example lists every one with its meaning and default. Telegram, email and browser push turn on when their settings are present; ntfy, Discord, Slack and webhooks need none.

PROVIDERS lists the providers an instance tracks: hetzner (the default) and ovh. The API answers for Hetzner unless a request names another with ?provider=, and GET /api/v1/providers lists the ones an instance tracks.

OVHcloud

PROVIDERS=hetzner,ovh also tracks OVHcloud's Eco dedicated servers: the Kimsufi, So you Start and Rise ranges (OVH_RANGES). It is off by default and needs no account: it reads two public endpoints of OVH's API.

  • Available means the plan's default configuration, the one its advertised price buys, can be delivered in that datacenter within 24 hours. A dearer configuration in stock does not count. When OVH states a lead time, alerts and the API pass it on.
  • The price is per month for the default configuration, in euros, including Irish VAT (23%): the catalogue read is the one of OVH's Irish subsidiary. OVH also charges a one-off setup fee, which is not shown.
  • Polling is once a minute by default (OVH_POLL_INTERVAL_SECONDS). Each poll downloads OVH's whole availability list, about 5 MB before compression, and the catalogue (about 12 MB) is read again every 12 hours. OVH documents no rate limit for these endpoints.
  • The site does not show OVH yet. Its board is at /api/v1/availability?provider=ovh, and an alert is set up through the API with "provider": "ovh" on the watch. Alerts name a plan by its code (24sk102) and link to its page on OVH's site.
  • If you alert on stale polls, group by the provider label of serversnag_last_poll_success_timestamp_seconds and give each provider a threshold above its own interval. A rule that takes the freshest poll of any provider would let a healthy OVH poller hide a dead Hetzner one.

Self-hosting

Self-hosting is possible but not supported. If you run your own:

  • Use a read-only API token from your own Hetzner Cloud project. The API allows 3,600 requests an hour per project, so keep POLL_INTERVAL_SECONDS at 2 or higher and do not share a token between instances.
  • Set SITE_URL and API_BASE_URL, and LEGAL_NAME and POSTAL_ADDRESS if you send email: they are printed in every message. None of them has a default.
  • Put your own domain, API address and operator details in shared/site.ts and the connect-src of public/_headers, then build the site with bun run build. The output in dist/ is static. public/robots.txt, public/llms.txt, public/.well-known/ and the sitemap origin in vite.config.ts describe serversnag.com: edit or delete them.
  • Run the binary behind a TLS-terminating proxy that forwards /api/ only, plus /mcp on the MCP host. Rate limits count per client address, which the API reads from the CF-Connecting-IP header. Behind Cloudflare, accept requests from Cloudflare only. Behind anything else, have your proxy set that header to the real client address and never pass one a client sent. contrib/systemd/serversnag.service is a hardened unit to start from.
  • If you change the code and offer it to others over a network, the license requires you to offer them your source.

Verify a release

Release binaries are built by this repository's release workflow and signed without a long-lived key. Check a download before you run it:

gh release download v1.2.3 --repo developer-friendly/serversnag \
  --pattern 'checksums.txt*' --pattern '*_linux_amd64'
cosign verify-blob --bundle checksums.txt.sigstore.json \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  --certificate-identity https://github.com/developer-friendly/serversnag/.github/workflows/release-binaries.yml@refs/heads/main \
  --certificate-github-workflow-repository developer-friendly/serversnag \
  checksums.txt
sha256sum --ignore-missing -c checksums.txt

Each release also carries an SPDX SBOM per binary and a build-provenance attestation (gh attestation verify <file> --repo developer-friendly/serversnag).

Contributing and security

Bug reports and fixes are welcome: see CONTRIBUTING.md. Please report vulnerabilities privately, as SECURITY.md describes.

License

Copyright © 2026 Developer Friendly OÜ.

ServerSnag is free software under the GNU Affero General Public License, version 3. The bundled IBM Plex fonts are under the SIL Open Font License.

About

Alerts within seconds when Hetzner Cloud reports a sold-out server type orderable again. Free, no account.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages