Scripts to help deploy a ceramic node with dataverse backend.
Clone the repo
git clone https://github.com/dataverse-os/dapp-backend
cd dapp-backend
To generate and fill the private key and admin DID into .private-key.env
and daemon.config.json
automatically:
under dapp-backend/
docker run -it --rm \
-v "$PWD/.private-key.env:/data/.private-key.env" \
-v "$PWD/daemon.config.json:/data/daemon.config.json" \
ghcr.io/dataverse-os/dapp-backend-prerun:latest
Example Result
✔ Generating random private key... Done!
8053f2d22cb3da5f84b6f079eb40cdc49958a7da269de3610e63e8b8078f1448
✔ Creating DID... Done!
did:key:z6MkiM1beKfKoNAS5cqHTFMrWAqqHkdb7meMqMBurDDgnTRn
Keep your private key safe. You will need it to use the ceramic node.
copy the config to ceramic config folder
under dapp-backend/
mkdir ~/.ceramic
cp ./daemon.config.json ~/.ceramic/daemon.config.json
docker-compose up -d
This command will start the ceramic node on port 7007
and the dapp-backend server on 8080
. You can change the port to use by changing the port in the docker-compose.yml file.
To let your app connect to the ceramic node safely, you need to configure SSL certificate. You can use Let's Encrypt to get a free SSL certificate.
view details in the create-dataverse-app docs.
curl --request POST \
--url https://cas.3boxlabs.com/api/v0/auth/verification \
--header 'Content-Type: application/json' \
--data '{"email": "youremailaddress"}'
Then check your email and copy the one time passcode enclosed within. It will be a string of letters and numbers similar to this: 2451cc10-5a39-494d-b8eb-1971ecd813de.
curl --request POST \
--url https://cas.3boxlabs.com/api/v0/auth/did \
--header 'Content-Type: application/json' \
--data '{
"email": "youremailaddress",
"otp": "youronetimepasscode",
"dids": [
"yourdid"
]
}'
Contributions are always welcome! Open a PR or an issue!