Config · Command line

The command line.

Day-to-day, everything happens in the browser. The daymug command is for the rest: checking an install, upgrading, adding the first user, resetting a password. It lives at ~/.daymug/daymug — run it as the same (non-root) user that installed DayMug.

Common tasks

Find what you want to do, copy the command.

I want to…Run
Check that everything is set up right~/.daymug/daymug doctor
See whether the service is running~/.daymug/daymug status
Restart after editing config.yamlsystemctl --user restart daymug.servicelaunchctl kickstart -k "gui/$(id -u)/com.daymug.daymug"
Check config.yaml before restarting~/.daymug/daymug check-config
Upgrade to the latest release~/.daymug/daymug upgrade — or one click in Settings
Undo the last upgrade~/.daymug/daymug upgrade --rollback
Create a user (or the first admin)~/.daymug/daymug user add alice --email alice@example.com --admin
Reset someone's password~/.daymug/daymug user passwd alice
See which version is installed~/.daymug/daymug version
Remove DayMug~/.daymug/daymug uninstall

All commands

~/.daymug/daymug help prints the same list. Commands that read the database or config take --config PATH; without it they use the config.yaml next to the binary.

Check and inspect

daymug doctor

Checks everything DayMug needs and prints one line per item — ✓ fine, ! warning, ✗ must fix — each failure with the command that fixes it: an agent runtime (Claude Agent SDK or Codex), the config file, the service (installed, enabled, running), lingering on Linux, and whether the server answers. Exits non-zero if anything is ✗. Run this first when something is wrong.

OptionWhat it does
--config PATHUse this config file instead of config.yaml next to the binary (also settable with DAYMUG_CONFIG).

daymug status

Shows the state of the background service (systemd user unit on Linux, LaunchAgent on macOS).

daymug check-config

Loads and validates config.yaml without starting anything, and stops at the first error. Use it before a restart; the self-upgrade also runs it with the new version before switching.

OptionWhat it does
--config PATHUse this config file instead of config.yaml next to the binary (also settable with DAYMUG_CONFIG).

daymug version

Prints the installed version. --version and -v work too.

Run and stop

daymug serve

Runs the server in the foreground — this is what the background service starts. You rarely need it directly; use the service commands on the operations page instead.

Ctrl-C stops it. A bare SIGTERM is ignored unless systemd is stopping the unit, so a stray kill from an agent's shell can't take the server down. Set DAYMUG_HONOR_SIGTERM=1 for supervisors that only send SIGTERM.

daymug stop

Gracefully stops a server started from this binary: running tasks get time to finish first.

OptionWhat it does
--timeout 90sHow long to wait for running work to drain. Default 90s.

Upgrade

daymug upgrade

Downloads the latest release, checks it, swaps the binary and restarts the service. If the new version does not come up healthy in time, the previous one is put back automatically.

OptionWhat it does
--version vX.Y.ZInstall this exact release instead of the latest — also works to go back to an older one.
--rollbackRestore the previous binary and restart. Can't be combined with --version.
--config PATHUse this config file instead of config.yaml next to the binary (also settable with DAYMUG_CONFIG).
~/.daymug/daymug upgrade                    # latest
~/.daymug/daymug upgrade --version v1.2.3   # a specific release
~/.daymug/daymug upgrade --rollback         # undo the last upgrade

daymug upgrade-watchdog also exists; the upgrade starts it by itself to watch the new version. Don't run it by hand.

Users

daymug user add <username> --email EMAIL

Creates a user who can sign in, and asks for their password. The username must be the part of the email before @. Handy for the very first admin, or when the browser is out of reach; normally admins add people under Settings → Administration → Users.

OptionWhat it does
--email EMAILRequired. Its part before @ must equal the username.
--adminMake the user an administrator right away.
--work-dir PATHAbsolute path of their work folder. Default: users.default_home_root/<username>.
--config PATHUse this config file instead of config.yaml next to the binary (also settable with DAYMUG_CONFIG).
~/.daymug/daymug user add alice --email alice@example.com --admin

daymug user passwd <username>

Sets a new password for a user (asks for it). Use it when someone — including you — is locked out.

OptionWhat it does
--config PATHUse this config file instead of config.yaml next to the binary (also settable with DAYMUG_CONFIG).

Lost admin rights instead of a password? Put the username under admin.bootstrap_usernames in config.yaml and restart — see the field reference.

Install and remove

daymug bootstrap

What the installer runs for you: checks prerequisites, lays out ~/.daymug/, then registers and starts the background service (a running one is restarted on the new binary). Safe to run again — an existing config.yaml is kept.

OptionWhat it does
--force-configWrite a fresh config.yaml even if one exists.
--skip-serviceDon't register the background service.
--no-startLinux: install the service unit but don't enable or start it.

daymug init

Creates config.yaml, data/ and users/ in the current folder — for unusual layouts where you don't want bootstrap.

OptionWhat it does
--forceOverwrite an existing config.yaml.

daymug uninstall

Stops and removes the background service. Your config, database and users' folders in ~/.daymug are kept.

OptionWhat it does
--purgeAlso delete the whole install folder — asks first.
--yesDon't ask before --purge deletes anything.

Installer options

The one-line installer accepts options after bash -s --. Re-running it is safe: the binary is replaced, your config.yaml is kept.

curl -fsSL https://github.com/DayMug/DayMug/releases/latest/download/install.sh | bash -s -- --yes
OptionWhat it does
vX.Y.ZInstall this release instead of the latest.
--yesInstall missing dependencies (the Claude Agent SDK) without asking.
--no-depsNever install dependencies.
--skip-serviceDon't register the background service.
--no-startLinux: install the service unit but don't start it.

Environment & files

VariableWhat it does
DAYMUG_CONFIGPath of the config file. Default: config.yaml next to the binary.
DAYMUG_ADDRListen address; overrides server.addr.
DAYMUG_HONOR_SIGTERMSet to 1 to let a plain SIGTERM stop daymug serve.
PathWhat's there
~/.daymug/daymugThe program
~/.daymug/config.yamlSettings — see Editing config.yaml
~/.daymug/data/database.dbDatabase: users, agents, conversations
~/.daymug/logs/daymug.logServer log
~/.daymug/users/Each user's work folder