Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Latest commit

 

History

History
75 lines (49 loc) · 2.29 KB

README.md

File metadata and controls

75 lines (49 loc) · 2.29 KB

Ursa Full Node

Deploy and run an ursa node, with nginx proxy infront. Setup with cerbot and letencrypt. Certs are auto renewed.

Prerequisites

Requirements

  • Ubuntu 22.04 or later.
  • 8GB memory is recommended but 4GB should be enough for alpha.
  • A domain name.

Digital Ocean

  1. Create Droplet and set up the basic for a user to run.

  2. Point your domain to your machine

  3. Clone the repo and build with docker-compose

make compose-up 

# or

docker-compose -f docker/full-node/docker-compose.yml up

# if build kit isn't installed
COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose -f docker/full-node/docker-compose.yml up -d

# helper to rebuild the image
make compose-build
  1. Setup TLS.
  • Find and Replace all domain instances in docker/full-node/data/nginx/app.conf with your domain.

  • Generate Certificates for your domain and restart nginx

    cd docker/full-node
    
    EMAIL="[email protected]" DOMAINS="node.ursa.earth alt.node.ursa.earth" bash init-letsencrypt.sh
  • If you have problems during the setup, you can try installing certbot locally and then run sudo certbot certonly --standalone -d domain.com -d www.domain.com and then move cert and privkey to the correct place.

Test your endpoint

You can test locally by replacing <HOSTNAME> by localhost and <PORT> as 4069.

curl -X GET http://<HOSTNAME>:<PORT>/ping

For example:

curl -X GET http://localhost:4069/ping

For testing content retrieval, replace The <VALID-CID-HERE> with a valid CID (content identifier). The flag -o refers to output to a custom filename.

curl -X GET http://<HOSTNAME>:<PORT>/ursa/v0/<VALID-CID-HERE> -o <FILENAME>

Here is an example

curl -X GET http://localhost:4069/ursa/v0/bafybeifyjj2bjhtxmp235vlfeeiy7sz6rzyx3lervfk3ap2nyn4rggqgei -o my_file.car