Install OpenLLM
Install the openllm CLI and daemon on macOS or Linux with one curl command, or install the Mac app, then check, update, or uninstall OpenLLM.
Install the openllm CLI and daemon on each machine whose subscriptions or local models you want
to use, or where you want to run clients with openllm <client>. The hosted gateway and the
dashboard need no install. OpenLLM runs on macOS and Linux; there is no Windows build.
Each machine running the daemon counts as a device, and your plan sets how many can be connected at once. See Device limits.
Install the CLI and daemon
-
In the dashboard, open Devices & keys and select Add a device. Copy the install command, which has your key filled in. Or write it yourself with your key:
curl -fsSL https://www.openllm.sh/install | OPENLLM_API_KEY='sk-llm-YOUR_KEY' bash -
Run the command in a terminal. The script needs
curlandshasumorsha256sum, and supports x86-64 and ARM64 processors. It:- downloads
openllmto~/.openllm/binand checks its SHA-256 checksum, - writes your settings to
~/.openllm/.env, - puts
openllmand its short aliasollmon yourPATHand installs shell completion, - registers the daemon as a background service and starts it,
- installs any missing subscription CLIs, such as Claude Code and Codex, in the background
with each vendor's official installer, logging to
~/.openllm/cli-install.log.
It doesn't edit any client's configuration.
- downloads
-
Open a new terminal, or reload your shell's rc file, so
openllmis on yourPATH.
To install without a key, run curl -fsSL https://www.openllm.sh/install | bash. In an
interactive terminal the script then runs openllm start, which asks for your key and starts
the daemon. Otherwise, run openllm start yourself later. To replace the key, run
openllm login.
The daemon listens on port 8787. If that port is taken on a first install, the script picks the
next free port nearby. To choose one, set OPENLLM_DAEMON_PORT before bash.
How the daemon runs
The daemon runs as a launchd agent with the label sh.openllm.daemon, defined in
~/Library/LaunchAgents. It starts when you log in and restarts if it stops.
The daemon runs as the systemd user unit openllmd.service, which restarts it if it stops. To keep it running after you log
out and start it at boot, OpenLLM enables lingering for your user. If it can't, it prints a note;
run:
sudo loginctl enable-linger $USERInstall the Mac app
The Mac app needs macOS 12 or later and runs on Apple silicon and Intel.
- Download it from https://www.openllm.sh/download/mac.
- Open the OpenLLM
.dmgfile from your Downloads folder and drag OpenLLM to Applications. - Open OpenLLM and sign in. After you set up your vault, the app connects this Mac with your
defaultkey. - If the Mac isn't connected, open Get started and select Connect this Mac.
If this Mac already runs a daemon paired with another account or another gateway, the app asks before changing it.
When the app connects a Mac that doesn't have the CLI yet, it runs the same installer as
Install the CLI, so openllm ends up in ~/.openllm/bin and on your PATH.
If openllm isn't found in a terminal, open a new terminal or run ~/.openllm/bin/openllm setup.
Remote terminal sessions stay off for a Mac connected this way. To turn them on, run
openllmd sessions on.
Check that it works
- Run
openllm status. It shows the service registration, whether the daemon is running, and a live status check. - In the dashboard, open Devices & keys. Your machine appears as a device.
- Run
openllm -p "Say hello."and check that a reply prints.
Update OpenLLM
The daemon updates itself automatically. This is on by default. To check or change it:
openllm auto-update status
openllm auto-update off # stay on the installed version
openllm auto-update onTo update right away, run:
openllm updateopenllm update reruns the installer from your configured gateway. It updates the daemon and the
CLI, restarts the daemon only if the binary changed, and keeps ~/.openllm/.env. It doesn't
install subscription CLIs or change your shell setup.
openllm self-update updates only the CLI binary to the gateway's current release. Use
openllm update unless you need only the CLI.
Uninstall OpenLLM
-
Run:
openllm uninstall -
Type
yesto confirm. If this machine has subscription logins, choose whether to keep them. Keeping them lets a later install reuse them.
The command stops and removes the daemon service and its data, reverts the Raycast, ChatGPT
launcher, and Hermes setups made by openllm, removes the PATH links, the shell rc block, and
completion, and deletes the daemon and CLI state under ~/.openllm, including the saved key in
~/.openllm/.env, apart from any logins you keep.
| Flag | Effect |
|---|---|
--yes, -y | Skip the confirmation. Required when there is no terminal. |
--keep-logins | Keep subscription logins for a later install. |
--remove-logins | Remove them. The default with --yes. |
To remove the Mac app as well, run openllm uninstall first, then quit OpenLLM and drag it from
Applications to the Trash.
Uninstalling doesn't delete your key. To revoke it, open Devices & keys, open the key's Actions menu, and select Delete.
Common problems
| Symptom | Cause | Fix |
|---|---|---|
unsupported OS | The machine isn't macOS or Linux. | Use the hosted gateway from this machine. See Any client. |
openllm: command not found | Your shell hasn't reloaded its PATH. | Open a new terminal, or run ~/.openllm/bin/openllm setup. |
| "The daemon isn't running yet" | Setup didn't finish, for example because no key was saved. | Run openllm start, or openllm login --start. |
| The machine doesn't appear in Devices & keys | The daemon isn't running, or you're at your device limit. | Run openllm status. See Device offline and Device limits. |
| On Linux, the daemon stops when you log out | Lingering is off. | Run sudo loginctl enable-linger $USER. |
Related
Last updated on
How it works
How OpenLLM routes a request through the hosted gateway or the daemon on your device, falls back along a chain, and what its servers can and cannot see.
Clients
Connect Claude Code, Codex, OpenCode, Grok Build, Hermes, Raycast, ChatGPT for Mac or DeepSeek Harness to OpenLLM, or any OpenAI or Anthropic client.