cyberstrike serve starts a long-running HTTP server that exposes the full CyberStrike API. Use it to run CyberStrike headlessly on a remote machine, integrate with external tools, or allow multiple clients to share a single agent runtime.
Flags
Port to listen on. Can also be set via the
server.port field in the global config file; the CLI flag takes precedence.Hostname or IP address to bind to. Defaults to
127.0.0.1 (loopback only). Set to 0.0.0.0 to accept connections from any interface, or use --mdns to do this automatically.Enable mDNS service discovery. When enabled, the server announces itself on the local network under the configured domain and the hostname defaults to
0.0.0.0.Custom mDNS service domain name used when
--mdns is enabled.Additional origins to allow for CORS. May be specified multiple times. Combined with any origins set in the global config.
Examples
Startup output
Connecting to a running server
Oncecyberstrike serve is running, connect to it from another process using cyberstrike run --attach:
--dir to specify the working directory on the remote server:
Configuration priority
Network options are resolved in this order (highest priority first):- CLI flag (e.g.
--port 8080) - Global config (
server.portin the CyberStrike global config file) - Default value
Use cases
Headless server on a remote machine
Headless server on a remote machine
Install CyberStrike on a jump box or cloud instance, start the server, and connect to it from your local machine using
cyberstrike run --attach.CI/CD integration
CI/CD integration
Start the server at the beginning of a pipeline, run multiple
cyberstrike run --attach commands against it, and shut it down when done.Local network sharing with mDNS
Local network sharing with mDNS
Expose the server on your local network so team members on the same subnet can connect without knowing the IP address.