Configuration
These are the flags most setups need. Run cabby --help for the full list.
Almost every flag also has an ANYCABLE_* environment variable: --secret is ANYCABLE_SECRET,
--port is ANYCABLE_PORT. Cabby 0.2.0 adds CABBY_* names for these; the ANYCABLE_* names
will keep working.
Flags on the command line beat environment variables, and both beat the configuration file.
Configuration file
Cabby can also read its settings from a TOML file. Without --config-path, it loads
./anycable.toml if that exists, and /etc/anycable/anycable.toml otherwise. Only one file is
loaded. --config-path=<file> loads that file instead, and --ignore-config-path skips the file
altogether. cabby --print-config prints the settings Cabby would run with, in the file's format,
and exits.
Support for a cabby.toml file comes in 0.2.0.
Server
| Flag | Default | Description |
|---|---|---|
--host |
localhost |
Address to listen on. Use 0.0.0.0 in containers; the Docker image sets it |
--port |
8080 |
Port to listen on (also PORT) |
--path |
/cable |
WebSocket path(s), comma-separated |
--health-path |
/health |
Health check path |
Security
| Flag | Description |
|---|---|
--secret |
Base secret. Signed streams and JWT use it directly; the broadcast and HTTP RPC keys are derived from it unless set separately |
--broadcast_key |
Key for HTTP broadcast requests |
--allowed_origins |
Accepted Origin values, e.g. example.com,*.example.io |
--public_streams |
Allow unsigned stream names |
--noauth |
Accept connections without authentication |
--public |
--noauth, public streams and unauthenticated broadcasts. Local experiments only |
--turbo_streams |
Verify Turbo stream names without RPC |
RPC
| Flag | Default | Description |
|---|---|---|
--rpc_host |
localhost:50051 |
RPC address. A full URL selects HTTP RPC |
--http_rpc_secret |
Secret for HTTP RPC requests | |
--headers |
cookie |
Request headers passed to RPC |
--norpc |
Standalone mode, no RPC |
Broadcasting
| Flag | Default | Description |
|---|---|---|
--broadcast_adapter |
http,redis |
http, redisx, redis or nats, comma-separated. Set http if you don't run Redis |
--presets |
broker turns on the in-memory broker (history, presence) and HTTP-only broadcasts |
|
--http_broadcast_path |
/_broadcast |
HTTP broadcast endpoint |
--http_broadcast_port |
0 |
Port for broadcasts. 0 uses the main port when a secret or broadcast key is set, and 8090 otherwise |
--redis_url |
redis://localhost:6379 |
Redis connection URL (also REDIS_URL) |
--nats_servers |
nats://127.0.0.1:4222 |
NATS servers, comma-separated |
Pusher protocol
| Flag | Description |
|---|---|
--pusher_app_id |
Pusher app ID |
--pusher_app_key |
Pusher app key |
--pusher_secret |
Pusher secret (falls back to --secret) |
--pusher_api_port |
Separate port for the Pusher HTTP API (0 = main port) |