# 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 View](https://support.apple.com/en-us/HT207582) to keep Termius open alongside another app.

### screen / tmux

[`screen`](https://en.wikipedia.org/wiki/GNU_Screen) or [`tmux`](https://en.wikipedia.org/wiki/Tmux) 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 [snippet](https://support.termius.com/hc/en-us/articles/4402057170457) to launch `tmux` or `screen` automatically when you connect.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.termius.com/help-center/faq/how-can-i-keep-termius-sessions-alive-in-the-background-on-ios-ipados.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
