Browse Source

Merge branch 'master' of github.com:janoside/btc-rpc-explorer

master
Dan Janosik 4 years ago
parent
commit
4ef5b80748
No known key found for this signature in database GPG Key ID: C6F8CE9FFDB2CED2
  1. 33
      docs/Server-Setup.md
  2. 32
      docs/explorer.btc21.org.conf
  3. 6
      npm-shrinkwrap.json

33
docs/Server-Setup.md

@ -1,24 +1,31 @@
### Setup of https://explorer.btc21.org on Ubuntu 16.04
### Setup of https://explorer.btc21.org on Ubuntu 20.04
# update and install packages
apt update
apt upgrade
apt install git python-software-properties software-properties-common nginx gcc g++ make
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
nvm install 10.14.1 ## LTS release of NodeJS as of 2018-11-29, via https://nodejs.org/en/
npm install pm2 --global
add-apt-repository ppa:certbot/certbot
apt update
apt upgrade
apt install python-certbot-nginx
apt install git nginx gcc g++ make npm certbot python3-certbot-nginx
npm install -g npm
npm install -g pm2
Copy content from [./explorer.btc21.org.conf](./explorer.btc21.org.conf) into `/etc/nginx/sites-available/explorer.btc21.org.conf`
certbot --nginx -d explorer.btc21.org
# add user for btc-related stuff
adduser bitcoin # leave everything blank if you want
# prep work for ssl certs
cd /etc/ssl/certs
openssl dhparam -out dhparam.pem 4096
# get nginx config
wget https://raw.githubusercontent.com/janoside/btc-rpc-explorer/master/docs/explorer.btc21.org.conf
mv explorer.btc21.org.conf /etc/nginx/sites-available/
# get source, npm install
cd /home/bitcoin
git clone https://github.com/janoside/btc-rpc-explorer.git
cd /home/bitcoin/btc-rpc-explorer
npm install
npm run build
# startup via pm2
pm2 start bin/www --name "btc-rpc-explorer"
# get letsencrypt cert
certbot --nginx -d explorer.btc21.org

32
docs/explorer.btc21.org.conf

@ -0,0 +1,32 @@
## http://domain.com redirects to https://domain.com
server {
server_name explorer.btc21.org;
listen 80;
#listen [::]:80 ipv6only=on;
location / {
return 301 https://explorer.btc21.org$request_uri;
}
}
## Serves httpS://domain.com
server {
server_name explorer.btc21.org;
listen 443 ssl http2;
#listen [::]:443 ssl http2 ipv6only=on;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
location / {
proxy_pass http://localhost:3002;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}

6
npm-shrinkwrap.json

@ -1502,9 +1502,9 @@
}
},
"lodash": {
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
"version": "4.17.19",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz",
"integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ=="
},
"longest": {
"version": "1.0.1",

Loading…
Cancel
Save