https://github.com/Ride-The-Lightning
Web Server NGINX reverse-proxy configuration:
https://bitcointv.com/w/gmedeEXmMPidgRTd4uW3hi?start=2m48s
-----
## Fix npm permission issue:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH="$HOME/.npm-global/bin:$PATH" ### Append to ~/.profile
source ~/.profile
## Fix dependencies issues when building RTL:
npm install --only-prod --legacy-peer-deps
### Create self-signed SSL certificate:
openssl req -x509 -newkey rsa:4096 -days 365 -keyout /etc/ssl/private/nginx.key -out /etc/ssl/certs/nginx.crt -nodes -subj "/CN=localhost"
### NGINX config file for reverse-proxy:
user www-data;
worker_processes 1;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
stream {
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 4h;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers on;
include /etc/nginx/streams-enabled/*.conf;
}
### NGINX RTL reverse-proxy:
upstream rtl {
server 127.0.0.1:3000;
}
server {
listen 3002 ssl;
proxy_pass rtl;
}
### C-LIGHTNING-REST API Server configuration file:
{
"PORT": 3001,
"DOCPORT": 4001,
"PROTOCOL": "https",
"EXECMODE": "production",
"RPCCOMMANDS": ["*"],
"DOMAIN": "localhost"
}
### Ride The Lightning configuration file:
{
"multiPass": "my-random-password",
"port": "3000",
"defaultNodeIndex": 1,
"SSO": {
"rtlSSO": 0,
"rtlCookiePath": "",
"logoutRedirectLink": ""
},
"nodes": [
{
"index": 1,
"lnNode": "my-cln-node",
"lnImplementation": "CLN",
"Authentication": {
"macaroonPath": "/path/to/my/home/c-lightning-REST-X.X.X/certs",
"configPath": "/path/to/my/home/.lightning/config"
},
"Settings": {
"userPersona": "OPERATOR",
"themeMode": "NIGHT",
"themeColor": "PURPLE",
"channelBackupPath": "path/to/my/backup/folder",
"logLevel": "ERROR",
"lnServerUrl": "https://localhost:3001",
"fiatConversion": false
}
}
]
}
-----
bc1qny4am3clu0gcsq3hvja4vcdhwd529hgmnlavfh