aboutsummaryrefslogtreecommitdiff
path: root/website/src/content/docs/persistence-remote.mdx
blob: 2c157b4e4e1ae9fced54b9edfbe3788e26c2d39a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
title: Persistence and remote access
description: Detach from Herdr, reattach later, use named sessions, and connect over SSH.
---

Herdr keeps panes running in a background server. Your terminal client can detach and reconnect later.

## Detach and reattach

Start Herdr:

```bash
herdr
```

Detach the client with `ctrl+b q`.

Your panes and agents keep running. Reattach by running Herdr again:

```bash
herdr
```

Stop the default server when you want to end the session:

```bash
herdr server stop
```

## Named sessions

Use named sessions when you want independent Herdr servers.

```bash
herdr session list
herdr session attach work
herdr session attach side-project
herdr session stop work
herdr session delete side-project
```

A named session has its own panes, tabs, workspaces, sockets, and runtime state. It still shares the same global config file.

Use `--json` for scripts:

```bash
herdr session list --json
herdr session stop work --json
herdr session delete side-project --json
```

## Remote attach over SSH

Run Herdr on a server and attach from any SSH client:

```bash
ssh you@server
herdr
```

You can also attach through SSH from your local machine:

```bash
herdr --remote workbox
herdr --remote ssh://you@server:2222
```

For repeat targets, use your SSH config:

```text
Host workbox
  HostName server.example.com
  User you
  Port 2222
```

Then attach with:

```bash
herdr --remote workbox
```

## Remote named sessions

Use `--session` with `--remote` to attach to a named session on the remote host:

```bash
herdr --remote workbox --session agents
```

## Direct terminal attach

Full Herdr attach opens the whole workspace UI. Direct attach opens one server-owned terminal in your current terminal.

Attach by agent target:

```bash
herdr agent attach reviewer
```

Attach by terminal ID:

```bash
herdr terminal attach term_abc123
```

Direct attach streams the current rendered terminal state, then live ANSI frames. Input goes straight to that terminal.

Detach with `ctrl+b q`. Send a literal `ctrl+b` with `ctrl+b ctrl+b`.

Only one writable direct attach client owns input and resize for a terminal. Use `--takeover` to replace an existing owner:

```bash
herdr terminal attach term_abc123 --takeover
```

## Single-process escape hatch

Use `--no-session` to run Herdr without the background server/client split:

```bash
herdr --no-session
```

This is mainly an escape hatch for debugging or compatibility. The default persistent session mode is the normal path.