Docker terminal session resets on tab switch or navigation
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 37.4k
- Forks
- 3k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 73
Description
To Reproduce
The terminal session for a running container is not persistent when navigating away from the "Terminal" tab or switching between browser tabs. When returning to the terminal, the session appears to re-initialize (or reset), causing any running process or shell history in that specific session to be lost.
Steps to Reproduce
Navigate to a specific Application or Service.
Open the Terminal tab and connect to a container (e.g., using /bin/sh).
Switch to a different tab in your web browser.
Return to the Terminal tab.
Observe that the terminal connection has reset or cleared the previous state.
Expected Behavior
The terminal session should remain active in the background (within a reasonable timeout) so that switching tabs doesn't terminate the interactive shell session.
Environment Information
OS: Alpine Linux (inside the container)
Shell: /bin/sh
Deployment Tool: Dokploy
Additional Context
This behavior makes it difficult to monitor long-running commands or maintain a workflow when needing to check logs or configurations in other tabs simultaneously.
Current vs. Expected behavior
Current Behavior: The terminal session terminates immediately when the UI component is unmounted (switching to another tab in the dashboard) or when the browser focus changes. Upon returning to the tab, the terminal reloads from scratch, losing the previous shell state, active processes, and output history.
Expected Behavior: The terminal should persist in the background, or at least remain active while the browser tab is open, allowing the user to navigate between different sections of the Dokploy dashboard without losing the active shell session.
Provide environment information
Operating System: Windows 11
Dokploy Version: v0.28.8
Which area(s) are affected? (Select all that apply)
Installation
Are you deploying the applications where Dokploy is installed or on a remote server?
Same server where Dokploy is installed
Additional context
No response
Will you send a PR to fix it?
No
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the Terminal tab's session lifecycle and reproduce the issue with a running Docker container using /bin/sh, then switch browser tabs and dashboard sections. Trace what happens when the terminal UI is unmounted and identify how the session is re-established. Done means the interactive shell, running processes, history, and output remain available after returning within the browser session.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, shell, typescript
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100