#Is there any way to apt install screen to resume on the webterminal if the connection closes?

6 messages · Page 1 of 1 (latest)

tame torrent
#

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?

twilit hemlockBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> ✅ Mark Solution

tame torrent
#

Likewise, is there anything I could be doing that would cause the webterminal to close?

hollow root
#

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.

tame torrent
#

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)

apt update
apt install screen
enter "y" when prompted
screen
It will take you into a hub, press SPACE to exit, then prompt:
screen -ls
This will list a screen that looks like the codeblock below.
You only want the number at the beginning: 1067 WRITE IT DOWN:

1067.pts-0-e1b2953a1c1f (3/14/25 17:14:14) (Attached)

Now you can do a few things to display more content on the webterminal. To test, you can close your webterminal, reopen and prompt:
screen -r 1067
Enter your screen number here instead of 1067
You should now see your previous screen 🎉