Skip to main content

How to set up the Web3 RPC server on Debian / Ubuntu

  1. Set up and sync your BPX Chain full node following this guide. When creating the execution client systemd service, add some new parameters to the geth command line:
ExecStart=bpx-geth --syncmode snap --http --http.api web3,eth,net --http.corsdomain "*"
  • --http.api web3,eth,net makes only safe APIs available to the public: web3, eth and net, meanwhile it blocks access to dangerous RPC methods, e.g. admin or personal
  • --http.corsdomain "*" allows your RPC endpoint to be used in dApps in all domains

If you want to run an RPC endpoint providing archive states, replace the mentioned line to the following one:

ExecStart=bpx-geth --syncmode full --gcmode archive --http --http.api web3,eth,net --http.corsdomain "*"

2. Create an A record in your domain DNS zone and point it to your BPX full node IP address. BPX developers recommend that all private RPC endpoints should be named bpx-dataseed, so if your domain is example.com, please name your RPC server bpx-dataseed.example.com.

3. Install nginx HTTP server and certbot - a tool to get free SSL certificate:

apt-get install nginx python3-certbot-nginx

3.