Skip to content
This repository has been archived by the owner on Jul 9, 2022. It is now read-only.

Remote Twister Node setup (Ubuntu Debian)

ofbi edited this page Dec 18, 2021 · 12 revisions

Install

sudo apt-get update

sudo apt-get install git autoconf libtool build-essential libboost-all-dev libssl-dev libdb++-dev libminiupnpc-dev automake nano

git clone https://github.com/miguelfreitas/twister-core.git

cd twister-core

./autotool.sh

./configure

make -j {CORES}

Configuration & web gui

mkdir ~/.twister

chmod 600 ~/.twister/twister.conf

git clone https://github.com/miguelfreitas/twister-html.git ~/.twister/html

Setup firewall (using ufw)

Install UFW iptables client to update server firewall rules

sudo apt-get install ufw

Allow remote connections to support the network infrastructure (on 28333 port)

sudo ufw allow 28333

Optionally, restrict client connection by specified IP address

sudo ufw allow from {YOUR_IP} to any port 28333

Important: add ssh (22 by default) port to the IP whitelist

sudo ufw allow 22

Enable firewall

sudo ufw enable

Check port status

28333

Generate self-signed SSL certificate (need to be accepted in your browser)

openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

Setup twisterd config

  1. nano ~/.twister/twister.conf

  2. add connection settings

rpcuser={USERNAME}
rpcpassword={PASSWORD}
rpcsslcertificatechainfile={PATH TO}cert.pem
rpcsslprivatekeyfile={PATH TO}key.pem
rpcallowip={YOUR_IP}

  1. Ctrl+X
  2. Print Y and press Enter button

Run twisterd node

./twisterd -p 28333 -rpcssl

Run twisterd on startup

sudo apt-get install cron nano

crontab -e

select nano editor

add following line:

@reboot ./twister-core/twisterd -p 28333

or SSL enabled

@reboot ./twister-core/twisterd -p 28333 -rpcssl

Ctrl+x

press Y

Connect to the remote node

  1. Open https://{SERVER_IP:28332} in your browser
  2. Accept self-signed certificate warning
  3. Provide HTTP auth {USERNAME} and {PASSWORD}
  4. Optionally, support the network or promote your posts by sharing some CPU cores in the "Settings" Tab

Issues

  1. Ubuntu 18.04 have deprecated libboost dependencies, just upgrade it to 20.04 if you compiling latest twister-core version
  2. If port 28333 still closed, make sure you have dedicated (the white) IP and port forwarding enabled in the router (if exists)

Software

Automated command-line tool for simple and fast twister instance deployment
Installer script for the Twister Microblogging Software