Bootnode Hosting
A Backdit Bootstrap node (BACKDIT_NODE_PROFILE=bootstrap, BACKDIT_OFFERED_STORAGE_GB=0) provides Kademlia DHT routing, Identify, AutoNAT reachability probing, and signaling-only libp2p Circuit Relay v2 (256 KiB / 120s per circuit) while refusing all incoming shard and capsule placements. Zero user backup data touches a pure bootnode’s disk, and the embedded Web UI is disabled automatically.
1. Network, QUIC Tuning & Firewall Guards
Section titled “1. Network, QUIC Tuning & Firewall Guards”- Expose P2P port
9010TCP and UDP publicly (IPv4 and IPv6). - Never expose port
9011(BACKDIT_API_PORT) to the internet. KeepBACKDIT_API_BIND=127.0.0.1and inspect status viassh -L 9011:127.0.0.1:9011 user@host.
Tune UDP socket buffers for Quinn QUIC (/etc/sysctl.d/99-backdit-quic.conf):
sudo tee /etc/sysctl.d/99-backdit-quic.conf << 'EOF'net.core.rmem_max = 2500000net.core.wmem_max = 2500000net.core.somaxconn = 4096net.ipv4.tcp_max_syn_backlog = 4096net.ipv4.ip_local_port_range = 10240 65535EOFsudo sysctl --systemIn ip6tables, always apply /64 source masks (--connlimit-mask 64, --hashlimit-srcmask 64) so rotating RFC 8981 SLAAC IPv6 addresses cannot bypass rate limits. Inspect sudo iptables -L INPUT --line-numbers and sudo ip6tables -L INPUT --line-numbers first so your ACCEPT / flood rules sit above any distro default REJECT rule:
sudo apt update && sudo apt install -y ufw curl jq iptables-persistent netfilter-persistentsudo sed -i 's/^IPV6=.*/IPV6=yes/' /etc/default/ufwsudo ufw allow 22/tcp comment 'SSH'sudo ufw allow 9010/tcp comment 'Backdit Bootstrap P2P TCP'sudo ufw allow 9010/udp comment 'Backdit Bootstrap P2P QUIC'
# IPv4 guards (adjust rule index 5 to match INPUT --line-numbers)sudo iptables -I INPUT 5 -p tcp --dport 9010 -j ACCEPTsudo iptables -I INPUT 5 -p udp --dport 9010 -j ACCEPTsudo iptables -I INPUT 5 -p tcp --dport 9010 -m connlimit --connlimit-above 16 --connlimit-mask 32 -j REJECT --reject-with tcp-resetsudo iptables -I INPUT 5 -p udp --dport 9010 -m conntrack --ctstate NEW -m hashlimit --hashlimit-above 30/sec --hashlimit-burst 60 --hashlimit-mode srcip --hashlimit-name backdit_boot_quic_new --hashlimit-htable-expire 60000 -j DROP
# IPv6 /64 prefix guardssudo ip6tables -I INPUT 5 -p tcp --dport 9010 -j ACCEPTsudo ip6tables -I INPUT 5 -p udp --dport 9010 -j ACCEPTsudo ip6tables -I INPUT 5 -p tcp --dport 9010 -m connlimit --connlimit-above 16 --connlimit-mask 64 -j REJECT --reject-with tcp-resetsudo ip6tables -I INPUT 5 -p udp --dport 9010 -m conntrack --ctstate NEW -m hashlimit --hashlimit-above 30/sec --hashlimit-burst 60 --hashlimit-mode srcip --hashlimit-srcmask 64 --hashlimit-name backdit_boot6_quic_new --hashlimit-htable-expire 60000 -j DROP
sudo netfilter-persistent savesudo ufw --force enable2. Running via systemd or Docker
Section titled “2. Running via systemd or Docker”Option A: systemd Native Binary
Section titled “Option A: systemd Native Binary”sudo mkdir -p /opt/backdit/data /opt/backdit/chunksexport BACKDIT_CONFIG_DIR=/opt/backdit/dataexport BACKDIT_DATA_DIR=/opt/backdit/dataexport BACKDIT_NODE_PROFILE=bootstrapexport BACKDIT_OFFERED_STORAGE_GB=0
sudo -E /opt/backdit/bin/backdit init --non-interactive --accept-recovery-words-risk \ --data-dir /opt/backdit/data \ --chunks-dir /opt/backdit/chunks \ --quota-gb 0 \ --port 9010 \ --print-mnemonic > /opt/backdit/mnemonic.txtsudo chmod 600 /opt/backdit/mnemonic.txtCreate /etc/systemd/system/backdit-bootstrap.service with BACKDIT_NODE_PROFILE=bootstrap, BACKDIT_OFFERED_STORAGE_GB=0, BACKDIT_ENABLE_UPNP=false, BACKDIT_ENABLE_RELAY_SERVER=true, BACKDIT_EXTERNAL_ADDR=/dns/boot1.example.com/tcp/9010,/dns/boot1.example.com/udp/9010/quic-v1, optional BACKDIT_MONTHLY_TRANSFER_CAP_GIB=180, and ExecStart=/opt/backdit/bin/backdit daemon.
Option B: Docker Compose
Section titled “Option B: Docker Compose”In docker-compose.yml, uncomment:
BACKDIT_NODE_PROFILE: "bootstrap"BACKDIT_OFFERED_STORAGE_GB: "0"BACKDIT_EXTERNAL_ADDR: "/dns/boot1.example.com/tcp/9010,/dns/boot1.example.com/udp/9010/quic-v1"BACKDIT_MONTHLY_TRANSFER_CAP_GIB: "180"3. Identity Backup, DNS Migration & Monitoring
Section titled “3. Identity Backup, DNS Migration & Monitoring”- Back up
identity.bundleandconfig.tomloffline immediately afterinitso migrating to a new VPS keeps the exact same<PeerId>. - Publish dual-stack DNS (
300sTTL): PointAandAAAArecords forboot1.example.comat the VM and advertise/dns/boot1.example.com/tcp/9010/p2p/<PEER_ID>and/dns/boot1.example.com/udp/9010/quic-v1/p2p/<PEER_ID>. Existing nodes bridge brief bootnode restarts via their64-entry reliable peer cache. - Health & Prometheus:
GET http://127.0.0.1:9011/healthzreturns{"profile":"bootstrap","status":"ok","version":"0.1.0"};/metrics/prometheusexportsbackdit_up,backdit_connected_peers,backdit_connections_in,backdit_connections_out,backdit_peer_upload_bytes_total, andbackdit_peer_download_bytes_total.
4. VPS / Free-Tier Caveats
Section titled “4. VPS / Free-Tier Caveats”- Prepaid dual-stack budget VPS hosts: Unmetered or hard-capped bandwidth plans avoid surprise egress charges.
- Oracle Cloud Always Free (
VM.Standard.A1.Flex): Up to4ARM64 OCPUs,24 GBRAM,200 GBdisk, and10 TB/mofree egress with/56IPv6. Upgrading to PAYG while staying strictly inside Always Free limits prevents idle reclamation ($1OCI alert recommended), and you must open9010TCP/UDP in both VCN Security Lists and hostiptables/ip6tables. - Google Cloud (
e2-microAlways Free): Requires30 GB pd-standard,StandardNetwork Tier (200 GiB/mofree egress), and hardBACKDIT_MONTHLY_TRANSFER_CAP_GIB=180+ GCP budget alerts because GCP does not auto-stop at200 GiB.