How can I keep Termius sessions alive in the background on iOS/iPadOS?

This article explains why sessions disconnect and port forwarding stops after you send the app to the background on iOS or iPadOS. It also covers a few ways to reduce the impact.

Termius, like most other apps, cannot keep running in the background because of iOS and iPadOS restrictions. Recent versions stop background activity almost immediately, usually within 20 to 30 seconds. Older versions could allow it for 2 to 3 minutes.

These restrictions help preserve battery life and device performance. They can also interrupt SSH sessions and port forwarding. Here are a few ways to work around that.

Location tracking

When you connect in Termius, the app logs the session. This log gives you an activity history and lets you add previous sessions as hosts.

If you enable location tracking, you can also see where a connection was made on a map. As a side effect, background connections are less likely to be interrupted.

Split view on iPad

On iPad, you can use Split Viewarrow-up-right to keep Termius open alongside another app.

screen / tmux

screenarrow-up-right or tmuxarrow-up-right can preserve your terminal session if the connection drops. However, they do not help if the app goes to the background while port forwarding is active.

tmux and screen may not be available on some devices, especially routers and switches.

Note: You can use a startup snippetarrow-up-right to launch tmux or screen automatically when you connect.

Last updated

Was this helpful?