How to create a GoByte RPC server in Ubuntu

Words
523
Reading
3 min
Listen
Play
9y

Hello Utopians,

In today's tutorial, I'll show you guys how to create a GoByte RPC server in Ubuntu. So, Let's begin with the first step.

Step 1: Setting up a server

We are going to need a VPS for this process. Here are my recommendations:

https://www.vultr.com/
https://www.digitalocean.com/
https://www.ovh.com/

I will be using Digital Ocean for this tutorial.

1.png

  • Now, we are going to create our first Droplet. Click the Create button in the top right corner and select Droplets.

  • I'll be using the latest version of Ubuntu, which is Ubuntu 16.04.3 x64 right now. But any other versions of Ubuntu should be working fine as well.

  • RPC servers should be just working fine with 512 MB of ram, but I recommend at least 1 GB just in case you would want to set up something else along with the RPC server.

money.png

Then, click to Create button, and congratulations! You have created your first Droplet. The credentials will be sent to your email

Now, you will need a software to connect to your SSH server. There are lots of SSH softwares around, but I recommend either PuTTY or MobaXTerm. For this tutorial, I will be using MobaXterm.

create-ssh.png

After logging in, update your packages with the "apt update" command.

Step 2: Downloading the GoByte Linux Wallet

You have to download the compiled version of the core. Otherwise, you will have to learn how to compile it yourself. This tutorial will not cover that.

In terminal:

wget https://github.com/gobytecoin/gobyte/releases/download/v0.12.1.3/GoByte_0.12.1.3_Linux.zip

Install unzip

apt install unzip

Unzip the folder

unzip GoByte_0.12.1.3_Linux.zip

We now have a folder named GoByte_0.12.1.3_Linux. We need to chmod this folder in order to make things work

chmod 777 -R /root/GoByte_0.12.1.3_Linux/

Then, go to GoByte_0.12.1.3_Linux directory in terminal

cd GoByte_0.12.1.3_Linux

We have everything set up and ready, now we will start the daemon with the following command

./gobyted -daemon

Now you should wait for the daemon to sync all blocks. You can check that with the following command:

./gobyte-cli getinfo

getinfo1.png

You can check the latest block number by using the explorer. Here's the link for the official GoByte explorer: http://explorer.gobyte.network:5001/

Step 3: Creating a config file

  • Now, we will create a configure file. Go to your /root/ directory and open the .gobytecore folder

  • Create a new file named gobyte.conf, then, right click the file you've created and open with your default text editor. You need to add these commands in order to make everything work.

server=1
daemon=1
listen=1
rpcuser=RPCUSERNAME
rpcpassword=RPCPASSWORD
rpcport=8332

Change the username and password to whatever you want. And, that's all.

  • If you want to restrict the RPC server to a specific IP address, put the following command to the bottom of your config

rpcallowip=IP

Then, save the file and upload it to your server. You need to restart the daemon to appy changes. While in GoByte_0.12.1.3_Linux directory, type the following code in terminal to stop the daemon

./gobyte-cli stop

And now, start the daemon with the following code

./gobyted -daemon

Congrats! You have set up your first GoByte RPC server. If you have any questions/problems, do not hesitate to type in the comments or drop me a PM!



Posted on Utopian.io - Rewarding Open Source Contributors

How to create a GoByte RPC server in Ubuntu | Ecency