Skip to main content

Installation Guide

This guide walks you through setting up a Shamwari Network full node on Linux, macOS, or Windows.

System Requirements

ComponentMinimumRecommended
RAM4 GB8 GB+
CPU2 cores4+ cores
Disk50 GB SSD200 GB+ SSD
JavaOpenJDK 17+OpenJDK 21 LTS
Network10 Mbps100 Mbps

Prerequisites

Install Java

Shamwari requires Java 17 or higher (OpenJDK 21 recommended).

# Ubuntu/Debian
sudo apt update && sudo apt install openjdk-21-jdk -y

# macOS (Homebrew)
brew install openjdk@21

# Verify
java -version

Download Shamwari

Clone the repository or download a release:

git clone https://bitbucket.org/thenamelesstree/shamwari.git
cd shamwari

Or download the latest release package:

wget https://github.com/thenamelesstree/shamwari/releases/latest/download/shamwari-release-2.2.6.zip
unzip shamwari-release-2.2.6.zip
cd shamwari

Build & Environment Setup

Compile and prepare dependencies:

./compile.sh

Configuration

Copy default properties or create conf/nxt.properties to override defaults:

cp conf/nxt-default.properties conf/nxt.properties

Key configuration options in conf/nxt.properties:

PropertyDefaultDescription
nxt.apiServerPort22024HTTP API port
nxt.apiServerSSLPort22024HTTPS API port
nxt.peerServerPort22022Peer-to-peer port (23024 on testnet)
nxt.apiServerHost0.0.0.0API bind address
nxt.apiSSLfalseEnable HTTPS
nxt.adminPasswordAdmin password for sensitive administrative APIs
nxt.enableAPIServertrueEnable REST API server
nxt.isTestnettrueEnable testnet mode

Example custom conf/nxt.properties:

nxt.apiServerPort=22024
nxt.apiServerSSLPort=22024
nxt.peerServerPort=22022
nxt.apiServerHost=0.0.0.0
nxt.apiSSL=false
nxt.adminPassword=your_secure_password
nxt.isTestnet=false

Running the Node

Use run-shamwari.sh (or run.sh) to start the node.

Note: Legacy entry scripts like start.sh and run-desktop.sh are deprecated. Use run-shamwari.sh options instead.

# Start in default interactive mode
./run-shamwari.sh

# Start in daemon mode (background process)
./run-shamwari.sh --daemon

# Start in desktop GUI mode
./run-shamwari.sh --desktop

# Start using authbind for privileged port binding
./run-shamwari.sh --authbind

# Stop daemon instance
./stop.sh

Alternatively, launch directly via Java:

java -Xms256M -cp "classes:lib/*:conf:addons/classes:addons/lib/*" nxt.Nxt

The node will:

  1. Initialize the H2 database (shamwari_db or shamwari_test_db)
  2. Synchronize with network peers
  3. Expose API endpoints on port 22024 once ready

Verify Installation

Check the blockchain status using the local API:

curl http://localhost:22025/nxt?requestType=getBlockchainStatus

Expected response:

{
"application": "Shamwari",
"version": "2.2.6",
"time": 12345678,
"lastBlock": "1234567890123456789",
"numberOfBlocks": 123456,
"isScanning": false,
"isDownloading": false
}

Docker Deployment

FROM eclipse-temurin:21-jre
COPY . /app
WORKDIR /app
EXPOSE 22025 22022 23024
CMD ["./run-shamwari.sh"]

Build and launch the container:

docker build -t shamwari .
docker run -p 22024:22024 -p 22022:22022 shamwari

Next Steps