Everything you need to set up your own TurtleCoin public node from scratch

Please Note: This post is archived and not up-to-date

After the recent announcement from TurtleCoin here it is possible for you to make some extra TRTL while doing nothing. But many people still have no idea how to do it or are too afraid to try it out. But don’t worry, all you need is a server and a TurtleCoin wallet. Yeah, you read it right. If you still have no idea how it’ll work, continue reading…

1. Setting up and configuring the server

First we need a server that will be used to host our public node. You can use your own server or purchase a cheap VPS at DigitalOcean (Register here and get $100 free credits) or Google Cloud. Many cloud providers have a free trial so you can set up a server at no cost.

We’ll use an Ubuntu 18.04 server for this purpose. The steps will be almost the same for any flavor of Linux. You can use ssh or putty for connecting to your server. To connect to your server

Linux users :

If you are a Linux user, you probably know how to ssh to your server. But if you don’t, simply open up a terminal and type this command. Substitute the username and ip-address you received from your cloud service provider.:

Windows users :

If you are a Windows user and have no idea what’s going on, that’s okay! All you need is a client such as PuTTY. Install this client and put in your username and ip-address to connect to your server and you’re good to go! If you need and in-depth guide to connect, here’s a great tutorial.

Now we need to add a user as most VPS comes with a root login and it is really not a good idea to run anything as root (consider it as a admin with superpowers). We’ll create a user named turtlenode but you’re free to choose any username.

Set and confirm the new user’s password at the prompt. A strong password is highly recommended! Follow the prompts to set the new user’s information. It is fine to accept the defaults to leave all of this information blank.

Next, run this command to provide admin rights to our user and switch to our new user

After running this command, you’ll be able to see that the prompt has changed. If you’ve completed these steps and see a terminal with username as turtlenode, congrats! You’re already halfway through!

2. Getting TurtleCoin

Now we’ll build TurtleCoin on our server. First, we need to install all the dependencies.

After all the dependencies have been installed, we need to get the TurtleCoin source code and build it using the following commands

This will take some time to complete so you can grab a coffee till then. After this step is complete, you’ll be able to see new files in the ~/turtlecoin/build/src/ directory. If you don’t, then probably the build did not complete successfully and you may want to execute these steps again.

3. Setting up TurtleCoind High-Availability Daemon Wrapper

Now that we have everything ready with us, we need to make sure that our daemon always stays up and on the right chain. For this, we’ll be using the turtlecoind-ha wrapper.

Next, we need to install Nodejs, a dependency for the wrapper using the following command.

Note: The recommended way to install Nodejs is using NVM (Node version Manager) or by downloading Nodejs from the official website. The below command will install nodejs from Ubuntu software repository and may not be the latest version. You may also run into access right issues.

Verify if it is installed successfully by running

This will output the current version of nodejs. If your version is v8.x or higher, you’re good to go. Else, you’ll need to update.

Let’s get back to our home directory using the below command

Next, we need to clone the wrapper and place the daemon to work with the wrapper

Now we need to install all the dependencies for the wrapper. Don’t worry, we don’t need to run every command now as installing dependencies with nodejs is pretty easy. All you need to do is run this single command

Note : Running npm install will automatically fetch and start syncing from checkpoints for a faster sync. Thanks to iburnmycd

You’re now really close to making your public node public.

We now need to set a few parameters to tell the network about our daemon and the fee it charges, for example say 250.00 TRTL per transaction. We need to add these parameters to the file service.js. Open up a text editor. For simplicity, we’ll use the nano text editor.

Add the following lines in bold here (after line number 10) without missing the commas

Substitute your wallet address and the feeAmount. Please note that the amount here is in shells.

1 TRTL = 100 shells, so 25000 shells = 250 TRTL

Save this file with CTRL + O, then CTRL + X

As we want our daemon to continue running non-stop 24x7x365, we need something that will help us accomplish that

There’s a process manager called pm2 which can be installed with npm, the package manager for nodejs. The setup is very simple

Simple, isn’t it?

Now start the daemon with

Now if you want to monitor your daemon or want to check the logs, you can do so by

Ta-da! You’ve successfully set up your own public TurtleCoin node.

Congratulations! You are now a TurtleCoin service operator.

If you liked this tutorial, or made some TRTLs running your public node, please consider donating. Thanks!

A tech enthusiast