# LRGK Native Deployment

No Docker. This build is intended for the same native Linux style as the Lloyd-Rose / Next Theme stack.

## Local run

```bash
cd server
PORT=3400 SESSION_SECRET=dev-secret node index.js
```

## Install to `/opt/lrgk`

```bash
./scripts/install.sh /opt/lrgk
sudo cp /opt/lrgk/systemd/lrgk.service /etc/systemd/system/lrgk.service
sudo systemctl daemon-reload
sudo systemctl enable --now lrgk
```

## Required before pilot

Edit `/etc/systemd/system/lrgk.service` and change:

- `SESSION_SECRET`
- `CORS_ORIGIN`
- `PORT` if required

Then:

```bash
sudo systemctl daemon-reload
sudo systemctl restart lrgk
```

## Default alpha PINs

- Staff: `7319`
- Manager: `9042`

Rotate these before public use.

## Backup

```bash
/opt/lrgk/scripts/backup.sh /opt/lrgk
```
