Is there any way to apt install screen to resume on the webterminal if the connection closes?
I'm doing some longer runs for ai training, but one issue I keep running into in the webterminal is the "Connection Closed" notification which leaves me unable to resume where I left off after the pod has run for an hour.
Is there any way to setup a webterminal to resume so that in the event the connection is closed I don't lose all of my work?
4 Replies
Likewise, is there anything I could be doing that would cause the webterminal to close?
How about connecting to the host over SSH from an external terminal like iTerm. You could also add the SSH KEEPALIVE optons on the cmd line (which can also go into ~/.ssh/config:
If you are doing that, add these arguments in the ssh command, like so...
ssh -o ServerAliveInterval=180 -o ServerAliveCountMax=2 and if you are on Windows and use MobaXterm, there is a settings checkbox for keepalive from the client. If you are using Jupyter, I would look for ways to leverage a Jupyter config file, although now I am starting to guess about stuff. Just throwing some ideas out there.
So, I figured it out, but IMO this needs to be added to the runpod docs
How to Setup a Pod Webterminal Screen to Resume:
(do this BEFORE you navigate into further directories, at START of pod)
enter "y" when prompted
screen -ls1067.pts-0-e1b2953a1c1f (3/14/25 17:14:14) (Attached)screen -r 1067```
Enter your screen number here instead of 1067
You should now see your previous screen 🎉
I'm glad you got it figured out! I saved your suggestion to add screen to the docs, it could be really useful for others 🙏🏾