Server mode

Make a teammate's computer a quiet server — the screen goes dark after a time you choose, the machine stays awake and keeps working, and everything can be put back exactly

Server mode

A computer in server mode looks off and keeps working. The screen goes dark after a few idle minutes, the machine stays awake on mains power with the lid shut, and long jobs run while you are away.

It is optional, and it is yours to turn on. Nothing turns it on for you: not Setup, not Heal, not an update.

Turn it on

In the Kun app: Settings → General → Server mode.

ControlWhat it does
Server modeOn or off. Turning it on shows the system's own password prompt. Nothing else sees the password
Screen goes dark after5, 10, 15 or 30 minutes. The default is 10
Lock-screen noteOff by default. On macOS it can put one line on the lock screen saying the computer is working
Take tasks while the screen is darkA separate switch, off by default. See below

The line under the switch says what is set now, and what is missing if something is.

From a terminal it is one script, the same on every system:

bash .claude/scripts/server-mode.sh status                       # what is set now; add --json for the app's form
bash .claude/scripts/server-mode.sh apply --minutes 15 --dry-run # what would change; asks for nothing
bash .claude/scripts/server-mode.sh apply --minutes 15           # the system asks for your password
bash .claude/scripts/server-mode.sh rollback                     # put back what this computer had

On Windows without Git Bash: powershell -NoProfile -ExecutionPolicy Bypass -File .claude/scripts/server-mode.ps1 status.

What it changes

SystemScreenStays awakeAsked through
macOSpmset display sleep after your minutesA small loop keeps the Mac awake on mains, lid shut included. It may run exactly two pmset commands without a password. On battery it saves power and sleeps at 10%The macOS password dialog
Windowspowercfg: display off after your minutes on mainsNo sleep and no hibernate on mains. A shut lid does nothing on mains. Battery behaviour is left as it isThe Windows prompt, only if powercfg refuses
LinuxThe GNOME session's idle delay, where there is a sessionA systemd-logind drop-in: a shut lid on external power does nothing, no idle suspend on mainsThe desktop's own prompt (pkexec)

On macOS it also stops macOS from restarting the computer to install a release by itself. Updates still download and security responses still install.

The keyboard light is not touched. On a Mac it goes out with the display. On other laptops it is the maker's own setting: the keyboard's backlight key, or the maker's app.

Putting it back

The first time server mode is applied, the computer's own values are saved in a file only an administrator can write. Rollback restores exactly those and removes the file. Turning the switch off in the app does the same.

A Mac that was set up before this existed has no saved values. It gets the values measured on the first Mac in November, and status says so.

Taking tasks while dark

A dark screen does not mean the computer takes work by itself. That is the second switch. When it is on, a small job checks GitHub every two minutes for tasks addressed to this computer and runs them without asking, with permissions bypassed. Only a task whose author has write access to that repository is run. See Dispatch.

Leave it off unless you want that.

In Setup

Setup lists Server mode (optional). It reads "skipped" until you turn it on, and a skipped step counts for nothing in your readiness. Once you have chosen it, the step is green when the mode is applied and something keeps the computer awake.

What has been run

SystemRun for real
macOSApply, on the owner's Mac. The saved-values rollback has not been run on a second Mac yet
WindowsStatus, the dry runs, one apply and one rollback, on a throwaway CI machine with no lid. The lid step has not been run
LinuxStatus and the dry runs on a CI machine. The apply needs a desktop password prompt and has not been run

The first teammate on Windows or Linux should run apply --dry-run first and read it.

See also