Ursa, a decentralized content delivery network.
Note: Full nodes are intended to run behind a reverse proxy providing ssl and listening on 80/443. See # Run with Docker Compose for a preconfigured setup.
- make
- rust (
^1.65.0
) - build-essential
- libclang
- cmake
- protoc
Build and install the latest HEAD version:
make install
You can run the node with ursa
command. This will run the node with default parameters.
--config
A toml file containing relevant configurations.- Default value: empty.
--rpc
Allow rpc to be active or not.- Default value: true.
--rpc-port
Port used for JSON-RPC communication.- Default value: 4069.
rpc put
Put a CAR file into the local noderpc get
Get content for a cid from the local node, and save to path
The default ursa config is loaded from ~/.ursa/config.toml
, but can be overridden using the --config
flag.
[network_config]
mdns = false
relay_server = true
autonat = true
relay_client = true
bootstrapper = false
bootstrap_nodes = ["/ip4/127.0.0.1/tcp/6009"]
swarm_addrs = ["/ip4/0.0.0.0/tcp/6009", "/ip4/0.0.0.0/udp/4890/quic-v1"]
database_path = "~/.ursa/data/ursa_db"
keystore_path = "~/.ursa/keystore"
identity = "default"
[provider_config]
# Public IP address of the node
addresses = ["/ip4/127.0.0.1/tcp/4069"]
indexer_url = "https://dev.cid.contact"
database_path = "~/.ursa/data/index_provider_db"
[server_config]
port = 4069
addr = "0.0.0.0"
You can run the full node with some supporting infrastructure through docker-compose. This includes:
- Ursa Node
- Nginx reverse proxy
- Let's Encrypt ssl
- Prometheus Metrics
- Grafana Dashboard
- Docker (with Buildkit)
- Docker Compose
Make sure to edit nginx/app.conf with your node's domain name, and run init-letsencrypt.sh. Detailed instructions here
Build the node and fetch infra images:
make compose-build
Start up node and infra:
make compose-up
Shut down node and infra:
make compose-down
By default, the compose will bind-mount the host folder ~/.ursa/
to the node. Any configuration/keys/database files can be located and edited on the host machine at that path. Any changes requires the node to be restarted to take effect
To access the rpc you can do through the http JSON-RPC api. The endpoint to request is /rpc/v0
. The server can be accessible in port 4069
for local development and in port 80/443
through the reverse proxy (nginx at the moment).
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.