dstack icon indicating copy to clipboard operation
dstack copied to clipboard

[Feature]: Allow remote port forwarding for dev-environment

Open dmelikyan opened this issue 1 month ago • 2 comments

Problem

There are use cases that may require remote port forwarding to the local machine. For example, developing/testing an SDK on a GPU machine that sends data to the collector running on a local machine.

Solution

Add remote_ports to YML and to CLI, similar to ports.

remote_ports: 
    - REMOTE_PORT:LOCAL_PORT

Workaround

Add RemoteForward to ~/.dstack/ssh/config after dstack apply and dstack attach.

e.g. RemoteForward 8082 localhost:8082

Would you like to help us implement this feature by sending a PR?

Yes

dmelikyan avatar Nov 04 '25 16:11 dmelikyan