Deployment

How nostrfy is distributed, and a comparison of all supported deployment platforms.

One binary, several platforms

nostrfy ships pre-built binaries for x86_64 and aarch64 (GitHub release assets, checksum-verified by install.sh), a container image that downloads those binaries (no compilation needed), and deployment guides for the major platforms.

Platforms

PlatformTypeGuide
Fly.ioManaged platform (containers, volumes, TLS)fly.md
Digital OceanDroplet (VM) or App Platformdeploy/digitalocean.md
AWSEC2 (VM), Lightsail or ECSdeploy/aws.md
Google CloudCompute Engine (VM) or Cloud Rundeploy/gcp.md
AzureVM or Container Appsdeploy/azure.md
Any VPSplain Ubuntu/Debian serverdeploy/vps.md

The common pattern for VMs

All the VM guides (Digital Ocean, AWS EC2, GCP, Azure, any VPS) follow the same pattern:

sh
# 1. Install the latest release binary (no sudo needed for the install itself)
curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh

# 2. Fetch the config template and edit it (no repository clone needed)
sudo mkdir -p /etc/nostrfy
sudo curl -fsSL -o /etc/nostrfy/nostrfy.toml \
  https://raw.githubusercontent.com/iqbqioza/nostrfy/main/deploy/nostrfy.toml
sudo nano /etc/nostrfy/nostrfy.toml                   # set name, public_url, private_key

# 3. Fetch the systemd unit and start the service
sudo curl -fsSL -o /etc/systemd/system/nostrfy.service \
  https://raw.githubusercontent.com/iqbqioza/nostrfy/main/deploy/nostrfy.service
sudo systemctl daemon-reload
sudo systemctl enable --now nostrfy

# 4. Open the port (usually 8080) in the provider's firewall and verify
curl http://localhost:8080/health

Before going live

Every deployment uses the same nostrfy.toml options. Before going live, set at least:

toml
[relay]
name = "My Relay"
public_url = "wss://relay.example.com"   # required for NIP-42 AUTH / NIP-62 / NIP-98
private_key = ""                          # run 'nostrfy genkey' and paste the key

VM or container?

  • VM (systemd): simplest, cheapest, full control. Recommended for most relay deployments.
  • Container: use the repository Dockerfile (downloads the release binary at build time) on Fly.io, Digital Ocean App Platform, AWS ECS, GCP Cloud Run or Azure Container Apps. Persistent storage is required for the LMDB data (/data).

Blossom media host

If blossom.host is set, point that hostname at the same port in the TLS proxy too (see the VPS guide for nginx/Caddy blocks).

TLS is terminated by your proxy or the provider
The relay itself serves plain WebSocket on 8080 and honors X-Forwarded-Proto.