Run a CLI server
Use Node.js 22.16.0 or later and iosignal-cli 7.2.0.
npm install -g iosignal-cli@7.2.0
io-server -l 7777
Global installation requires write access to your Node.js installation's global package directory. ios is an alias for io-server. Specify at least one of -l and -L; without either, the command exits with an error.
io-server -l 7777
io-server -L 8888
io-server -l 7777 -L 8888
io-server --help
io-server --version
Use ws://localhost:7777 for WebSocket and cong://localhost:8888 for TCP clients. Arduino takes a hostname and TCP port separately. From another device, use the server's reachable IP/domain. Stop with Ctrl+C; exit is a client command.
Options
| Option | Meaning |
|---|---|
-l, --listen <port> | WebSocket port |
-L, --listen-congport <port> | CongSocket TCP port |
-d, --auth-file <path> | JSON or JavaScript authentication file |
-e, --auth-param <id.key.cid.level> | Credentials; separate entries with commas |
-r, --auth-redis | Redis authentication |
-t, --timeout <milliseconds> | Heartbeat/check interval; default 50000; range 1000–2147483647 |
-m, --metric <mode> | 0 off (default), 1 summary, 2 connections, 3 channels |
-s, --show-message <mode> | none (default) or message |
-f, --file-logger | Write connection.log, auth.log, attack.log in the working directory |
-a, --attach-services [list...] | Space-separated reply, sudo, redis; none by default |
-o, --show-options | Print initial options and attached service names |
-V, --version / -h, --help | Version / help |
Ports range from 0 to 65535; 0 lets the OS choose an available port.
Authentication
io-server -l 7777 --auth-file ./auth_file.json
io-server -l 7777 --auth-param 'uno.uno-key.uno.1,admin.admin-key.admin.255'
Replace example credentials for real use. If multiple providers are specified, only one is selected in this order: file, parameter, Redis. Without an authentication option, no provider is configured. See file format and access policy.
Redis and services
Redis defaults to localhost:6379. REDIS_HOST and REDIS_PORT configure the shared Redis connection used by authentication and services. On macOS/Linux shells:
REDIS_HOST=127.0.0.1 REDIS_PORT=6379 io-server -l 7777 --auth-redis
io-server -l 7777 --auth-redis --attach-services reply redis
The server starts after Redis connects. Connection timeout is five seconds, automatic reconnection is disabled, failure exits with code 1, and shutdown closes Redis.
To try a service, start io-server -l 7777 --attach-services reply, then enter call reply echo hello in a client. The sudo service must be explicitly attached and requires server privileges. See client commands.