Server Commands
Manage the Suduxu server lifecycle, connected devices, and connection information.
The server command group is responsible for starting and stopping Suduxu, monitoring connected devices, and generating connection information for clients.
Start the Server
Start a Suduxu server instance.
suduxu server startRuns the server in the current terminal.
suduxu server start --detachedRuns the server in the background.
The server must be running before devices can connect and before themes can be served. Although not multiple instances of the server can run in the CLI.
Check Server Status
Display the currently active network addresses.
suduxu server statusExample:
Server Status:
TCP Address: 127.0.0.1:9000
UDP Address: 127.0.0.1:9001
File Address: Not running
Control Address: 127.0.0.1:50676suduxu server status --jsonExample:
{
"tcp": "127.0.0.1:9000",
"udp": "127.0.0.1:9001",
"file": null,
"control": "127.0.0.1:50676"
}Stop the Server
suduxu server stopStops the currently running Suduxu server.
List Connected Clients
suduxu server clients --allLists all connected devices.
suduxu server clients --id 1Displays information for a specific client.
suduxu server clients --all --jsonReturns client information as JSON.
Disconnect Clients
suduxu server disconnect --id 1Disconnect a specific client.
suduxu server disconnect --allDisconnect all connected clients.
Generate a Connection QR Code
Generate a QR code that devices can scan to connect to the current server.
suduxu server code connection.pngThis command is useful for local development and testing because devices can connect instantly by scanning the generated image.
Command Summary
| Command | Description |
|---|---|
suduxu server start | Start the server |
suduxu server start --detached | Start the server in the background |
suduxu server status | Show active server addresses |
suduxu server status --json | Show active server addresses as JSON |
suduxu server stop | Stop the server |
suduxu server clients --all | List all connected clients |
suduxu server clients --id <ID> | Show a specific client |
suduxu server disconnect --id <ID> | Disconnect a client |
suduxu server disconnect --all | Disconnect all clients |
suduxu server code <FILE> | Generate a connection QR code |