GithubHelp home page GithubHelp logo

rpc-node-setup's Introduction

RPC Node Setup Steps

Create VMs

First, create Ubuntu Sever 16.04 virtual machines with default settings...

You'll also need to add a firewall rule for inbound 443 (SSL) and TCP listening port 30303 and UDP discovery port 30301.

Configure DNS

Use A name, pointing the subdomain to the IP address of the VM.

Connect to VM via SSH

For Example

ssh ubuntu@<vm ip address>

Install & Start Parity

bash <(curl https://get.parity.io -Lk)
# say 'no' to the netstats client
tmux
parity --chain=kovan --jsonrpc-hosts=all
# exit tmux, [ctrl + b] then [d]
# later, attach again with;
tmux attach -t 0

Get an SSL Cert

https://certbot.eff.org/#ubuntuxenial-nginx

sudo apt-get install letsencrypt
sudo letsencrypt certonly --standalone -d <subdomain>.<domain>.com

Nginx Configs

sudo apt-get install nginx

Use the default /etc/nginx/nginx.conf

Edit /etc/nginx/sites-enabled/default

server {

  listen 443 ssl default_server;
  listen [::]:443 ssl default_server;

  ssl_certificate      /etc/letsencrypt/live/<subdomain>.<domain>.com/fullchain.pem;
  ssl_certificate_key  /etc/letsencrypt/live/<subdomain>.<domain>.com/privkey.pem;

  server_name _;

  location / {
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Content-Type application/json;
    add_header Access-Control-Allow-Origin "*";
    add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";

    if ($request_method = 'OPTIONS') {
      add_header Access-Control-Allow-Headers "Origin, X-Requested-With, Content-Type, Accept";
      add_header Access-Control-Allow-Methods "GET, POST, OPTIONS";
      add_header Access-Control-Allow-Origin "*";
      add_header Access-Control-Max-Age 600;
      add_header Content-Type 'text/plain charset=UTF-8';
      add_header Content-Length 0;
      return 204;
    }
    proxy_pass http://localhost:8545;
  }

}

Start nginx

sudo service nginx start # or `restart`

rpc-node-setup's People

Contributors

istoramandiri avatar

Stargazers

kristof kaehler avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.