Installation
The following guide is for Ubuntu Linux. For more detailed guides on different OS, see:
- How to run ADAMANT Node on Ubuntu or CentOS Linux
- How to run ADAMANT Node on Windows
- How to run ADAMANT Node using Docker (Windows or Mac)
Requirements
- Ubuntu v18.04–v24.04 (other versions are not tested)
- RAM: 2 GB or more
- Disk space: A minimum of 70 GB as of February 2025 (mainnet)
- Expect the blockchain to grow by approximately 10 GB per year
Installation script
For new servers, use the Installation script from official repository, or fetch it directly from the ADAMANT website:
sudo bash -c "$(wget -O - https://adamant.im/install_node.sh)"
The script updates Ubuntu packages, creates a dedicated user named adamant
, sets up a new PostgreSQL database, installs Node.js and other necessary dependencies, configures the ADAMANT node, and optionally downloads an up-to-date ADAMANT blockchain image.
Script parameters:
-b
: The GitHub branch from which the ADAMANT node will be installed. Default ismaster
.-n
: The ADAMANT blockchain network (mainnet
ortestnet
). Default ismainnet
.
For example:
sudo bash -c "$(wget -O - https://adamant.im/install_node.sh)" -O -b dev -n testnet
Manual Installation
If you are an experienced Linux user and want more control over installation, you can manually set up the ADAMANT node.
Prerequisites
Toolchain components — Used for compiling dependencies
shsudo apt-get install -y python build-essential curl automake autoconf libtool
Git — Used for cloning and updating ADAMANT GitHub repository
shsudo apt-get install -y git
Node.js — Node.js serves as the underlying engine for code execution
Install system-wide via package manager (choose desired nodejs version):
shcurl -sL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs
Or locally, using nvm:
shcurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash nvm i --lts=hydrogen
PostgreSQL:
Install PostgreSQL:
shsudo 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 - sudo apt-get update sudo apt-get install -y postgresql postgresql-contrib libpq-dev
Create a new user:
shadduser adamant sudo usermod -aG sudo adamant su - adamant
Create
adamant_main
andadamant_test
databases:shsudo -u postgres createuser --createdb $USER createdb adamant_test createdb adamant_main sudo -u postgres psql -d adamant_test -c "alter user "$USER" with password 'password';" sudo -u postgres psql -d adamant_main -c "alter user "$USER" with password 'password';"
pm2 — Optional. Manages the node process for ADAMANT
shsudo npm install -g pm2
Installation Steps
Clone the ADAMANT repository using Git and initialize the modules.
su - adamant
git clone https://github.com/Adamant-im/adamant
cd adamant
npm install
Copy the default config file by running the following command:
cp config.default.json config.json
Edit the config.json
file using your preferred text editor, for example, Vim or Nano.
nano config.json
Make the necessary changes to the configuration values in the file. At minimum, you should change the value of the db.password
property to your actual database password.
See Configuration for description of every configuration file property.