Digital Ocean
Deploy nostrfy on a Digital Ocean Droplet or App Platform.
Two options: a Droplet (VM, simplest) or the App Platform (containers).
Option 1: Droplet (recommended)
- Create a Droplet: Ubuntu 24.04 LTS, any size (1 GB RAM is enough to start). A droplet in a region close to your users lowers latency.
- SSH in and follow the generic VPS guide:
sh
ssh root@<droplet-ip>
curl -fsSL https://raw.githubusercontent.com/iqbqioza/nostrfy/main/install.sh | sh
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
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- Open the port in the Droplet firewall (the Digital Ocean Cloud Firewall is recommended): allow inbound TCP
8080(and443if you add TLS). - Verify:
sh
curl http://<droplet-ip>:8080/health- Add TLS (
wss://) with certbot + nginx, or Digital Ocean's managed load balancer with a certificate — then setrelay.public_url = "wss://relay.example.com"and restart.
Option 2: App Platform (container)
The App Platform builds from the repository Dockerfile (which downloads the pre-built
release binary):
- Connect your GitHub repo and create an app from it.
- Port: set the HTTP port to
8080(the relay listens there). - Persistent disk: mount a volume at
/data(LMDB data lives there — without it, data is lost on every deploy). - Env: the
deploy/nostrfy.container.tomlbaked into the image can be replaced by mounting your own config at/etc/nostrfy/nostrfy.toml(create a fork that copies it, or use a DockerfileCOPYin your own repo). - TLS: App Platform provides
https://automatically for the app domain — setrelay.public_urlaccordingly.
Both options
- Updates: re-run
install.sh+systemctl restart nostrfy(Droplet), or push to the connected repo (App Platform). - All configuration is documented in the configuration reference.