Services on your computer
A workstation can reach a service that runs on your computer, such as a local model server, as if the service ran on the workstation.
A workstation can reach a service that runs on your computer, such as a local model server,
as if the service ran on the workstation. You declare the port, and the workstation connects to
its own 127.0.0.1. This is the opposite direction from a port forward, which carries a
workstation’s service to your computer.
Reverse ports
A reversePorts entry in a LocalBinding carries one TCP port from your computer into the
workstation. The workstation listens on its own 127.0.0.1:<remotePort>. Every connection a
program there makes is carried back over the background service’s SSH connection to
127.0.0.1:<localPort> on your computer. remotePort defaults to localPort.
It works on every provider the background service connects to, cloud workstations included, for as long as the service holds its connection. The listener lives inside the workstation, so it closes with the connection and opens again when the connection returns. Every program on the workstation can reach the port, which is the point.
A vz workstation on a Mac and an hcs workstation on a Windows PC don’t reach your computer’s
own 127.0.0.1. A reverse port is how they reach your service.
Reach a service on your Mac
and Reach a service on your PC
cover each.
The listener is on the workstation’s loopback address, so a container on Docker’s default
bridge network doesn’t reach it. A container started with docker run --network host does.
Reverse forwards on a shared workstation
Ringleader never carries a service on your computer into a workstation that someone shared
with you. Only the owner of a computer can decide which of its services a workstation may
reach. A LocalBinding that matches only shared workstations reports the reason
SharedWorkstation.
For the same reason, a workstation’s defaultLocalBinding template can’t declare reverse
forwards. Write a LocalBinding on your computer instead.
Reach a service on your computer
To use a model server that runs on your computer from a workstation, add its port to a
LocalBinding. This example carries port 11434 into my-box:
apiVersion: core.ringleader.dev/v1
kind: LocalBinding
metadata:
name: ollama
namespace: local
spec:
workstationSelector:
matchName: my-box
reversePorts:
- localPort: 11434 # the service on your computerApply the file with rl apply -f. Programs on the workstation then reach the service at
127.0.0.1:11434. To see the forward, run rl binding show. It reads
host:11434 → 11434, with your computer’s port first.
Next steps
- LocalBinding lists the
reversePortsfield and what the binding’s status reports. - Port and socket forwarding carries a workstation’s ports and sockets to your computer.
- Files and accounts your computer keeps from the agent says what a workstation can and can’t reach on your computer.