# Install Node on Ubuntu
This article explains how to install Waves node on Linux-based machines. You install OpenJDK (Java) first, then the node itself using one of the provided methods.
The most common and convenient method to install/upgrade Waves node on Linux-based machines is described in Installation from APT Repository section.
The alternative methods are described in Installation from Deb Package on Deb-based Linux (Ubuntu, Debian) and Installation for Advanced Users sections.
# Install OpenJDK
The node installation is supported in OpenJDK version 11 and 17.
If you don't have OpenJDK installed, install OpenJDK 11 with the following commands:
sudo apt-get update
sudo apt-get install openjdk-11-jre-headless
Check the JDK version with the following command:
java -version
# Installation from APT Repository
Note: The Waves package is supported on Debian 8.0+, Ubuntu 16.04+ and their forks.
The most convenient method to install/upgrade Waves Node on Linux is probably by means of APT repository. The repository provides Mainnet, Testnet and Stagenet packages. When this installation method is used, the related dependencies (namely OpenJDK 11) will also be automatically downloaded.
To install the latest version of a package for Mainnet from the APT repository, run the following commands:
curl -sL http://apt.wavesplatform.com/apt-key.gpg | sudo gpg --dearmour -o /etc/apt/trusted.gpg.d/apt-wavesplatform-com.gpg
sudo add-apt-repository "deb https://apt.wavesplatform.com/ xenial mainnet"
sudo apt update
sudo apt install waves
The node configuration file is embedded into the package and unpacked to the folder:
- for Mainnet:
/usr/share/waves/conf/waves.conf
with symlink to/etc/waves/waves.conf
; - for Testnet:
/usr/share/waves-testnet/conf/waves.conf
with symlink to/etc/waves-testnet/waves.conf
; - for Stagenet:
/usr/share/waves-stagenet/conf/waves.conf
with symlink to/etc/waves-stagenet/waves.conf
.
Specify the required node parameters in the file. Be careful: the security of your wallet and funds depends on the configuration. For detailed information, see the Node Configuration article.
Start the node with the following command (waves-testnet
for Testnet):
sudo systemctl start waves.service
Enable autoload on start with the following command:
sudo systemctl enable waves.service
💡 You can check the node status with the following command:
sudo systemctl status waves.service
You can find the node logs in the journald storage with the following command:
journalctl -u waves.service -f
Once new version of Waves Node is released, you can update the package by running the following commands:
sudo apt update
sudo apt upgrade
# Installation from Deb Package on Deb-based Linux (Ubuntu, Debian)
Download the latest waves deb package and install it with the following command:
sudo dpkg -i waves*.deb
The node configuration file is embedded into the package and unpacked to the folder:
- for Mainnet:
/usr/share/waves/conf/waves.conf
with symlink to/etc/waves/waves.conf
; - for Testnet:
/usr/share/waves-testnet/conf/waves.conf
with symlink to/etc/waves-testnet/waves.conf
; - for Stagenet:
/usr/share/waves-stagenet/conf/waves.conf
with symlink to/etc/waves-stagenet/waves.conf
.
Specify the required node parameters in the file. Be careful: the security of your wallet and funds depends on the configuration. For detailed information, see the Node Configuration article.
Start the node with the following command (waves-testnet
for Testnet):
sudo systemctl start waves.service
Enable autoload on start with the following command:
sudo systemctl enable waves.service
💡 You can check the node status with the following command:
sudo systemctl status waves.service
You can find the node logs in the journald storage with the following command:
journalctl -u waves.service -f
You can read about journald tips here.
# Installation for Advanced Users
Download the latest version of waves-all-<version number>.jar
to any folder, for example /opt/waves
.
Download the sample configuration file and place it in the same directory. Specify the required node parameters in the file. Be careful: the security of your wallet and funds depends on the configuration. For detailed information, see the Node Configuration article.
Then start console, navigate to the folder with the jar
file with the command cd /opt/waves
and start the node with the following command (replace {*} with actual file name):
java -jar {*}.jar {*}.conf
# Additional Security
For added security, it is recommended to store your wallet and configuration applications on an encrypted partition. You can read about it here.
Also, you may want to limit the use of the node folders to only the specified users. You can read about it here. The scripts in deb packages create the user waves
and the waves app, wallet and data folders by default belong to this user.
If you decide to use RPC, you should protect it with embedded in ubuntu ufw
or any other firewall. You can read about it here. If your server is public and available to the Internet and you decide to enable and use RPC, then allow only certain methods using Nginx's proxy_pass module and do not forget to set the apiKeyHash
in the configuration file.
Also, do not forget to update the OS and install software security updates.