Lamina1

Detailed Installation and Configuration

1. System Update and Dependencies

First, ensure your system is up to date:

sudo apt update && sudo apt upgrade -y
sudo apt install curl jq -y

2. Add LAMINA1 Repository and Install Node

echo "deb [trusted=yes arch=amd64] https://snapshotter.lamina1.global/ubuntu jammy main" | sudo tee /etc/apt/sources.list.d/lamina1.list
sudo apt update
sudo apt install lamina1-node -y

3. Configure Node

Create a configuration file for your node:

sudo mkdir -p /etc/lamina1-node
sudo nano /etc/lamina1-node/config.json

Add the following content (adjust as needed):

{
  "network-id": "testnet",
  "http-host": "0.0.0.0",
  "http-port": 9650,
  "staking-port": 9671,
  "db-dir": "/var/lib/lamina1-node",
  "log-level": "info",
  "api-admin-enabled": false,
  "api-ipcs-enabled": false,
  "api-keystore-enabled": false,
  "api-metrics-enabled": false
}

4. Create Systemd Service

Create a systemd service file:

sudo nano /etc/systemd/system/lamina1-node.service

Add the following content:

[Unit]
Description=LAMINA1 Node
After=network.target

[Service]
User=lamina1
ExecStart=/usr/local/bin/lamina1-node --config-file=/etc/lamina1-node/config.json
Restart=always
RestartSec=3
LimitNOFILE=4096

[Install]
WantedBy=multi-user.target

5. Start and Enable the Service

sudo systemctl daemon-reload
sudo systemctl enable lamina1-node
sudo systemctl start lamina1-node

6. Monitor Node Status

Check the status of your node:

sudo systemctl status lamina1-node

View logs in real-time:

sudo journalctl -u lamina1-node -f

7. Get Node ID

To get your node ID:

curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"info.getNodeID"}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/info

8. Firewall Configuration (if using UFW)

If you're using UFW (Uncomplicated Firewall), allow the necessary ports:

sudo ufw allow 9650/tcp
sudo ufw allow 9671/tcp
sudo ufw reload

9. Node Health Check

You can check your node's health with:

curl -X POST --data '{"jsonrpc":"2.0","id":1,"method":"health.health"}' -H 'content-type:application/json;' 127.0.0.1:9650/ext/health

10. Stopping the Node

If you need to stop the node:

sudo systemctl stop lamina1-node

Last updated