You've already forked Atomcms-edit
Nitro V3 update: CLI-only (Linux), settings via .env
- Moved Nitro V3 update from web UI (Commandocentrum) to CLI-only - Removed configure paths form and runUpdateNitrov3() from admin panel - update-Nitrov3.sh now loads .env automatically from its directory - Added all NITRO_* env vars to .env.example.linux and .env - Removed configurable paths from database (replaced by .env) - Updated README and CHANGELOG
This commit is contained in:
@@ -13,9 +13,9 @@ A modern Habbo retro CMS powered by Laravel 13, Filament 5, React 19, and Nitro.
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| **Commandocentrum** | Central admin dashboard with one-click Nitro V3 updater |
|
||||
| **Nitro V3 Update System** | Auto-update emulator, Nitro client & renderer from the HK |
|
||||
| **Configurable Paths** | 9 paths fully adjustable via HK UI (no SSH needed) |
|
||||
| **Commandocentrum** | Central admin dashboard with Nitro, emulator & hotel monitoring |
|
||||
| **Nitro V3 Update System** | Auto-update emulator, Nitro client & renderer via CLI (Linux `.env`) |
|
||||
| **Configurable Paths** | 13 paths fully adjustable via `.env` (no database needed) |
|
||||
| **Emulator Control** | Start, stop, restart & check status from the admin panel |
|
||||
| **Live Monitoring** | Online users, emulator status, DB status, server load, diagnostics |
|
||||
| **Hotel Alerts** | Send messages to all online users in real-time |
|
||||
@@ -63,44 +63,37 @@ yarn install && yarn build:all
|
||||
|
||||
---
|
||||
|
||||
## Nitro V3 Update
|
||||
## Nitro V3 Update (Linux-only)
|
||||
|
||||
One-click update from **Commandocentrum** → "Configureer Paths" → "Run Update".
|
||||
> ⚠️ **CLI only.** The web UI button has been removed. The script is configured via `.env` variables.
|
||||
|
||||
**What it does:** `git pull` emulator → DB backup → SQL imports → Maven build → `git pull` Nitro_Render_V3 + Nitro-V3 → `yarn build` → sync Gamedata → cleanup → restart emulator.
|
||||
|
||||
**Configurable paths** (9 settings, stored in DB):
|
||||
|
||||
| Setting | Default |
|
||||
|---------|---------|
|
||||
| Emulator map | `/var/www/emulator` |
|
||||
| Service naam | `emulator` |
|
||||
| Database | `habbo` |
|
||||
| SQL updates | `{emulator}/Database Updates` |
|
||||
| Backups | `{emulator}/Database Updates/backups` |
|
||||
| Gamedata | `/var/www/Gamedata/config` |
|
||||
| Nitro client | `{nitro}/public/configuration` |
|
||||
| Nitro-V3 bron | `/var/www/Nitro-V3` |
|
||||
| Nitro Render V3 | `/var/www/Nitro_Render_V3` |
|
||||
|
||||
**Sudoers** – passwordless `systemctl` + `chown` for the web UI:
|
||||
|
||||
> ✅ **Completely safe.** Each command is pinned to a specific binary and (where possible) a specific path. The web user (`www-data`) cannot run arbitrary shell commands — only these exact operations. No shell, no arbitrary binary, no risk.
|
||||
**Usage:**
|
||||
|
||||
```bash
|
||||
sudo tee /etc/sudoers.d/www-data << 'EOF'
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart emulator
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/systemctl status emulator
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/chown -R www-data\:www-data /var/www/*
|
||||
EOF
|
||||
sudo chmod 440 /etc/sudoers.d/www-data
|
||||
# Make sure .env contains all NITRO_* variables (see .env.example.linux)
|
||||
cd /var/www/atomcms
|
||||
bash update-Nitrov3.sh
|
||||
```
|
||||
|
||||
| Entry | Why it's needed |
|
||||
|-------|----------------|
|
||||
| `systemctl restart emulator` | One-click emulator restart from the admin panel |
|
||||
| `systemctl status emulator` | Live emulator status in the dashboard |
|
||||
| `chown -R www-data:www-data /var/www/*` | Fix permissions after the updater clones/builds files as root |
|
||||
**Configurable via `.env`:**
|
||||
|
||||
| Variable | Default | Description |
|
||||
|----------|---------|-------------|
|
||||
| `NITRO_EMULATOR_PATH` | `/var/www/emulator` | Emulator root directory |
|
||||
| `NITRO_EMULATOR_SERVICE` | `emulator` | Systemd service name |
|
||||
| `NITRO_DB_HOST` | `127.0.0.1` | Database host |
|
||||
| `NITRO_DB_PORT` | `3306` | Database port |
|
||||
| `NITRO_DB_NAME` | `habbo` | Database name |
|
||||
| `NITRO_DB_USER` | `root` | Database user |
|
||||
| `NITRO_DB_PASS` | — | Database password |
|
||||
| `NITRO_SQL_DIR` | `{emulator}/Database Updates` | SQL updates directory |
|
||||
| `NITRO_BACKUP_DIR` | `{emulator}/Database Updates/backups` | Backup directory |
|
||||
| `NITRO_GAMEDATA_DIR` | `/var/www/Gamedata/config` | Gamedata config directory |
|
||||
| `NITRO_CLIENT_DIR` | `{nitro}/public/configuration` | Nitro client config directory |
|
||||
| `NITRO_CLIENT_SRC` | `/var/www/Nitro-V3` | Nitro-V3 source directory |
|
||||
| `NITRO_RENDERER_SRC` | `/var/www/Nitro_Render_V3` | Nitro Render V3 source directory |
|
||||
|
||||
---
|
||||
|
||||
@@ -188,7 +181,7 @@ yarn build:all
|
||||
sudo chown -R www-data:www-data storage bootstrap/cache public/build
|
||||
sudo chmod -R 775 storage bootstrap/cache
|
||||
|
||||
# 12. Sudoers (for the Nitro updater — see section above)
|
||||
# 12. Sudoers (for update-Nitrov3.sh — sudo chown + systemctl)
|
||||
sudo tee /etc/sudoers.d/www-data << 'EOF'
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/systemctl restart emulator
|
||||
www-data ALL=(ALL) NOPASSWD: /usr/bin/systemctl status emulator
|
||||
|
||||
Reference in New Issue
Block a user