Self-hosted proxy
Install zapads-proxy
The one-line installer downloads the latest zapads-proxy release (manifest on this site, binaries on Vercel Blob), verifies SHA256, and writes ~/.zapads-proxy/config.yaml. If you prefer not to pipe a script from the web, follow the manual steps below. The same host serves the installer script at GET /install (text/x-shellscript) — opening that URL in a browser may download the file instead of showing HTML.
1 Prerequisites
- • macOS or Linux on amd64 or arm64
- •
python3andcurlavailable on your PATH - • A ZapAds provider API key, your service's slug (the
service_idfrom the dashboard), your backend base URL, and either a Blink API key or LNbits URL + admin key (setlnbitsas the second arg to the installer, orZAPADS_INSTALL_LIGHTNING_BACKEND=lnbits) - • Your project's log-invocation URL (Supabase Edge Function), unless your host bakes
ZAPADS_LOG_INVOCATION_URLinto the install script
2 Download a release binary
Fetch the current release manifest from
/api/v1/releases/proxy/latest. It returns JSON with a per-{os,arch} entry containing a signed.tar.gzURL and itssha256. Download the tarball, verify the digest, extractzapads-proxy, and install it to~/.local/bin(or another directory on your PATH). Thecurl … | bashinstaller above does exactly this.3 Configuration
Create
~/.zapads-proxy/config.yaml. Useapps/proxy/testdata/config.yamlin this repo as a reference: setzapads.api_key,zapads.log_invocation_url,zapads.l402_root_secret(at least 32 characters),lightning(Blink), and aservicesentry whosenamematches your dashboardservice_idand whosebackendis your API origin.4 Run and verify
shellzapads-proxy --config ~/.zapads-proxy/config.yaml curl -fsS http://127.0.0.1:8081/.zapads/health
Automated installer (optional)
From a service in the dashboard you can copy a curl command that downloads the script from this site. Replace YOUR_SERVICE_ID with your slug. The second argument (optional) is blink (default) or lnbits for self-hosted or FakeWallet testing:
curl -fsSL https://zap-ads-web.vercel.app/install | bash -s -- YOUR_SERVICE_ID curl -fsSL https://zap-ads-web.vercel.app/install | bash -s -- YOUR_SERVICE_ID lnbits ZAPADS_INSTALL_LIGHTNING_BACKEND=lnbits curl -fsSL https://zap-ads-web.vercel.app/install | bash -s -- YOUR_SERVICE_ID