CommandBridge Logo About Docs
GitHub Discord Download

Backends

This config can be found at every backend server at plugins/commandbridge/config.yml.


Default config

client-id: survival-1
endpoint-type: WEBSOCKET
endpoints:
  websocket:
    host: 127.0.0.1
    port: 8765
  redis:
    host: 127.0.0.1
    port: 6379
    username: ''
    password: ''
security:
  tls-mode: TOFU
  tls-pin: ''
  secret: change-me
timeouts:
  auth-timeout: 5
  reconnect-timeout: 60
  reconnect-interval: 5
debug: false

Core

client-id

This id is used to identify this client. You are required to change it to a unique name for every backend server. I recommend using a name associated with the server, like survival-1 if it is a survival server.

endpoint-type

This works the same as on Velocity. Either connect using Redis or WebSocket; in this enum you can choose what you want.


WebSocket

host

The address the WebSocket server is running on. If you are using a local setup you can use 127.0.0.1, but in most cases you are using a hosting provider or multiple servers, so then you need to enter the public IP address of the Velocity proxy.

port

Use the port you configured in the Velocity proxy CommandBridge config. This must match the bind-port value from Velocity.

Make sure this port is open as a TCP connection on the Velocity server. If it is not reachable, the backend will not be able to connect.


Redis

Redis mode is a bit different because the backend just connects to Redis; it does not host it. The values here should point to your Redis server.

host

The IP address where the Redis server is running. If you are self-hosting and Redis runs locally, you can usually keep the default value. In most other cases (provider or Docker), you need to change the host. Hosting providers usually give you the IP directly, so you can copy that value.

port

The port Redis is listening on. You do not have to open anything on your router here, just enter the port Redis is running on.

username

Redis usually requires authentication for a secure connection, so put your username here.

password

The password for your Redis authentication. Used together with username.


Security

Authentication and TLS settings. These must match what you configured on the Velocity side. See Security for a full explanation.

tls-mode

TLS encryption mode. This must match the proxy's TLS mode. TOFU is the default and should be used in most cases. See Security.

tls-pin

TLS certificate pin. This is auto-populated in TOFU mode on the first connection. You do not need to touch this unless you are re-pinning after a certificate change.

secret

Shared secret for authentication. Copy this from Velocity's secret.key file. On first startup, Velocity generates this file automatically.

Change the default secret value before going to production. Use the key from Velocity's secret.key file. Anyone with this key can connect to your proxy and execute commands.


Timeouts

auth-timeout

Seconds to wait for the proxy to accept authentication. If this times out, the connection attempt is dropped.

reconnect-timeout

Max time in seconds to keep trying to reconnect after a disconnect. After this, the backend stops trying.

reconnect-interval

Seconds between reconnect attempts. If the connection drops, the backend waits this long before trying again.


Debug

debug

Enables verbose logging. Useful for troubleshooting connection or script issues. Keep this off in production.