Server Setup Guide
This guide is aimed at people not familiar with Linux servers or hosting services.
Introduction
Generally speaking, running a delegate node requires knowledge and experience in information and network technologies. However, we believe that it should be accessible to everyone who is willing to learn. This guide will help you get introduced to servers and Linux system, and getting started securely to start your own delegate node. If you find yourself stranded, our helpful community will be happy to help you 🙂
Prerequisite
Generate an SSH key
We recommend using public-key authentication to access your server. Using a strong password to connect remotely in SSH is already secured, but using your own key pair for SSH connexion is always recommended.
The SSH key you will be generating will be used later on when accessing your server.
On Windows
One easy way to generate an SSH key on Windows is by using PuttyGen. You can download Putty at this link and follow this complete tutorial to create your SSH key pair.
On Linux / Mac
Open a terminal window on Linux or OSx and type the following command.
It will generate an SSH key pair in the form of a public key id_rsa.pub
and the corresponding private key id_rsa
created in the ~/.ssh
directory
Find a Linux Machine
System Requirements
In the first beta version, X-Cash's DPoPS will only run on a Linux/Unix OS. We recommend installing it on a Ubuntu VPS/dedicated server (18.04) for the best compatibility.
Before looking into a server hosting service, it is recommended that you acknowledge the system requirements for running a delegate node.
The delegate node will need to transmit a lot of information, notably messages to the other delegates to verify the block informations, As time goes by, the features and information that the delegates handle will increase (notably when we will develop token creation, NFT, sidechains, smart contracts and other exciting features).
The recommended system requirement is designed to be "future-development proof", meaning that a hardware update should never be needed and it will still comfortably handle the xcash-dpops
program.
Minimum
Recommended
OS
Ubuntu 18.04
Ubuntu 18.04
CPU
4 threads, 2.0 GHz or more per thread
4 threads, 2.0 GHz or more per thread
RAM
6GB
32GB
Hard Drive
50GB
2TB
Bandwidth Transfer
100GB per month
500GB per month
Bandwidth Speed
100 Mbps
500 Mbps
It is estimated that the blockchain size will increase by 9GB per year.
Server hosting provider
There are a lot of server and VPS providers out there, notably AWS, Azure, Google Cloud, Hetzner, Alibaba, DigitalOcean, OVH etc... to only name a few. If you don't have your own server infrastructure, you will need to rent your server with a provider.
We are agnostic as to which server provider you should choose to run the xcash-dpops
program. Our recommendation is to find a Dedicated server or VPS that matches the system requirements, and to follow the service you are most confortable with.
Make sure you read your server provider documentation. Each initial server setup can be different.
Initialize your server
We will give a short tutorial here for preparing a server. Those steps should be easy to replicate with any server hosting providers.
Install a Linux distribution
Your server provider should propose you different Linux distributions to install directly from their dashboard. The xcash-dpops
program was intensively tested on Ubuntu-18.04 and Ubuntu-20.04 and should be the preferred distribution.
Choose the Ubuntu 18.04 LTS or Ubuntu 20.04 LTS version and follow the installation process.
Log in to your server
Without SSH key authentification
On Windows
Log into your server using your existing credentials (given by your server provider).
With Putty, indicate the hostname
(which should be the server IP-Address
) and the port (the default port is most of the time port 22
) open the connection and connect to a user session with your credentials user
/password
(the default user should be root
, and most times the password
is sent to you via email by your server provider).
On Linux/Osx
In a terminal, use the command ssh
log into your server using your existing credentials (given by your server provider). The hostname
should be the server IP-Address
, and the default user
should be root
.
When first connecting to your new server, you will be prompted to recognize the server's host key and validate the RSA fingerprint.
Type yes
and continue the log in process. You will be prompted to provide your password (which most times, is sent to you via email by your server provider).
With SSH Authentication
Use your SSH RSA key pair that you have previously generated to access your newly rented server. Most of the server hosting service lets you provide your SSH key on their dashboard and automatically authorize it.
On Windows
In Putty, go to the SSH > Auth
tab and browse to your private key file rsa-key.ppk
generated earlier to use as authentication to log into your server.
Now, when you open the connection, you will be prompted to enter your key passphrase (if you have given one) to log in.
On Linux/OSx
Open a terminal window and use the command ssh -i
, adding the path to your private key and your servers user@hostname
You will be prompted to give your key passphrase if you have provided one at the key generation.
Manually add your SSH key to your server
In most hosting services, you can register your public SSH key in your server dashboard, which will automatically authorize your SSH key to connect to your server. If you want to add it manually, you can follow the tutorial below. Otherwise, just move on to the next step.
With the key pair you have generated earlier, you will have to register the public key on your server so it can recognize you. To do so, you need to add your public SSH key into the file ~/.ssh/authorized_keys
in your server.
From Windows
To copy the content of the public SSH key into the server, you need to create the authorized_keys
file on your Linux machine.
Once logged in, use your preferred text editor to create and/or open the authorized_keys
file:
On your Windows machine, open the public key file.
The public key was created after generating your SSH key pair with PuttyGen. You have created two files: the public key rsa-key
and the private key rsa-key.ppk
Copy the public key content (starting from ssh-rsa
and the long string after) and paste it into the authorized_keys
on your Linux machine.
Save and close the text editor. Now, adjust the permissions of the authorized_keys
file so that the file does not allow group writable permissions.
Once done, restart your server's ssh.service
before logging out to take your changes into effect:
You should now be able to login to your server using your SSH key. In Putty, browse and choose your private key file rsa-key.ppk
to use it as an authentication for the next time you log into your server.
Now, when you open the connection, you will be prompted to enter your key passphrase (if you have given one), and you will be logged in.
From Linux/OSx
You can use the ssh-copy-id
command to copy the public key directly in the authorized_keys
on your server.
ssh-copy-id
is not natively installed on OSx systems. You need to install it by running brew install ssh-copy-id
Just use the following command by replacing mykey
with your private key file and user@host
with your server login information.
If you don't want to use the ssh_copy_id
command, you can manually append the authorized_keys
file by using the following command:
This will take the content of mykey.pub
and append it to the authorized_keys
file directly on the server. Once done, restart your server's ssh.service
before logging out to take your changes into effect:
You can now test the connection to your server by trying to login with your SSH key:
You will be prompted to give your key passphrase if you have provided one during key generation.
Create a new user
The xcash-dpops
auto-installer script has been designed for root
users. It should work for other users as well.
Log in to your server with your already existing credentials (given by your server provider) as a root
user.
Create a new user session named xcash
where you will only store files and programs related to the delegate function.
Set and confirm the new user’s password at the prompt. It is highly recommended to use a password here:
Follow the prompts to set the new user’s information. You can leave it empty.
Now that the xcash
user is created, you need to give it sudo
rights:
You can now switch user session from root
by using the command su
:
Custom domain name
Your delegate name is your brand! ⭐
When you register as a delegate, your server will be recognized and listed in the delegates website through its domain name. If you haven't registered a domain name for your server, the default domain will be the server's IP address.
While in itself it is completely possible to use it as is, it is recommended to brand yourself by buying a domain name of your choice. We believe that it will help you greatly if you are planning to run a shared delegate and are looking for votes.
There are a lot of services out there to buy a domain name: NameCheap, Google Domains, OVH, GoDaddy, etc... to only name a few. You will need to create an account over there and reserve the domain name of your choice.
Once you have reserved your domain name, you need to change the DNS record to point your newly bought domain name to your IP address. This can be done by changing the A (Address) Record in your domain name provider dashboard.
NameCheap has an easy tutorial for setting up the DNS record, but any other domain name provider should have a similar service.
Assuming that the domain you bought is domain-name.com
, the A Record above will permit people to identify your server with domain-name.com
and the subdomain delegate.domain-name.com
Set up your delegate node
Once you have done every step above, and are familiarized with your server, you can go through the next step and install the delegate program, xcash-dpops
. Follow the delegate node installation for a complete tutorial.
Last updated