HynoR 81b72d9b7d feat: Implement server-side SSH session persistence and recovery (#13707)
* feat(terminal): keep ssh sessions alive server-side with reattach

Split the terminal ws handling into a Session (pty + ssh backend) and an
Attachment (one websocket). A session outlives its websocket: a clean close
(1000) ends the pty, any other disconnect keeps it for a 30-minute grace
period and it can be reattached via `?session=<id>`. Output goes through a
fixed 128KB ring buffer so a reattaching client gets the recent tail, with a
truncation marker if it fell behind. Sessions are owner-scoped; a second
attachment kicks the first (4409), unknown ids get 4404.

New endpoints under /hosts/terminal/sessions (search, close) let the
frontend list and recover sessions after a tab or browser is closed.

* feat(terminal): floating terminal dock with session recovery

Terminals now live in a layout-level host and are teleported into whichever
view shows them, so leaving the terminal page no longer kills them. A dock
handle on the right edge opens a non-modal dialog from any page with every
live session, a picker for local shell / ssh hosts, minimize, and
close-all. On page load the store recovers sessions the server still holds,
so an accidentally closed tab or browser can resume within the grace period.
The menu-tab label shows the live session count.

* fix(terminal): page re-claims its slots under a locked menu tab

With the terminal menu tab locked (keep-alive), leaving the page deactivates
it instead of unmounting it, so the slot ref callback never re-runs on
return. After the dock had taken the Terminal over and released it, nobody
claimed it for the page again and it stayed parked in the hidden host.

Claim/release slots explicitly on mount, activated, deactivated and unmount,
the same ownership rule the dock uses, instead of relying on the ref callback.

* fix(terminal): logout closes every kept-alive terminal session

A logged-out panel has nobody watching it, so nothing it left running should
survive: core now tells the local agent to close all terminal sessions when the
user logs out, changes the password, or changes the bind domain. Until now the
teardown relied on the logging-out tab sending close code 1000; a second tab or
a websocket held outside the SPA kept its shell after logout.

Agent: terminal.CloseAll and POST /hosts/terminal/sessions/closeAll.
Core: LogOut / deleteCurrentSession / BindDomain call it via proxy_local,
best effort.

* fix(terminal): pin a local shell to the node it was opened on

The node a local shell connects to was resolved from the current node every
time the websocket was built, so after switching nodes a reconnect carried the
old session id to the new node (4404) and then opened a shell there instead.
Store the operateNode on the entry when it is created; ssh shells keep going to
the master. Shells on a non-master node get the node name in their title so a
restore in another node's view can tell them apart.
2026-09-07 15:01:35 +08:00
2025-03-05 17:47:19 +08:00
2025-07-07 12:09:52 +08:00
2024-04-07 11:59:42 +08:00
2026-05-21 18:20:06 +08:00
2025-07-07 12:09:52 +08:00
2022-08-17 09:37:30 +08:00
2026-05-26 10:28:49 +08:00
2025-03-05 17:47:19 +08:00

1Panel

Loved by a global community of 2.5M+ self-hosters.

1Panel-dev%2F1Panel | Trendshift

License: GPL v3 Discord GitHub release Stars

English 中文(简体) 日本語 Português (Brasil) العربية Deutsch Español français 한국어 Bahasa Indonesia 中文(繁體) Türkçe Русский Bahasa Melayu Persian ພາສາລາວ


What is 1Panel?

1Panel is a modern, open-source Linux server management panel and a lightweight AI management platform. Through an intuitive web interface, it provides users with comprehensive, one-stop server management capabilities:

  • AI Management: Offers a unified management platform from bare metal to agents (Metal-to-Agent). It integrates an AI gateway, and Skills Hub, while supporting centralized management of agents and models.
  • Efficient Visual Operations: Easily manage Linux servers through a web-based GUI, streamlining tasks such as host monitoring, file management, database management, and container management.
  • Rapid Website Deployment: Deeply integrates with popular website builders like WordPress and Halo. It enables one-click domain binding and SSL certificate configuration, significantly lowering the barrier to website creation.
  • Curated App Store: Features a built-in store of high-quality open-source applications, providing one-click installation and upgrade services to effortlessly extend server capabilities.
  • Enterprise-Grade Security: Deploys applications based on container technology to effectively minimize vulnerability exposure. It also provides security features such as WAF and log auditing to ensure comprehensive server protection.
  • One-Click Data Backup: Supports one-click backup and restoration, and integrates with various cloud storage solutions to ensure data security and prevent loss.

Why 1Panel?

1Panel cPanel / Plesk aaPanel Webmin
Free & open source Partial
AI management
One-click app marketplace 165+ apps
Modern UI (post-2020) Partial
Docker / container management
Active development Slow

Quick Start

Prepare your Linux server and run the following script:

bash -c "$(curl -sSL https://resource.1panel.pro/v2/quick_start.sh)"

After installation, open http://<your-server-ip>:<port>/<security-path> in your browser.
Run 1pctl user-info via SSH if you need to retrieve your access credentials.

Screenshot

1Panel UI

Pro Edition

1Panel OSS is free forever. 1Panel Pro and Ent adds features built for teams and production workloads:

Feature OSS Pro Ent
One-click app installs
AI agents (OpenClaw) 5 agent Unlimited
WAF & advanced security Basic
Website tamper protection
Website uptime monitoring
Multi-node management
Custom logo & theme
KVM Web UI
AI Gateway
Priority support

Community & Support

Security

Found a vulnerability? Please read SECURITY.md before disclosing.

License

Licensed under the GNU General Public License v3.0.

S
Description
🔥 1Panel is a modern, open-source Linux server management panel and a lightweight AI management platform.
Readme GPL-3.0
142 MiB
Languages
Go 73.1%
Vue 26.8%