How to Run Nostr, Web3, and IPFS From a Single Home Server
π How to Run Nostr, Web3, and IPFS From a Single Home Server
Want to own your data and host your own network? Here’s how you can use one home server to run a Nostr relay, Web3 site, and IPFS node β without renting cloud infrastructure or relying on big tech.
π‘ What You’ll Be Hosting
On one self-controlled server (like a mini PC or Linux box), you’ll be running:
| Service | Purpose | Tech Stack |
|---|---|---|
| Web Server | Hosts your website or DApp frontend | NGINX or Caddy |
| Nostr Relay | Decentralized, censorship-resistant posts | nostr-rs-relay |
| IPFS Node | Decentralized content storage | go-ipfs |
| Web3 Domain | Point your .x domain to local content | Unstoppable Domains + IPFS |
π Your Connection: Use Dynamic DNS
Most home internet connections use a dynamic IP, which changes. To make your services available online:
- Register with a free Dynamic DNS provider like DuckDNS
- Set your router to forward ports:
80and443for web7447for Nostr4001for IPFS (optional)
Your server becomes accessible at:
https://yourdomain.duckdns.org
wss://yourdomain.duckdns.org/relay
π§ Server Setup Overview
Install Ubuntu Server or any Linux distro, and set up the services:
1. π₯οΈ Web Server (Caddy or NGINX)
Serve your main site and proxy to Nostr/IPFS:
Caddy Example:
yourdomain.duckdns.org {
root * /var/www/html
file_server
reverse_proxy /relay localhost:7447
reverse_proxy /ipfs/* localhost:8080
}
Caddy handles SSL automatically via Letβs Encrypt.
2. π IPFS Node
Install IPFS to host your site content:
curl -O https://dist.ipfs.io/go-ipfs/latest/go-ipfs.tar.gz
tar -xvzf go-ipfs.tar.gz
cd go-ipfs && sudo bash install.sh
ipfs init
ipfs daemon
Add your site:
ipfs add -r /var/www/html
Get the hash and point your .x domain to it on Unstoppable Domains.
3. β‘ Nostr Relay
Run a personal or public Nostr relay using nostr-rs-relay:
sudo apt install git curl build-essential
curl https://sh.rustup.rs -sSf | sh
git clone https://github.com/scsibug/nostr-rs-relay.git
cd nostr-rs-relay
cargo build --release
./target/release/nostr-rs-relay
You can also run it with Docker:
docker run -d \
--name nostr-relay \
-p 7447:7447 \
-v $HOME/nostr-data:/app/data \
ghcr.io/scsibug/nostr-rs-relay:latest
π§ Final Result
Once set up, youβll have:
- Your Web3 domain (like
floridalocal.xmr) pointing to IPFS-hosted content - A live Nostr relay at
wss://yourdomain.duckdns.org/relay - A full website or app served from your home IP, secured with HTTPS
π― Why Run It Yourself?
- π¬ Control your own data and identity
- π°οΈ Resist censorship
- π§± Host decentralized web apps or communities
- πΈ Eliminate monthly hosting fees
- π οΈ Learn and build real sovereign infrastructure
π§© Tools You’ll Use
- Caddy β HTTPS-ready web server
- IPFS β Decentralized file sharing
- Nostr β Decentralized communication protocol
- DuckDNS β Free dynamic IP service
- Unstoppable Domains β Web3 identity and domain
π οΈ Want Help?
Let me know if you want a starter config, script, or help integrating your own .x domain. This is how we build a free, resilient web β from the ground up.
