Get started with a server
Run your own IOSignal server instead of the public one (io.iosignal.net) to connect apps, boards and games. The server delivers by tag alone, so the server setup is the same whatever the application. If you are new, read core concepts in five minutes first.
1. Install
With Node.js 22.16.0 or later, run it in one of two ways.
| Way | Command | When |
|---|---|---|
| Node.js code | npm install iosignal, then new Server({ port: 7777 }) | Putting the server in an app, or setting up authentication and hosts in code |
| CLI | npm install -g iosignal-cli, then io-server -l 7777 | Starting one right away without code |
2. First connection
Start a server with Run a server, and check delivery with the receiver and sender of the five-minute quickstart.
3. What to decide on a server
- Ports: browsers and Node.js connect over WebSocket (
port), Arduino over TCP (congPort). Open both to accept Arduino. Connections and server addresses - TLS: HTTPS pages need
wss://. Configure a certificate on the server or a reverse proxy. - Authentication: accept only anonymous connections, or give fixed CIDs with device keys (a file, Redis or local test logins). The duplicate-login policy for one ID is set here too. Server authentication
- Quotas and roles: set per-connection limits on message size, messages and bytes per second, and receivers per publish. Anonymous connections use
anonymousQuota. Server API: quota - Watching the state: turn on a live status page with
dashboard: true. Server dashboard - Logic inside the server: when the server must judge, as in games and quizzes, use
server.host(). Game logic inside the server
4. Build guides
| What you want to do | Pages |
|---|---|
| Start a server from code or the CLI | Run a server, CLI server |
| Connect from other devices and the internet | Connections and server addresses |
| Accept logins with device keys | Server authentication |
| Watch the state live | Server dashboard |
| Judge games and quizzes | Get started with games, game logic inside the server |
| Public servers and addresses | Public servers and web apps |
| Every option and method | Server API |
5. Before opening it to others
- Check the address, ports and firewall that other devices will use.
- Prepare
wss://for HTTPS pages. - Set up authentication and quotas. Quotas always apply, to anonymous connections too.
6. When you are stuck
- The server does not start: install and run diagnosis
- Clients do not connect: connection diagnosis
- Boards do not connect: check
congPortand the PC's LAN IP. Connections