> For the complete documentation index, see [llms.txt](https://fangdarth.gitbook.io/fangdarth/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fangdarth.gitbook.io/fangdarth/guides/lamina1.md).

# Lamina1

### Detailed Installation and Configuration

#### 1. System Update and Dependencies

First, ensure your system is up to date:

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

#### 2. Add LAMINA1 Repository and Install Node

```bash
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:

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

Add the following content (adjust as needed):

```json
{
  "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:

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

Add the following content:

```ini
[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

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

#### 6. Monitor Node Status

Check the status of your node:

```bash
sudo systemctl status lamina1-node
```

View logs in real-time:

```bash
sudo journalctl -u lamina1-node -f
```

#### 7. Get Node ID

To get your node ID:

```bash
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:

```bash
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:

```bash
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:

```bash
sudo systemctl stop lamina1-node
```
