-
Notifications
You must be signed in to change notification settings - Fork 0
Deployment Guide
Deploying RootSpace to production is streamlined via our official multi-stage Docker images. This guide covers the standard deployment architecture for a solitary node or a robust cloud-managed cluster.
The official Dockerfile builds both the Rust Core and the Node Dashboard into a single, cohesive image based on Debian Bookworm.
docker build -t rootspace/node:latest .RootSpace requires specific port mappings for the P2P swarm and the REST API.
docker run -d \
--name rootspace-node \
-p 8080:8080 \ # Node.js Dashboard & REST API
-p 4001:4001 \ # libp2p TCP Swarm
-p 4001:4001/udp \ # libp2p QUIC Swarm
-v rootspace-data:/data \
rootspace/node:latestNote: The -v rootspace-data:/data mount is critical for persisting the SQLite database and the node's cryptographic identity.
If you are deploying RootSpace on a home network or behind a strict firewall, ensure that port 4001 (TCP/UDP) is forwarded to your machine. Without this, your node will only be able to make outbound connections and cannot act as a full mesh peer.
| Variable | Default | Description |
|---|---|---|
ROOTSPACE_ENV |
production |
Set to development for verbose logging. |
API_PORT |
8080 |
The port the Node.js API runs on. |
SWARM_PORT |
4001 |
The default libp2p port. |
DATA_DIR |
/data |
Where SQLite and keypairs are saved. |
- Do not expose the API port (8080) to the public internet unless it is placed behind a reverse proxy (like Nginx) with SSL/TLS termination and properly authenticated.
-
Keep base images updated: The
rust:bookwormbase image receives frequent security patches. Rebuild your container regularly.