Skip to content

Docker terminal: a selection cannot be copied to the clipboard on Linux/Windows #5640

Open

Description

@diallosouleymane

To Reproduce

  1. Open a project, go to the Docker Terminal tab and pick a container.
  2. Run any command that prints output, for example ls -la or psql -U postgres -c "\dt".
  3. Select part of the output with the mouse. The selection highlights correctly.
  4. Try to copy it. Ctrl+C sends SIGINT to the running process. Ctrl+Shift+C is caught by the browser and opens DevTools, never reaching the page. Right-click offers nothing. The selection stays where it is.

Current vs. Expected behavior

Current: nothing reaches the clipboard. The only ways to get the output out of the browser are retyping it or taking a screenshot.

Expected: a selection can be copied, the way every other web terminal allows.

Provide environment information

dokploy 0.26.6
Chrome on Linux

Which area(s) are affected? (Select all that apply)

Other (Docker terminal, and the web server terminal shares the same code path)

Are you deploying the applications where Dokploy is installed or on a remote server?

Same server where Dokploy is installed

Additional context

This still looks present on main, not only on the version above.

apps/dokploy/components/dashboard/docker/terminal/docker-terminal.tsx loads ClipboardAddon, but that addon only implements OSC 52, meaning a copy requested by the remote program. It binds no user-facing shortcut. The single attachCustomKeyEventHandler in the component is fixMacOsAltKeys, which handles the Alt key on macOS and nothing else.

xterm.js registers no copy shortcut by default, so on Linux and Windows a selection has no route to the clipboard. On macOS Cmd+C is handled by the browser, which may be why this went unnoticed.

apps/dokploy/components/dashboard/settings/web-server/terminal.tsx has the same shape: ClipboardAddon and no key handler at all.

The usual keyboard answer, Ctrl+Shift+C, is not available here: browsers reserve it for DevTools and a page cannot intercept it. What would work, in rough order of effort:

  • copy on selection, by writing term.getSelection() to the clipboard from onSelectionChange;
  • a Ctrl+Insert handler, which no browser reserves;
  • an explicit copy button next to the terminal, or a right-click menu entry, which also covers users with no Insert key.

Activity

  1. linear-code commented on Oct 10, 2026

    @linear-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions