Skip to main content
Solr, Traefik’s dashboard, migration-only application routes, and similar interfaces are often available only inside a network. port-forward maps one or more of those service ports to loopback ports on your workstation without adding a public ports: entry to the project. port-forward is a core sitectl command. It works for local and remote contexts and is not provided by an application plugin. At least one LOCAL-PORT:SERVICE:REMOTE-PORT mapping is required.

Reference

Access a Docker Compose service without publishing its port on the host. Every listener is bound to 127.0.0.1. Remote contexts forward over SSH, local Linux contexts use the container network directly, and local Docker Desktop contexts stream through BusyBox nc inside the selected service container. As an example, from a local machine, accessing your stage context’s traefik dashboard and solr admin UI could be done by running this command in the terminal: sitectl port-forward
8983:solr:8983
8080:traefik:8080
8161:activemq:8161
--context stage
Then, while leaving the terminal open, in your web browser you can visit http://localhost:8983/solr to see the solr admin UI http://localhost:8080/dashboard to see the traefik dashboard (assuming it’s enabled in your config) http://localhost:8161/admin/queues.jsp to see ActiveMQ queues Be sure to run Ctrl+c in your terminal when you are done to close the connection.

Transport and exposure

Every local listener binds to 127.0.0.1, so the forward is reachable from the same workstation but is not published to its LAN interfaces. Services are identified by their service name and must already have a running container. Docker Desktop forwarding also requires the service image to provide BusyBox nc; LibOps application images include it. The command fails if a requested local port is already occupied. Leave the command running while you use the forwarded endpoints. Press Ctrl+C to close every listener and active connection.