To setup an RPC server for Bytecoin one needs to configure the daemon, bytecoind, to run the RPC service for all connections. Setting up the daemon itself was explained in a previous blog.
By default the RPC service will be setup for the local host. To allow connections from outside you can either specify one IP or allow all. This is setup by starting the daemon with following command line call:
./launch bytecoind –rpc-bind-ip=0.0.0.0 –rpc-bind-port=8081
IP 0.0.0.0 means everybody. You can also specify 127.0.0.1 which is the default behavior limiting the RPC service to the localhost. It’s also possible to target a specify IP, but I haven’t tested that option yet, so not 100% sure it will work.
If the setup is to support large number of clients for RPC you may want to opt out of supporting p2p network. You can set this up by adding –hide-my-port, i.e
./launch bytecoind –rpc-bind-ip=0.0.0.0 –rpc-bind-port=8081 –hide-my-port