forked from Kweebec_Network/core-vitals
bruh
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"role": "lobby"
|
||||
},
|
||||
"redis": {
|
||||
"url": null,
|
||||
"host": "127.0.0.1",
|
||||
"port": 6379,
|
||||
"password": null,
|
||||
@@ -63,13 +64,14 @@
|
||||
|
||||
| Field | Default | Meaning |
|
||||
|---|---|---|
|
||||
| `host` | `"127.0.0.1"` | Redis host |
|
||||
| `port` | `6379` | Redis port |
|
||||
| `password` | `null` | Redis AUTH password. Prefer the env var (below). |
|
||||
| `database` | `0` | Redis logical database (0-15 on stock Redis) |
|
||||
| `key_prefix` | `"network:"` | All keys NetworkCore writes start with this prefix. Server registry keys end up at `network:servers:<id>`. Change this only if you're sharing a Redis with something unrelated. |
|
||||
| `tls` | `false` | Enables TLS for the Redis connection (Lettuce `rediss://` equivalent). **Set to true whenever Redis is on a different host than the Hytale server**, since the connection crosses untrusted network. |
|
||||
| `verify_peer` | `true` | When `tls` is on, verifies the Redis server's certificate against the JVM's default trust store. Set to false only in dev / against self-signed certs. Logs a warning when disabled. |
|
||||
| `url` | `null` | Full Redis connection URI. Supports both `redis://` (plain) and `rediss://` (TLS). When set, **all other redis fields are ignored** (host, port, password, database, tls). This is what you want when your provider hands you a one-line connection string. Prefer the env var (below) over putting credentials in the file. |
|
||||
| `host` | `"127.0.0.1"` | Redis host. Only used when `url` is null. |
|
||||
| `port` | `6379` | Redis port. Only used when `url` is null. |
|
||||
| `password` | `null` | Redis AUTH password. Only used when `url` is null. Prefer the env var. |
|
||||
| `database` | `0` | Redis logical database (0-15 on stock Redis). Only used when `url` is null. |
|
||||
| `key_prefix` | `"network:"` | All keys NetworkCore writes start with this prefix. Server registry keys end up at `network:servers:<id>`. Change this only if you're sharing a Redis with something unrelated. **Applies regardless of `url`.** |
|
||||
| `tls` | `false` | Enables TLS for the Redis connection. Only used when `url` is null (the URI scheme picks TLS on/off when `url` is set). **Set to true whenever Redis is on a different host than the Hytale server**, since the connection crosses untrusted network. |
|
||||
| `verify_peer` | `true` | When TLS is on (via `tls: true` or a `rediss://` url), verifies the Redis server's certificate against the JVM's default trust store. Set to false only in dev / against self-signed certs. Logs a warning when disabled. |
|
||||
|
||||
### network
|
||||
|
||||
@@ -115,6 +117,7 @@ These take precedence over the config file at boot time. Use them for secrets so
|
||||
|
||||
| Env var | Overrides |
|
||||
|---|---|
|
||||
| `REDIS_URL` | `redis.url` (full connection URI) |
|
||||
| `REDIS_PASSWORD` | `redis.password` |
|
||||
| `NETWORK_AUTH_TOKEN` | `network.auth_token` |
|
||||
| `MYSQL_PASSWORD` | `mysql.password` |
|
||||
@@ -127,7 +130,7 @@ These take precedence over the config file at boot time. Use them for secrets so
|
||||
**Multi-server staging or production:**
|
||||
- `server.id` left null is fine if you're OK with the id changing on every boot. Set it to something stable like `lobby-prod-01` if you want logs and dashboards to keep continuity across restarts.
|
||||
- `server.role` set explicitly per server. This is what dashboards and routing use.
|
||||
- `redis.host` pointed at your shared Redis. `redis.password` not in the file; set `REDIS_PASSWORD` env var.
|
||||
- `redis.tls` **on** whenever Redis is on a different host than the Hytale server. `verify_peer` stays true unless Redis uses a self-signed cert you haven't loaded into the JVM trust store.
|
||||
- **Easiest path for hosted Redis**: set `REDIS_URL` env var to the `rediss://user:pass@host:port/0` string your provider gives you. Leave the host/port/password/database fields at defaults. The `rediss://` scheme already implies TLS - no need to touch `tls`.
|
||||
- **Alternative**: set `redis.host` / `redis.port` explicitly, put the password in `REDIS_PASSWORD`, and set `redis.tls: true`. Works the same; just more fields to keep in sync across servers.
|
||||
- `network.auth_token` not in the file; set `NETWORK_AUTH_TOKEN` env var to the same value on every server.
|
||||
- `metrics.bind` stays `127.0.0.1`. Run Prometheus on the same host (or use an SSH tunnel / reverse proxy with auth to expose it elsewhere).
|
||||
|
||||
Reference in New Issue
Block a user