Wiki: server dedicato
1 parent
7016e1a220
commit
87a85bc85d
1 file changed
+48
@@ -0,0 +1,48 @@
|
||||
# Server dedicato
|
||||
|
||||
Il server è autorevole: tiene il mondo, riceve i comandi dei client via WebSocket (`/ws`) e salva in automatico.
|
||||
|
||||
## Docker
|
||||
|
||||
```bash
|
||||
docker run -d --name rail-enterprise -p 7400:7400 \
|
||||
-e RE_TOKEN=cambiami -e RE_DIFFICULTY=imprenditore \
|
||||
-v /percorso/dati:/data \
|
||||
gitea.encke-hake.ts.net/balbosoft/rail-enterprise-server:latest
|
||||
```
|
||||
|
||||
Oppure con il `docker-compose.yml` allegato a ogni release. Tag: `<versione>`, `latest` (ultima stabile), `nightly` (da `main`).
|
||||
|
||||
## Unraid
|
||||
|
||||
Docker › Add Container › Template: usa `unraid-template.xml` della release. Cartella dati predefinita `/mnt/user/appdata/rail-enterprise`, WebUI = `/health`.
|
||||
|
||||
## Senza Docker
|
||||
|
||||
Scarica `RailEnterprise-Server-<versione>-linux-x64.tar.gz` o `-windows-x64.zip`, poi:
|
||||
|
||||
```bash
|
||||
RE_TOKEN=cambiami ./RailEnterprise.Server --port 7400 --data ./dati
|
||||
```
|
||||
|
||||
## Variabili
|
||||
|
||||
| Variabile | Predefinito | Significato |
|
||||
|---|---|---|
|
||||
| `RE_TOKEN` | — | token richiesto ai client (obbligatorio in rete) |
|
||||
| `RE_PORT` | 7400 | porta HTTP e WebSocket |
|
||||
| `RE_DATA_DIR` | `/data` | salvataggi e autosalvataggi (ultimi 5) |
|
||||
| `RE_DIFFICULTY` | `imprenditore` | `apprendista`, `imprenditore`, `magnate`, `ferro_e_sangue` |
|
||||
| `RE_SEED` | 1 | seme della mappa per una nuova partita |
|
||||
| `RE_MAP_SIZE` | 128 | lato della mappa in km (64/128/256) |
|
||||
| `RE_AUTOSAVE_MIN` | 10 | minuti fra gli autosalvataggi |
|
||||
| `RE_TICK_MS` | 50 | durata del tick |
|
||||
| `RE_LOG_LEVEL` | Information | livello dei log JSON su stdout |
|
||||
| `RE_RECORD` | — | file in cui registrare i comandi (per `replay`) |
|
||||
|
||||
## Controllo
|
||||
|
||||
- `GET /health` — stato; `GET /metrics` — metriche Prometheus (tick, treni, pacchetti, contratti, sessioni).
|
||||
- `GET /api/saves` — partite salvate.
|
||||
|
||||
Il WebSocket è in chiaro: fuori dalla rete privata usa un reverse proxy con TLS (`wss://`).
|
||||
Reference in new issue
Block a user