Ocean Nodes run everything you need in the Ocean stack, they replace three previous components: Provider, Aquarius and subgraph.
This is a minimal guide to quickly start and run an Ocean Node. See the docs directory for more detailed information on Ocean Nodes and how to customise your setup.
Note: this repository is currently excluded from all bug bounty programs.
We recommend the following minimum requirements, although you may be be able to run a node with less (depending on your configuration).
This readme is the recommended way to host a node and be eligible for incentives. The other options are more recommended towards developers that want to tinker.
Run the following script to deploy node:
scripts/ocean-node-quickstart.sh
# OR
npm run quickstart
This command will run you through the process of setting up the environmental variables for your node.
PM2 is a process manager that makes it easy to manage and monitor your Node.js applications.
npm install -g pm2
Either use the script:
npm run envSetup
or setup the required environment variables manually:
export PRIVATE_KEY="0x_your_private_key_here"
The PRIVATE_KEY
is the only mandatory environmental variable, you must include the 0x
at the front of your private key. Additional configurations can be set as needed. For all available configurations, refer to the Environment Variables documentation.
pm2 start npm --name "ocean-node" -- run start
You can use the following PM2 commands to manage your Ocean Node:
pm2 list # View running processes
pm2 logs ocean-node # View logs
pm2 restart ocean-node # Restart the node
pm2 stop ocean-node # Stop the node
pm2 delete ocean-node # Delete the process
.nvmrc
.docker-compose -f typesense-compose.yml up -d
nvm use # Use the correct Node.js version
npm install # Install dependencies
npm run build # Build the Project
Run the helper script to generate and set up the minimum required environment variables:
./src/helpers/scripts/setupNodeEnv.sh
source .env
Manually set the required environment variables:
export PRIVATE_KEY="0x_your_private_key_here"
The PRIVATE_KEY
is the only mandatory environmental variable, you must include the 0x
at the front of your private key. Additional configurations can be set as needed. For all available configurations, refer to the Environment Variables documentation.
npm run start
Your node is now running, the control panel will be available at http://localhost:8000/controlpanel/
. To start additional nodes, repeat these steps in a new terminal.