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

This article explains why you've found your session lost or a port forwarding rule disconnected after you put the app to the background and presents a few tips that might help you to overcome the issue.

Termius, like most other apps, can't run in the background due to a restriction of iOS / iPadOS. Recent versions of iOS / iPadOS stop the app's background processes almost immediately (in 20 or 30 seconds), while older versions would allow them to run for 2 to 3 minutes.

That restriction exists for good reasons: to improve battery usage and performance of your device. However, it may present an obvious problem for users of Termius. Below are a few recommendations to overcome it.

### Location tracking

When you make a connection in Termius, your session will be logged, and the resulting log which provides a log of activity and allows you to add these past sessions as hosts.

If you [enable location tracking](https://support.termius.com/hc/en-us/articles/4402044543897#location), it will also allow you to see on a map the exact location where a connection was made. As a side effect of turning on location tracking, your background connections will no longer be interrupted.

### Split view on iPad

On an iPad, you can utilize [split view](https://support.apple.com/en-us/HT207582) for running Termius and another app simultaneously.

### screen / tmux

[screen](https://en.wikipedia.org/wiki/GNU_Screen) or [tmux](https://en.wikipedia.org/wiki/Tmux) can prevent losing the content of the terminal screen when the connection is lost. However, this tip isn't helpful, when you switch to the background and a port forwarding rule is active.

tmux and screen may not be supported on some devices. Those typically include routers and switches.

**Note:** With the help of a startup [snippet](https://support.termius.com/hc/en-us/articles/4402057170457), you can make tmux or screen start upon connection.
