Skip to content
/ ursa Public
forked from fleek-network/ursa

Ursa, a decentralized content delivery network that is censorship-resistant and trustless without compromise on throughput and latency

License

Notifications You must be signed in to change notification settings

getter34/ursa

 
 

Repository files navigation

Ursa

website  discord  twitter  rust-ci  docker-build 

Ursa, a decentralized content delivery network.

Run a node

Run with cli

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.

Dependencies

  • make
  • rust (^1.65.0)
  • build-essential
  • libclang
  • cmake
  • protoc

Instructions

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.

CLI Flags

  • --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.

CLI Subcommands

  • rpc put Put a CAR file into the local node
  • rpc get Get content for a cid from the local node, and save to path

Configuration

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"

Run with Docker Compose

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

Dependencies

  • Docker (with Buildkit)
  • Docker Compose

Instructions

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

Configuration

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

RPC & HTTP

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).

Contributing

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.

License

MIT APACHE 2.0

About

Ursa, a decentralized content delivery network that is censorship-resistant and trustless without compromise on throughput and latency

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 89.1%
  • HCL 7.3%
  • TypeScript 0.9%
  • Shell 0.9%
  • Dockerfile 0.9%
  • JavaScript 0.5%
  • Makefile 0.4%