In the normal use case, Parity runs on localhost. However, I'm building a demo web site that uses Web3JS to connect to a public parity node running on port 8545.
I am publicly serving a Node/VueJS site using nginx. The client-side Web3 javascript is looking at localhost:8545 which implies that the users needs to run Parity on their local machine for the page to work.
It is a hassle for users to install parity and setup a config file just to view this web page.
One thought I had was to run a public parity node on port 8545 to circumvent these extra steps. However, I'm concerned about safety.
Is this safe, and what are the recommended best practices for accomplishing this?
Best Answer
Let me walk you through the options.
--public-node
mode which disables account storage and transaction signing on your server or disable the wallet with--no-ui
.--no-ui
but also the websocket with--no-ws
and the dapps server with--no-dapps
.--jsonrpc-interface
to<your public ip>
and allow--jsonrpc-hosts all
.--jsonrpc-apis safe
.So it looks something like that:
Please let me know if this is what you were looking for.
Disclosure: I work for Parity.