Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| deployment:apps:9router [2026/11/25 22:18] – created ilyasa | deployment:apps:9router [2026/11/25 22:32] (current) – [4. Setup Systemd Service] ilyasa | ||
|---|---|---|---|
| Line 52: | Line 52: | ||
| NODE_ENV=production | NODE_ENV=production | ||
| PORT=20128 | PORT=20128 | ||
| - | HOSTNAME=0 | + | HOSTNAME=0.0.0.0 |
| + | DATA_DIR=/ | ||
| + | INITIAL_PASSWORD=YourStrongPasswordHere | ||
| + | JWT_SECRET=$(openssl rand -hex 32) | ||
| + | EOF | ||
| + | sudo chmod 600 / | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== 4. Setup Systemd Service ===== | ||
| + | |||
| + | Buat unit file '' | ||
| + | |||
| + | <code bash> | ||
| + | sudo tee / | ||
| + | [Unit] | ||
| + | Description=9Router AI Gateway Service | ||
| + | After=network-online.target | ||
| + | Wants=network-online.target | ||
| + | |||
| + | [Service] | ||
| + | Type=simple | ||
| + | User=root | ||
| + | WorkingDirectory=/ | ||
| + | EnvironmentFile=/ | ||
| + | ExecStart=/ | ||
| + | Restart=always | ||
| + | RestartSec=5 | ||
| + | |||
| + | [Install] | ||
| + | WantedBy=multi-user.target | ||
| + | EOF | ||
| + | </ | ||
| + | |||
| + | Reload daemon '' | ||
| + | |||
| + | <code bash> | ||
| + | sudo systemctl daemon-reload | ||
| + | sudo systemctl enable --now 9router | ||
| + | </ | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== 5. Verifikasi Service dan Akses ===== | ||
| + | |||
| + | - **Cek status service: | ||
| + | <code bash> | ||
| + | sudo systemctl status 9router | ||
| + | </ | ||
| + | Pastikan status menunjukkan '' | ||
| + | - **Uji endpoint API lokal:** | ||
| + | <code bash> | ||
| + | curl -I http:// | ||
| + | </ | ||
| + | - **Buka port firewall (jika menggunakan UFW):** | ||
| + | <code bash> | ||
| + | sudo ufw allow 20128/tcp | ||
| + | </ | ||
| + | - **Akses Dashboard: | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== Manajemen Harian ===== | ||
| + | |||
| + | ^ Kebutuhan ^ Perintah ^ | ||
| + | | Cek log secara real-time | '' | ||
| + | | Restart service | '' | ||
| + | | Update ke versi terbaru | '' | ||
| + | | Ubah konfigurasi | Edit ''/ | ||