Table of Contents
- Setup Digital Ocean Droplet
- Create SKALE Chain
- Update SKALE Chain Configuration File
- Helpful Screen Commands
Setup Digital Ocean Droplet
Digital Ocean is a cost effective cloud server solution that you can use to do quick rapid testing on different server configurations. Head over to Digital Ocean, and create a new droplet with the following configurations:
Distribution: Ubuntu ****19.10 x64
Plan: The lowest plan at $5 per month works just fine for testing purposes
Region: Any
Create SKALE Chain
You will need to use a terminal to SSH into your new Digital Ocean server. Open your terminal and run the following commands:
1. Log into your Digital Ocean server
ssh root@[DIGITAL_OCEAN_IP] #example ssh root@123.123.123
2. Install updates
sudo apt-get update
3. Install Docker
sudo apt install docker.io
4. Clone the SKALE Chain SDK repo code
git clone --recurse-submodules https://github.com/skalenetwork/skale-dev-env.git
5. Setup NGNIX
sudo apt update;
sudo apt install nginx;
sudo ufw app list;
sudo ufw allow 'Nginx HTTP';
sudo ufw allow 'Nginx HTTPS';
sudo ufw allow 'OpenSSH';
sudo ufw enable;
sudo ufw status;
****sudo systemctl start nginx;
nano /etc/nginx/sites-available/default
Update the server file to be:
server {
listen 80;
listen [::]:80;
root /var/www/html;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;
server_name myservername.com;
location /skaled-blockchain-explorer {
try_files $uri $uri/ =404;
}
location /skaled-stats-viewer {
try_files $uri $uri/ =404;
}
location / {
proxy_set_header X-Real-IP
$remote_addr;
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_set_header Host
$http_host;
proxy_set_header
X-NginX-Proxy true; proxy_pass
http://123.123.123.123:1234;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade
$http_upgrade;
proxy_set_header Connection
"upgrade";
proxy_redirect off;
proxy_set_header
X-Forwarded-Proto $scheme;
}
}
systemctl restart nginx
5. Navigate to the root of the SKALE Chain SDK code
cd skale-dev-env
6. Run SKALE in Screen
screen -S SKALE-Chain-Box -d -m bash -c "./run.sh"
Update SKALE Chain Configuration File
# Update config file
vi config.json.in
#or
nano config.json.in
Helpful Screen Commands
#attach to screen
screen -r
#detach from screen but don't terminate:
control^ + a + d