.\" Automatically generated by Pandoc 3.10 .\" .TH "st\-server" "1" "Jun 2026" "Open source version of the STMicroelectronics STLINK Tools" "stlink" .SH NAME st\-server \- Serve a local ST\-LINK over TCP for remote stlink tools .SH SYNOPSIS \f[I]st\-server\f[R] [\f[I]OPTIONS\f[R]] .SH DESCRIPTION \f[I]st\-server\f[R] opens one locally attached ST\-LINK probe and exposes the stlink backend operations over TCP. A remote \f[I]st\-flash\f[R](1), \f[I]st\-info\f[R](1), or \f[I]st\-util\f[R](1) client can then use \f[I]\(enremote\f[R] to drive the probe from another machine. .PP The server owns the USB connection to the ST\-LINK. The client runs the normal stlink target logic such as target connection, chip detection, erase, program, verify, and GDB server behavior. .PP By default \f[I]st\-server\f[R] listens only on the loopback address \f[I]127.0.0.1:4500\f[R]. Use \f[I]\(enbind\f[R] to listen on another IPv4 address. Binding to \f[I]0.0.0.0\f[R] or using \f[I]\(enbind=:PORT\f[R] exposes the probe to the network; only do this on trusted networks or behind another access\-control layer such as SSH. .SH OPTIONS .TP \-\-bind \f[I]ADDR\f[R][:\f[I]PORT\f[R]] IPv4 address and optional port to listen on. The default is \f[I]127.0.0.1:4500\f[R]. Use \f[I]0.0.0.0\f[R] to listen on all IPv4 interfaces. The shorthand \f[I]:4500\f[R] is accepted and means \f[I]0.0.0.0:4500\f[R]. .TP \-\-port \f[I]PORT\f[R] TCP port to listen on. This is kept for compatibility and can be combined with \f[I]\(enbind\f[R] when the bind address does not include a port. .TP \-\-serial \f[I]iSerial\f[R] Serial number of the local ST\-LINK device to serve. To serve multiple probes concurrently, run one \f[I]st\-server\f[R] process per probe on different ports. .TP \-\-freq \f[I]kHz\f[R] SWD/JTAG frequency in kHz used by the server when opening the local probe. Client commands may still set their own frequency during the remote connect sequence. .TP \-\-verbose[=\f[I]LEVEL\f[R]] Enable verbose logging. If \f[I]LEVEL\f[R] is omitted, debug logging is enabled. .TP \-\-help Print usage information. .SH EXAMPLES Serve the first local ST\-LINK on the default loopback address: .IP .EX $ st\-server .EE .PP Serve a specific probe on all IPv4 interfaces: .IP .EX $ st\-server \-\-serial 57FF72067265575742132067 \-\-bind=:4500 .EE .PP Use an SSH tunnel to keep \f[I]st\-server\f[R] bound to loopback. On the host with the probe, run: .IP .EX $ st\-server .EE .PP On the laptop, forward the port and use the tunnel: .IP .EX $ ssh \-N \-L 4500:127.0.0.1:4500 pi\(atraspberrypi & $ st\-flash \-\-remote 127.0.0.1:4500 write firmware.bin 0x08000000 $ st\-info \-\-probe \-\-remote 127.0.0.1:4500 $ st\-util \-\-remote 127.0.0.1:4500 .EE .PP Serve two probes concurrently (one \f[I]st\-server\f[R] per probe, on different ports): .IP .EX $ st\-server \-\-serial aaa \-\-port 4500 $ st\-server \-\-serial bbb \-\-port 4501 .EE .SH SECURITY The protocol has no authentication or encryption: a client that can reach the port has full debug and flash control of the probe. The default loopback bind (\f[I]127.0.0.1\f[R]) avoids exposing the probe to the network. Use an SSH tunnel for remote access, or use \f[I]\(enbind=0.0.0.0\f[R] only on a trusted, isolated network. .SH RECOVERY If \f[I]st\-server\f[R] is killed during a flash operation, normal \f[I]SIGINT\f[R] and \f[I]SIGTERM\f[R] shutdown paths close the ST\-LINK handle cleanly. A forced kill, process crash, or USB firmware fault can still leave the ST\-LINK unresponsive. If local tools such as \f[I]st\-info \(enprobe\f[R] also hang, reset the USB device with a tool such as \f[I]usbreset\f[R] or physically replug the probe. .SH SEE ALSO st\-flash(1), st\-info(1), st\-util(1), st\-trace(1) .SH COPYRIGHT This work is copyrighted. Stlink contributors. See \f[I]LICENSE\f[R] file in the stlink source distribution.