Linux - tutorial
This is a step by step instruction of how to setup and run an elastic node on a dedicated server, or VPS including Ubuntu 16.04.
Preparing a Server for Client installation
How to connect to your new server?
If you are using Windows, download the latest Putty Client and use these instructions to connect to your server:
If you are using Linux, start your console (Alt+Ctrl+T) and type:
Once you are logged in you will start the installation of dependencies for your Elastic node to compile
(at this point, if you don’t have sudo installed and you are using a root account, just remove sudo from all the commands that will be shown in this tutorial)
Install some basic packages
Install Java
(You’ll be prompt here to accept some TOS/License.)
After that, verify that your Java is installed in the right version
You should see something like this:
(Make sure Java is at 1.8.x because it’s currently supported by Elastic.)
Installing elastic client
Remember not to run Elastic as root user!
If at this point you are logged in as root user, create a new account and do the rest of the command with this new user. You can skip this step if you have access to a normal user.
You’ll be asked some questions about the user. Just drop some data. Then set a password for the new user. Remember that the password needs to be strong (min 16 chars, min one upper case letter, min one lower case letter, min one number). Use a password generator if you don’t want to burn your brain, but remember to keep that password in some safe place.
Logout from root account. We don’t need it anymore.
Remember not to login to root account anymore!
If by accident you’ll login to your root account and run for example Elastic from it, some file permission will change and you’ll not be able to run Elastic with this newly created user anymore.
Login as elastic this time typing your newly created password. You should be in your home directory now. Check it by typing
You should see
Launch MC and hit F7 to create a new directory. Name it ‘elastic’ as well (without quotes of course). Go to this directory and minimize MC (Ctrl + O).
Paste/type
Maximize MC (Ctrl + O) and go to the Litewallet-Mainnet directory. Minimize and
Maximize, and this time you have to exit MC (F10). You need to go to the Litewallet-Mainnet directory manually because you will need to launch it in screen. So if you have directory structure like mentioned before, you can type:
And you should be in Litewallet-Mainnet directory. If your username is different (i.e ubuntu) type:
Hope you get the idea. If you for some reason lost, read about ‘ls’ command it will help navigate listing files and directories in directory you currently are.
If you’re in Litewallet-Mainnet directory type
What this command do it’ll pull latest changes from github, compile it with maven and launch Elastic. Check if everything launch as it should.
If you want to go back from screen to your server console LEAVING Elastic running in background hit Ctrl (hold it), now hit A key and release it and hit D key.
You should be back in console and Elastic is running in background so if you exit your server Elastic will be still running. If you want to go back to Elastic (for example to shutdown it) type
This command should bring your screen instance of elastic (even if you login to your node next time) If you want to shutdown elastic hit Ctrl + C. elastic and screen itself should exit.
Now (once Elastic is down) i.e. you can update Elastic to the newest version and launch it again
At this point you have full relay node up and runnig! You are already helping the network, you don’t need to know anything more if you just wanted to help with relay blocks/txs. Just remember to update your node when a new version will show up.
But you might also want to login to your wallet with the browser to start forging for example (or just see if it work as it should, see blocks, txs etc). You’ll also need to create an SSL cert to protect yourself against Main-In-The-Middle attack.
First, you need to stop your Elastic node (see above) and do some config change in order to be able to access it remotely.
Next, we need to generate an SSL certificate
You’ll be asked here for some basic info about your certificate (fill it all with Elastic word) AND for passphrase. Remember to set here some strong password (min 32 random chars, best use password generator), paste here and keep it safe. You’ll need that password in a minute. Launch mc and go to your Elastic-XEL-Litewallet/conf directory. When you’re in conf directory minimize MC (Ctrl + O) Type
This will be the file where you customize any default properties elastic has. If you want to see all of that properties there are in nxt-default.properties file. You can go to this directory with mc, mark that file and hit F4 to see it contents (you’ll be asked here to choose default editor, nano is quite easy). When you stop reading and want to exit nano hit Ctrl + X (and hit N to not save any changes). Remember, you can’t change content of nxt-default.properties because everything you’ll change there will be overwritten next time you’ll update your elastic. Thats why we created a new file in conf directory. So, go back to conf/nxt.properties, highlight that file in MC, and edit it (F4). You’ll see an empty file. Paste the following lines there:
As you can see, adminPassword is “generateSomeAdminAPIPasswordAndPasteHere”. Again, generate yet another password here. You don’t need to save this password anywhere because you don’t need it. It just has to be set when you are opening your node to the world.
keyStorePassword is “passwordYouProvidedDuringSSLCertGeneration”. Replace it with password you generated during the SSL step.
Save your changes by hitting Ctrl + X (you’ll be asked if you want to save, hit Y or if you have Ubuntu installed in different language, it might be a key corresponding to “Yes” word in your language) and you should be back in MC. Exit from mc (F10):
Running the node
If you want to go back from screen to your server console LEAVING Elastic running in background hit Ctrl (hold it), now hit A key and release it and hit D key.
To access ur wallet open ur browser and go to
Last updated