Set Up a Headless Remote Daemon
notecove install-headless installs the headless NoteCove daemon on a remote machine as a
user-level service (systemd on Linux, launchd on macOS). The daemon runs the same local
command-server stack the desktop app uses — just without a window — so notecove note create,
notecove task create, and the rest of the CLI work locally on the remote, against a local
copy of your Space, with no network round-trip to your Mac.
The daemon and data sync are two independent pieces:
- The daemon (this page) gives the remote a CLI it can run entirely on its own.
notecove link --ssh user@host(a separate, already-standalone tool — see Sync Storage Directories via SSH or Locally) is what actually replicates your Space’s notes and tasks to and from that remote.
You need both: install the daemon so the remote has a CLI to run, then run notecove link from
your Mac so the remote’s copy has real data in it and stays current.
This is the right setup when you have a remote Linux server or Mac mini running Claude Code or other long-lived agent sessions and you want the agent to run NoteCove’s CLI directly on that machine, reading your latest notes reliably even after you’ve edited them on your Mac.
How it differs from notecove serve
notecove serve --ssh |
Headless daemon + notecove link |
|
|---|---|---|
| Works when disconnected | No — CLI dies when the tunnel drops | Yes — full read/write against the local copy |
| Sync when connected | Instant (socket-forwarded, no local copy at all) | Near real-time, file-watch triggered (a background poll every 30s is the backstop) |
| Remote stores data | No | Yes (local copy of your SD) |
| Setup complexity | Low | Moderate (one-time) |
Use notecove serve for occasional or short-lived remote access. Use the headless daemon +
notecove link for permanent remote machines.
Prerequisites
- SSH access to the remote machine (key-based auth recommended)
- The remote is Linux (x64 or arm64) or macOS on Apple Silicon. Intel Macs aren’t supported — Node.js’s single-executable-application format crashes on startup on macOS x64 due to an upstream, deliberately-unfixed bug (nodejs/node#62893, #60250). Windows isn’t supported at all yet.
- The daemon binary is a self-contained Node.js single-executable-application bundle — it does not need Electron, Chromium, or any system libraries on the remote.
- Nothing else.
install-headlessdownloads a pre-built release matching the remote’s platform/arch from notecove.io the first time it needs one, and caches it locally — no repo checkout, podman, or Xcode required, whether you installed NoteCove from the desktop app or just the CLI.- If you’re running from a NoteCove repo checkout and have already built a release locally
(
headless-release/), that cached build is reused ahead of downloading. - If no download is available for the exact version/platform combination (e.g. you’re on a dev
build between releases) and you’re running from a repo checkout,
install-headlessfalls back to building one on demand, on the machine you run the command from (not the remote): building a Linux target requires podman on that machine (per-architecture cross-build containers); building the darwin/arm64 target requires running the command itself from a Mac. - To skip both of those and use a specific pre-built or beta binary instead, pass
--binary; see Installing a local build below.
- If you’re running from a NoteCove repo checkout and have already built a release locally
(
Step 1 — Install the daemon
Run this from anywhere you have the notecove CLI installed (no repo checkout needed):
notecove install-headless --ssh user@remotehost
NoteCove will:
- Detect the remote’s platform and architecture (
uname -s/uname -mover SSH) - Resolve a release for that platform/arch — a local cached build if you have one, otherwise
downloading a published release from notecove.io (or building one on demand if you’re in a
repo checkout with no download available; see Prerequisites). The authoritative resolution
order lives in
installHeadlessOnRemote’s doc comment inpackages/cli/src/headless-install/orchestrate.ts— this is a summary of it, not a second source of truth. - Package it as a
.tar.gzand copy it to the remote overscp - Extract it into
~/.notecove/headless/versions/{version}/and symlink~/.notecove/headless/currentto it - Create the
--profileprofile on the remote if it doesn’t already exist there (the daemon has no TTY to prompt with, so it needs one waiting for it the first time it starts) - Install and enable a systemd user service (Linux) or launchd agent (macOS) so the daemon starts now and on every login/boot
- As a best-effort convenience, provision a private Node.js runtime and the
notecoveCLI binary on the remote too (the same stepsnotecove install-cliperforms), sonotecove linkhas something to talk to afterward. This step’s failure is only a warning — it doesn’t fail the daemon install, since the daemon itself doesn’t depend on it.
Installing headless daemon on user@remotehost…
✓ headless daemon 1.3.0 running on user@remotehost (linux/arm64)
binary: ~/.notecove/headless/current/notecove-headless
data dir: ~/.notecove/headless/data
Next: run "notecove link --ssh user@remotehost" to connect an SD to it.
The daemon is now running, but its local data directory starts out empty — it has no notes or
tasks until notecove link replicates them in (Step 2).
A caveat on both services: they run at the user level, not system-wide
Both the systemd unit and the launchd agent are installed at the user level
(systemctl --user, ~/Library/LaunchAgents/), not system-wide (systemctl as root,
/Library/LaunchDaemons/) — install-headless only has whatever SSH access it logged in with,
and doesn’t assume passwordless sudo. That has real consequences for when the daemon actually
runs:
- Linux: a user-level systemd unit normally stops the moment your last session for that user
ends — exactly the SSH session you just used to install it.
install-headlessrunsloginctl enable-linger $USERto keep it running regardless (this needs the normal polkit permission a non-root login user has by default on most distros; the install fails loudly rather than silently if it doesn’t have it). With lingering enabled, the daemon survives logout and reboots normally. - macOS: a LaunchAgent only runs while that user has an active session — console login, or an
SSH session kept open. There’s no equivalent workaround here: a system-wide LaunchDaemon that
runs before any login would need root (
sudo launchctl bootstrap system/...), which this command doesn’t assume it has. This is a known limitation for a headless Mac mini: if the machine reboots and nobody logs in (console or via an SSH session kept alive for this purpose), the daemon won’t start. If you need it to survive an unattended reboot, you’ll need to either keep a login session open yourself or set up a system-level LaunchDaemon by hand with root access —install-headlessdoesn’t do this for you.
Flags
| Flag | Purpose |
|---|---|
--ssh <user@host> (required) |
The remote to install on |
--ssh-opts <opts> |
Extra SSH options, e.g. "-i ~/.ssh/mykey -p 2222" |
--profile <name> |
Profile name for the daemon to use (default: default); created on the remote if it doesn’t already exist |
--yes |
Install a private Node.js runtime on the remote without prompting, if one isn’t already there |
--binary <dir-or-tarball> |
Ship a pre-built release dir or .tar.gz as-is, skipping build-on-demand resolution |
Step 2 — Start the sync link
On your Mac, start the long-running sync process that actually replicates your Space’s data to and from the remote:
notecove link --ssh user@remotehost
Run it in a tmux or screen session so it persists when you close your terminal:
tmux new-session -d -s nc-link 'notecove link --ssh user@remotehost'
notecove link runs in the foreground until you stop it (Ctrl+C). It watches your local SD for
changes via fs.watch and pushes near-instantly, with a 30-second background poll as a backstop.
It reconnects automatically on drops — heartbeats every 10s, declared dead after 30s of silence,
then retries with exponential backoff (5s, 10s, 20s, 40s, up to 60s) until the connection comes
back. You only need to start it once per Mac session.
Linking multiple remotes at once
--ssh is repeatable — list several remotes on the same command and each gets its own
independent connection, syncing in parallel:
notecove link --ssh user@vm1 --ssh user@vm2 --ssh user@mac-mini
Step 3 — Use the CLI on the remote
SSH into the remote and use the CLI normally:
notecove note show "Sprint Plan"
notecove task create "Investigate the auth bug" --project BACK
notecove note create --title "Agent session 2026-10-31"
The daemon serves all CLI requests over a local Unix socket from its own local copy of your Space — no network needed, but also no access to desktop-app-only features like semantic search, OCR, or embeddings indexing, and no interactive prompts for locked/missing SDs (those are skipped and logged rather than surfaced interactively).
Getting the latest version of a note
If you just edited a note on your Mac, the remote’s local copy catches up automatically —
notecove link pushes changes as soon as it notices them, typically well within a second or two
in practice.
Daemon management on the remote
Check the daemon status (Linux)
systemctl --user status notecove-headless
Restart the daemon (Linux)
systemctl --user restart notecove-headless
View daemon logs (Linux)
journalctl --user -u notecove-headless -f
macOS
launchctl print gui/$(id -u)/com.notecove.headless
launchctl kickstart -k gui/$(id -u)/com.notecove.headless # restart
The launchd agent doesn’t currently redirect stdout/stderr to a log file, so there’s no
journalctl-equivalent log stream on macOS yet.
Installing a local build (beta / pre-release testing)
If you want to ship a build that hasn’t gone through the normal cache/download/build-on-demand
resolution — a pre-built release directory, a CI artifact, or a beta .tar.gz — point --binary
at it instead:
# Ship a pre-built release directory as-is (it's still packaged into a tarball for transfer)
notecove install-headless --ssh user@remotehost \
--binary ./headless-release/1.3.0/linux-arm64
# Ship a pre-built tarball exactly as-is, with no local packaging at all
notecove install-headless --ssh user@remotehost \
--binary ./my-custom-build.tar.gz
Either form skips the normal resolution chain entirely (no download, podman, or Mac-only build
requirement applies). Everything else — upload, service install/restart, the install-cli
convenience step — works identically.
Updating the daemon
When you have a new release available (built fresh, cached from a previous install, or via
--binary), re-run the install command to push it to the remote:
notecove install-headless --ssh user@remotehost
The new version is uploaded into its own ~/.notecove/headless/versions/{version}/ directory
alongside any previous ones (nothing is deleted), the running service is stopped, the current
symlink is swapped to the new version, and the service is restarted. There’s no separate
“upgrade” step or flag — re-running the install command is the upgrade path.
Related documentation
- Sync Storage Directories via SSH or Locally —
notecove link/notecove sync-agentin full, including multi-SD configuration - Remote CLI Access — overview of all the remote access modes
- Agent Workflows — using NoteCove with Claude Code and other agents
- Access NoteCove Remotely — the simpler
notecove serveapproach