I get this when trying to deploy to parity -

Writing artifacts to ./build/contracts

Invalid JSON RPC response: "Provided Host header is not whitelisted.\n"

I am new to using truffle with parity here is my truffle.js file -

module.exports = {
  networks: {
    development: {
      host: "",
      port: 8540,
      network_id: "*", // Match any network id
      gas: 4712388

What could be the cause?

Here is my parity node -

nohup parity --config node0.toml --tracing=on --fat-db=on --pruning=archive  &

chain = "demo-spec.json"
base_path = "/home/satoshimaca/blockchain/parity0"
port = 30300
port = 8540
apis = ["web3", "eth", "net", "personal", "parity", "parity_set", "traces", "rpc", "parity_accounts"]
port = 8180
port = 8450
password = ["node.pwds"]
engine_signer = "0x00bd138abd70e2f00903268f3db08f2d25677c9e"
reseal_on_txs = "none"
  • by default, rpc host address would be, which you can change with --rpcaddr, OR you can change truffle.js file and put host: ""
    – kherwa
    May 30, 2018 at 12:13
  • I changed that already but then it just was hanging, that sounds like a mining issue but I am using PoA so I would not expect any mining. May 30, 2018 at 12:19

1 Answer 1


Parity runs on localhost, change the host in your truffle configuration file to localhost instead of and try again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.