Deploy and run an ursa node, with nginx proxy infront. Setup with cerbot and letencrypt. Certs are auto renewed.
- Install Docker
Ubuntu 22.04 or later.
8GB memory is recommended but 4GB should be enough for alpha.
A domain name.
-
Create Droplet and set up the basic for a user to run.
- Setup Initial server setup
- install docker
- Setup buildkit
-
Point your domain to your machine
-
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
- 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 runsudo certbot certonly --standalone -d domain.com -d www.domain.com
and then move cert and privkey to the correct place.
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