Using Herdr from a phone
By Flavio Copes
Connect to a persistent Herdr session from a phone over SSH, use the narrow-screen interface, and safely check running coding agents.
You can use Herdr from a phone without a Herdr mobile app.
You do not need a browser dashboard either.
Install an SSH client on the phone, connect to the machine where Herdr and your coding agents run, then start or reattach Herdr:
ssh you@server
herdr
The same persistent terminal session opens on the phone.
Herdr adapts its interface to a narrow terminal, so I can check agents, switch workspaces, answer a question, or confirm that a command finished.
I would not write a large feature from a phone. But it is a great way to check work that is already running.
What you need
You need three things:
- A machine that stays online.
- Herdr installed on that machine.
- An SSH client on your phone.
The machine can be a VPS, a home server reachable through a secure network, or another computer you control.
The code, credentials, Herdr server, panes, and agents all remain on that machine. The phone is only an SSH terminal connected to it.
On iPhone, the Herdr documentation shows Moshi. Other iOS and Android SSH clients work too. Choose one that supports SSH keys and gives you easy access to Control, Escape, Tab, and arrow keys.
If SSH is new to you, my free SSH course covers keys, host verification, config files, and remote commands.
Prepare the remote machine
Install Herdr on the machine where the work will run.
On Linux or macOS:
curl -fsSL https://herdr.dev/install.sh | sh
Verify it:
herdr --version
Start a project session:
cd ~/projects/my-app
herdr
Run your coding agent, development server, or tests inside panes.
Detach with ctrl+b, then q.
The Herdr server and pane processes keep running after you leave the terminal.
Configure SSH keys
Typing a long server password on a phone is annoying and weakens the workflow.
Use an SSH key protected by the phone’s secure storage or biometric controls.
Add the public key to the remote account’s ~/.ssh/authorized_keys file.
Before you depend on the mobile connection, test it:
ssh you@server
The first connection shows the server host key. Verify the fingerprint through a trusted channel before accepting it.
Do not copy a private SSH key into chat, a note, or the project repository.
Connect and open Herdr
From the phone’s SSH client:
ssh you@server
herdr
If Herdr is already running, herdr attaches to it.
If no server is running, Herdr starts one.
You do not need to manage a socket or remember a generated session name for the default workflow.
For a named session:
herdr session list
herdr session attach work
Named sessions are useful when you want completely independent Herdr servers. For most people, separate workspaces inside the default session are simpler.
Use an SSH config name
A short host name saves a lot of typing.
On a computer, the SSH config might contain:
Host workbox
HostName server.example.com
User you
Port 2222
IdentityFile ~/.ssh/id_ed25519
Many mobile SSH apps have an equivalent host profile interface.
Then the connection becomes:
ssh workbox
herdr
The app stores the host, port, user, and key association. You still verify the server identity the first time.
Navigating on a small screen
Herdr keeps the terminal view real and changes the surrounding workspace interface when the screen is narrow.
I use the phone for a few focused actions:
- open the workspace switcher
- see which agent is blocked or done
- focus one pane
- read the last part of its output
- answer a short question
- approve a command I understand
- detach again
The default prefix is ctrl+b.
Useful keys are:
| Action | Keys |
|---|---|
| Workspace navigation | ctrl+b, then w |
| Next tab | ctrl+b, then n |
| Previous tab | ctrl+b, then p |
| Zoom active pane | ctrl+b, then z |
| Show active bindings | ctrl+b, then ? |
| Detach | ctrl+b, then q |
Use the SSH app’s extra keyboard row if your phone keyboard does not expose Control or Escape.
The keys are sequential. Press ctrl+b, release it, then press the second key.
A practical mobile workflow
I start the real task from a laptop or desktop:
cd ~/projects/my-app
herdr
In one pane I run the agent:
codex
In another pane I run the development server:
npm run dev
Then I detach:
ctrl+b, then q
Later, from the phone:
ssh workbox
herdr
The original processes are still there.
I check the sidebar. If the agent is blocked, I focus the pane and read the question. If it is done, I read the summary. If the development server failed, I inspect its last output.
Then I detach again.
This is the kind of mobile access I want. It is not a smaller desktop development environment. It is a secure window into a persistent one.
Normal SSH or herdr —remote?
Herdr supports two remote workflows.
The phone-friendly path is normal SSH:
ssh you@server
herdr
The shell, Herdr client, server, agents, and panes all run remotely.
From a laptop, I can instead use Herdr’s local thin client:
herdr --remote workbox
That command starts locally and connects to the remote Herdr server over SSH. It keeps local keybindings and can bridge a local clipboard image to the remote machine.
On a phone, the normal SSH-first path is simpler and does not require a local Herdr binary.
What happens if the connection drops?
The SSH client can disappear without killing the Herdr server.
Your phone may switch networks, go to sleep, lose reception, or terminate the SSH app. The attached client goes away, but the server-owned panes keep running.
Reconnect:
ssh workbox
herdr
You return to the live terminals.
This is the same property that makes Herdr useful on an unreliable laptop connection.
Remember that persistence depends on the Herdr server and remote machine remaining alive. A server reboot is different from a dropped SSH connection.
After a full Herdr server restart, Herdr restores the workspace shape. Arbitrary processes do not survive. Supported agent conversations can resume when an official integration recorded their native session IDs.
Detach when you are done
Press ctrl+b, then q.
This closes the Herdr client and leaves the session running.
Do not run:
herdr server stop
That stops the session and exits its pane processes.
If you simply close the SSH app, the server should still remain alive. I prefer the explicit detach because it makes my intention clear and returns me to the remote shell cleanly.
The important distinction is simple: detach leaves the work running, while stopping the server ends the pane processes.
Security checklist
A persistent agent session can access your code and the credentials available to its remote user.
Before exposing SSH:
- use key-based authentication
- protect the phone with a passcode and biometric lock
- keep the SSH app and operating system updated
- verify host keys
- use a non-root account
- restrict inbound network access where practical
- remove a lost phone’s public key from
authorized_keys - review agent approval prompts instead of accepting them blindly
Herdr does not add a hosted account or web control plane. That reduces one class of exposure, but the SSH service is still an important security boundary.
Troubleshooting
The phone cannot connect
Make plain SSH work first.
Check the host, port, user, key, firewall, and whether the remote machine is online.
Herdr is not found
The non-interactive or remote shell may have a different PATH.
Check:
command -v herdr
If needed, add the install directory to the remote shell’s PATH and reconnect.
Control keys are hard to enter
Enable the SSH app’s accessory keyboard row or remap the Herdr prefix to a chord the app can send reliably.
Open the active binding list with ctrl+b, then ? before changing the configuration.
The screen is too cramped
Zoom the pane you need with ctrl+b, then z.
Use workspace navigation instead of trying to keep several panes visible at once. Rotate the phone to landscape when you need more columns.
My recommendation
Set this up before you need it.
Create the SSH key, verify the server fingerprint, start Herdr, detach, and test the complete reconnect flow from the phone.
Then use it for short interventions.
Check an agent. Answer a question. Confirm a deployment. Read a failing log. Detach.
The official mobile workflow is documented in How to work with Herdr.