Ubuntu 26.04 がリリースされました。ここらで手順書を整備したいと思います。
sudo apt update
Java のインストール
sudo apt install openjdk-11-jre-headless
バージョン確認
java -version
NIS1 のダウンロード
※ダウンロードページで最新バージョンを確認します(2026/05/19時点で最新はv0.6.102)
wget https://github.com/NemProject/nem/releases/download/v0.6.102/nis-0.6.102.tgz
解凍
tar -xzvf nis-0.6.102.tgz
ノードの起動スクリプトを修正
vim ~/package/nix.runNis.sh
メモリ使用量の最大値を緩和およびノード起動コマンドをバックグラウンドで動作させるようにする
#!/bin/bash
cd nis
-java -Xms512M -Xmx1G -cp ".:./*:../libs/*" org.nem.deploy.CommonStarter
+nohup java -Xms6G -Xmx6G -cp ".:./*:../libs/*" org.nem.deploy.CommonStarter &
cd -
config-user.propertiesを作成してホスト名等を記述
vim ~/package/nis/config-user.properties
#nem.host = nis1node.example.com
# https://nemnodes.org/nodes に Name が載ります。識別が楽に。
#nis.bootName = BOOTNAME
# ハーベスト接続人数の上限値。4がデフォルト。
#nis.unlockedLimit = 4
# SNPで委任するための秘密鍵
#nis.bootKey =
# bootNameがIPアドレスに変化しないための設定
#nis.ipDetectionMode = Disabled
実行権限の付与
cd ~/package
sudo chmod +x nix.runNis.sh
ノードの起動
./nix.runNis.sh
プロセス確認
ps aux | grep java
期待値サンプル
ubuntu 16651 56.0 28.3 11054936 2315280 ttyS0 Sl 19:35 0:54 java -Xms6G -Xmx6G -cp .:./*:../libs/* org.nem.deploy.CommonStarter
ノード情報をブラウザで確認
curl http://localhost:7890/node/info
ブロック高を確認
curl http://localhost:7890/chain/height
ヘルスチェック状況を確認
curl http://localhost:7890/heartbeat
5分程待ってノードリストに掲載されるかを確認
https://nemnodes.org/nodes/
おまけ
ノードをhttps化します。今回はNginxとCertbotで設定します。
sudo apt update
sudo apt install nginx certbot python3-certbot-nginx
いったんNginxを停止します。
sudo systemctl status nginx
sudo systemctl stop nginx
sudo systemctl status nginx
Let's Encryptで証明書を発行します。ドメイン部は適宜差し替えて実行してください。
sudo certbot certonly --standalone -d nis1.example.com
sudo vim /etc/nginx/sites-available/nis1
server {
listen 7891 ssl;
server_name nis1.example.com;
# Let's Encrypt の場合
ssl_certificate /etc/letsencrypt/live/nis1.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/nis1.example.com/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / {
proxy_pass http://127.0.0.1:7890;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 90;
}
}
設定を読み込んでNginxを起動
sudo ln -s /etc/nginx/sites-available/nis1 /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl start nginx
sudo systemctl status nginx
https接続を確認
curl https://nis1.example.com:7891/chain/height | jq
証明書の自動延長が設定されているか確認
sudo systemctl status certbot.timer
sudo systemctl list-timers | grep certbot