If you want to run an ADAMANT node on Windows or Mac using Docker, please see the instructions.
You need pre-installed Virtual Machine (VM) with installed Ubuntu 16.04 LTS.
Options to get Ubuntu:
Machine should have:
First, run your VM with Ubuntu or reach it using SSH (using SSH client like PuTTY), if cloud-service is used.
sudo apt-get update && sudo apt-get upgrade
When asked, type y for confirmation. It may take a few minutes.
sudo apt-get install -y python build-essential curl automake autoconf libtool git
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - && sudo apt-get install -y nodejs
Add repository and repository key:
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -
Update package list and install postgresql:
sudo apt-get update && sudo apt-get install -y postgresql postgresql-contrib libpq-dev
sudo npm install -g pm2
You can choose any username, this sample creates user adamant, and grants him the necessary permissions to choose.
adduser adamant
When prompted, type password for this user. You can leave empty all of the additional fields for user.
sudo usermod -aG sudo adamant
su - adamant
This command creates DB user with same as current OS user (adamant is this sample) and DB with name adamant_main.
sudo -u postgres createuser --createdb $USER && createdb adamant_main
Finally grant user privileges to create databases.
mportant! Change ‘pass123’ with other password.
sudo -u postgres psql -d adamant_main -c "alter user "$USER" with password 'pass123';"
Then, clone ADAMANT repository and install dependencies:
git clone https://github.com/Adamant-im/adamant
cd adamant
npm install
nano config.json
Change DB credentials. In this example we need to change only DB password.
Change consoleLogLevel to error to check if everything alright.
To save changes, press F2, y, Enter.
Enabling API for applications, you allow ADAMANT Messenger apps to connect to your node for sending and retrieving messages and for other functions.
is very important to support decentralisation. More nodes allowing API means more stable, anonymous and reliable messaging infrastructure.
It is a necessary step if you running a node in order to protect your anonymity. After that, you can choose this node in application settings.
To enable API for applications, run
nano config.json
Change public parameter in api/ access subsection.
To save changes, press F2, y, Enter.
If your node is already started (you’ve done with Running ADAMANT node section), then restart your node:
pm2 restart adamant
To check if API enabled, open link in browser (node should be run already):
http://
You should change
To test that ADAMANT is built and configured correctly, run the following command:
node app.js
Normally you’ll see errors, only notices.
Once the process is verified as running correctly, press CTRL+C to return to command line.
Start the process with pm2. This will fork the process into the background and automatically recover the process if it fails.
pm2 start --name adamant app.js
After the process is started, its run-time status and log location can be retrieved by issuing the following command:
pm2 show adamant
Use it anytime you want to see your Node status. Status should be online.
If you need to make changes, f. e., for updating a node, use this instructions to stop your node.
To stop ADAMANT after it has been started with pm2, issue the following command:
pm2 stop adamant
Your ADAMANT node installation is complete!
Go to https://explorer.adamant.im/networkMonitor from any computer.
Find your node in the Nodes list by your node IP address. Please note, it may take up to several minutes for your node to appear in the list.
If you just installed your node, Height will be 1 — it is likely in sync process. It can take up to 1 day or more, depending on your connection and CPU.
To check the Height of your node, use command:
curl -k -X GET http://localhost:36666/api/blocks/getHeight
After sync completes, Height will be the same as for other nodes.
First, check Stopping ADAMANT node section to stop your node.
Choose your adamant user.
su — adamant
cd adamant
Save config file, then update ADAMANT node, and edit Node version number in config:
mv config.json config3.json && git pull && mv config3.json config.json && nano config.json
Editor for config.json will be run, where you should change “version” to actual:
To save changes, press F2, y, Enter.
And finally re-start ADAMANT node:
pm2 restart adamant
☞ Data Mining Tutorial For Beginners || Data Mining with Orange
☞ The BEST Blockchain/Web 3.0 Project Ideas - For Developers
☞ Blockchain Applications and Its Future
☞ NodeJS vs PHP | Which is best for beginners
☞ Web Scraping with Puppeteer in 10 minutes - IMDB Movie Scraping NodeJs
☞ Scraping Reddit with Puppeteer & NodeJs - Pagination Handling