Remote hosts
mise bootstrap remote sends a bootstrap project to other machines over SSH, stages mise on each one, and runs mise bootstrap there. Hosts come from an inventory in your configuration or from --host on the command line.
Requirements
- The machine you run from (Linux, macOS, or Windows) needs OpenSSH's
sshandtar. - Each host needs a POSIX shell plus
cksum,mktemp,tar, anduname. Minimal images may need these installed first. - Windows hosts, which use native SSH with PowerShell, are not supported.
First run
Use a project whose bootstrap configuration you have reviewed, and an SSH host you can already reach. Replace devbox with your SSH host or alias:
ssh devbox uname -s
mise bootstrap remote --host devbox --dry-run
mise bootstrap remote --host devbox--source <DIR> picks the project directory to send. It defaults to the current directory, or to an inventory host's source. A remote dry run still connects, sends the project, stages mise, and inspects the host. It skips only the bootstrap's changes, so it is not an offline plan.
mise prints one line per step it takes on the host, then everything the host's mise bootstrap prints, including its prompts:
mise bootstrap remote devbox (you@devbox)
mise devbox: uploading /home/you/project/.
mise devbox: staging mise
mise devbox: using mise 2026.11.0 linux-x64 (2026-11-20)
mise devbox: running mise bootstrapAdd -v (or set MISE_VERBOSE=1) to also see each internal ssh command mise runs. When one of them fails, the error names the command and what it printed.
The host does not keep mise
By default, mise runs from a temporary staging directory and removes it afterwards. The host keeps the tools it installed under ~/.local/share/mise, but not mise itself. Add --install-mise if the configuration writes shell activation, runs user services, or should run again on the host. See Keep mise on the host.
Check what the project sends before you send a repository that holds local secrets or generated data; see What gets sent.
Inventory
Declare hosts under [bootstrap.remote.hosts] so you can select them by name or tag:
[bootstrap.remote]
source = "."
exclude = [".env.local", "artifacts"]
mise_env = ["linux", "server"]
[bootstrap.remote.hosts.cache]
host = "cache.example.com"
user = "ubuntu"
tags = ["cache", "production"]
mise_env = ["linux", "cache"]| Key | Set in | Meaning |
|---|---|---|
host | A host | SSH host name or alias (required) |
user | A host | SSH user |
port | A host | SSH port |
identity_file | A host | SSH private key |
ssh_options | A host | OpenSSH -o options, such as ServerAliveInterval=30 |
tags | A host | Labels that --tag selects |
vars | [bootstrap.remote] or a host | Values for the host's templates; see Per-host values |
source | [bootstrap.remote] or a host | Local project directory to send |
exclude | [bootstrap.remote] or a host | Patterns to leave out of what is sent |
copy_link | [bootstrap.remote] or a host | Symbolic links to send as their targets |
copy_links | [bootstrap.remote] or a host | Send every symbolic link as its target |
mise_env | [bootstrap.remote] or a host | Config environments to load on the host |
install_mise | [bootstrap.remote] or a host | Keep mise on the host: true, false, or an executable path |
mise_bin | A host | Local mise executable to upload |
remote_mise | A host | A mise already installed on the host |
bootstrap_command | A host | Shell command that installs mise on the host |
forward | [bootstrap.remote] | Secret inputs to resolve on this machine and forward |
These rules decide each host's final settings:
- Relative
source,identity_file, andmise_binpaths resolve from the config file that declares them. - Top-level
source,mise_env,install_mise,copy_link, andcopy_linksare defaults for the hosts declared in the same config file. A host's own value replaces the default, exceptcopy_link, which adds to it.install_mise = falseopts one host out of a default. - Top-level
varsare defaults for the hosts declared in the same config file. A host'svarsreplace them key by key. - Top-level
excludepatterns from every loaded config file apply to every host, including--hosttargets, so a project can add secret patterns to an inventory that lives in global config. A host'sexcludeadds to them. - When two config files declare the same host name, the more local one wins.
mise_envis passed to the host'smise bootstrapasMISE_ENV.--remote-env <ENV>replaces it for every selected host. When neither is set, mise clears any inheritedMISE_ENV,MISE_PROFILE, andMISE_ENVIRONMENTon the host and the host's own miserc chooses the environments. An explicitmise_env = []selects no environments instead.- mise checks only the hosts you select, and it checks all of them, with command-line overrides applied, before it opens any connection. A stale entry you did not select does not block a run, and an invalid selected one cannot cause a partial run.
The mise bootstrap that runs on a host ignores [bootstrap.remote], so a host never bootstraps other hosts.
Per-host values
Bootstrap templates on a host can read the inventory entry the run was started for as {{ bootstrap.host }}, so one configuration can differ per machine where it must. Here two Mac minis log in as different users, and the SSH daemon allows only that user:
[bootstrap.remote.hosts.mini-1]
host = "mini-1.lan"
user = "admin"
tags = ["ci"]
[bootstrap.remote.hosts.mini-2]
host = "mini-2.lan"
user = "jdx"
tags = ["ci"]
vars = { ssh_port = 2222 }
[bootstrap.files."/etc/ssh/sshd_config.d/100-ci.conf"]
template = true
mode = "0644"
owner = "root"
content = """
AllowUsers {{ bootstrap.host.user }}
{% if bootstrap.host.vars.ssh_port is defined %}Port {{ bootstrap.host.vars.ssh_port }}
{% endif %}"""| Value | On a remote host | On a local mise bootstrap |
|---|---|---|
{{ bootstrap.host.name }} | The inventory name, or the --host destination | This machine's hostname |
{{ bootstrap.host.host }} | The inventory host | This machine's hostname |
{{ bootstrap.host.hostname }} | The host's own hostname | This machine's hostname |
{{ bootstrap.host.user }} | The inventory user, or the user mise runs as | The user mise runs as |
{{ bootstrap.host.port }} | The SSH port, when one is set | Not set |
{{ bootstrap.host.tags }} | The inventory tags | An empty list |
{{ bootstrap.host.vars.<name> }} | The host's vars over the top-level vars | Not set |
{{ bootstrap.host.remote }} | true | false |
A --port on the command line replaces the inventory port here too, and a --host destination has no tags or vars. vars can hold any TOML value. A template that reads a var the host lacks fails to render, so a configuration that also runs locally, or on hosts without that var, should test it with is defined or give a default(value=...).
bootstrap.host works in every bootstrap template: file content with template = true, hooks, units, agents, Compose projects, repository paths, and dotfile templates. Dotfiles built into OCI image layers are the exception: an image runs on machines other than the one that builds it, so it has no bootstrap.host. The mise bootstrap on the host also receives the entry as JSON in the MISE_BOOTSTRAP_HOST environment variable, so hooks and the bootstrap task can read it from the environment, for example with jq -r .user.
To declare a different number of the same entries per host, such as one CI runner per slot, take the count from vars in a [bootstrap.repeat] block.
mise sends the entry to the host as one quoted word of the remote command, so the host's shell never interprets a value. The values are not secret: they are visible in the host's process list while the bootstrap runs. Use secret inputs for credentials.
Select hosts
A bare mise bootstrap remote selects nothing, so a mistyped command cannot reach every server in an inventory. Name the hosts you want:
# one or more inventory hosts by name
mise bootstrap remote cache
# every inventory host, or the hosts with any of these tags
mise bootstrap remote --all
mise bootstrap remote --tag cache --tag canary
# a server that is not in the inventory
mise bootstrap remote --host ubuntu@cache.example.com \
--identity-file ~/.ssh/mise-cache \
--source ./infra/mise-cacheYou can combine these. Hosts start in this order: named hosts first, in command-line order, then the other hosts that --all or --tag select, in inventory order, then --host destinations in command-line order. Several hosts describes running them in parallel, stopping after failures, and sudo across hosts.
Command-line options apply to every selected host. --port and -i replace the host's inventory value. --ssh-option adds to the host's ssh_options and is passed after them; OpenSSH uses the first value it gets for an option, so it cannot replace an option the inventory already sets.
| Option | Effect |
|---|---|
--port <PORT> | SSH port |
-i, --identity-file | SSH private key |
--ssh-option <OPTION> | One OpenSSH -o option, such as ProxyJump=bastion; repeat for more |
--connect-timeout <SEC> | OpenSSH ConnectTimeout for every connection, 10 seconds unless you set it |
mise passes its own ConnectTimeout before any of these options, so a ConnectTimeout in --ssh-option or ssh_options has no effect; use --connect-timeout instead.
mise also reads your normal ~/.ssh/config and keeps OpenSSH's host-key checks.
Several hosts
By default mise bootstraps one host at a time. After a failed host, it carries on with the rest and reports every failure at the end. The hosts are separate machines, so a failure on one does not make the next one less safe to change, and one unreachable host does not hold up the others. To try a change on a few hosts first, give those hosts a tag and run --tag canary before --all.
| Option | Effect |
|---|---|
--parallel <N> | Run up to N hosts at the same time, starting them in the order above |
--max-failures <N> | Start no more hosts once N have failed; hosts already running finish |
--fail-fast | The same as --max-failures 1 |
--rolling | Apply in batches with health checks (Rolling apply) |
--ask-sudo-password | Ask each host's sudo password once, up front (Sudo) |
--sudo-askpass <CMD> | Get each host's sudo password from a local command (Sudo) |
mise bootstrap remote --tag ci --ask-sudo-password --parallel 4 --max-failures 2With more than one host, each line a host writes starts with its name, padded so the lines of every host line up (mac-mini-1 | ...), and mise prints a table when they are done with each host's result (ok, failed, skipped, or unhealthy after a rolling apply), how long it took, and a Changes column. skipped hosts were never started because --max-failures was reached. Changes is how many resources the run set out to create, update, or remove, as the host's last-applied record counts them, which mise bootstrap status reads. It counts the resources in the bootstrap plan, not dotfiles, tools, or the bootstrap task. It shows - for a failed host, a dry run, or a host whose mise keeps no such record.
With --parallel above 1, SSH also runs with BatchMode=yes, so several connections never ask for a key passphrase or a new host key on your terminal at once: use ssh-agent, and connect to each host once beforehand (a run without --parallel will do) so its host key is known.
Prefixed output means the hosts do not get your terminal. That is the case whenever several hosts run with --parallel above 1, --ask-sudo-password or --sudo-askpass, or with nobody at the terminal. Then no prompt can appear on a host: sudo uses the password mise collected, or fails at once, and --prompt-secrets is refused. A sequential run of several hosts in a terminal without those options gives each host the terminal in turn, as a single host gets it, with no prefixes.
Sudo
On a host whose sudo needs a password, an attended run used to ask for it many times: at a hook, at the files step, and again at each task command. sudo remembers a password for one terminal session, and mise runs each hook and task command in a session of its own, so the earlier answer does not count.
--ask-sudo-password asks once per host, before anything changes there:
- Before any host starts, mise connects to each host in turn and runs
sudo -k -n -v. A host whose sudo needs no password (every rule for the account isNOPASSWD, or there is no sudo at all) is not asked. On a host whose sudoers setsverifypwtoanyornever, this check passes when any one rule isNOPASSWD, and a sudo that needs a password then fails in the run. - For each other host, one at a time, mise asks
sudo password on <host>, sends the answer over SSH tosudo -k -S -von the host to check it, and asks again up to three times if sudo rejects it. Prompts never interleave, even with--parallel. - The hosts then run, in parallel if you asked for it. On each one, the bootstrap finds a small
sudowrapper first onPATHthat adds-Aand drops sudo's own-n(which would refuse the answer); a call that passes-Skeeps answering on its own standard input.SUDO_ASKPASSnames a helper that reads the password from a socket that SSH forwards back to mise on this machine. Every sudo of the run gets its answer there, whether a hook, a step, or a task command calls it.
The answers start once mise is on the host, so they cover adopting a repository with --adopt and everything mise bootstrap runs, but not bootstrap_command, which runs earlier to put mise there. In a run without a terminal on the host, a bootstrap_command that needs sudo must be allowed without a password (NOPASSWD); a single attended host still gets the terminal for it.
A host that cannot be checked, or rejects every answer, fails before anything changes on it. It counts towards --max-failures at once: when the check failures reach the limit, mise asks no further host. The hosts checked before then still run, as they come first, and mise starts no more of them after the first one fails. --dry-run changes nothing, so it does not ask. Each host is asked separately; mise never tries one host's password on another.
For runs without a terminal, such as a scheduled job, --sudo-askpass <CMD> takes the password from a command on this machine instead of a prompt. mise runs it with sh -c once for each host whose sudo needs a password, with MISE_REMOTE_HOST set to the inventory name and MISE_REMOTE_DESTINATION to [user@]host, and uses the first line it prints:
mise bootstrap remote --tag ci --yes \
--sudo-askpass 'op read "op://ci/$MISE_REMOTE_HOST/sudo-password"'Without either option, a run with no terminal still never hangs on sudo: SSH gets BatchMode=yes, the host has no terminal, and sudo fails at once with a terminal is required or a password is required. mise's own steps stop earlier, at their sudo -n true check, with the command to run by hand.
What the password is exposed to
The password stays in mise's memory on this machine for the run (mise zeroes its own copies when it is done), and is never put in a command line, the environment, a log, or a file on the host. It reaches the host in two ways: once on the standard input of sudo -k -S -v, and once for each sudo prompt, read from the forwarded socket. That socket is in the host's private staging directory, so only the account mise logs in as, and root, can connect to it, and it closes with the run.
The trade-off: while the run lasts, any process running as that account on the host can read the password from the socket, not only sudo. A task command or a tool installed by the run could. A sudo prompt on a terminal is harder to read from another process, but code running as that account during the run can already run sudo through the same answers, and could also replace sudo on PATH for a later interactive login. So the extra exposure is the password itself, which matters when it is shared with other hosts or services. Use a password that only that host's account uses, or NOPASSWD rules for the commands the bootstrap runs, if that is not acceptable.
--sudo-askpass adds the command's own exposure: its output is the password, so keep it in a password manager or a file only you can read, and never echo it. Because the helper on the host is the staged mise (mise ssh --sudo-askpass), answering sudo needs a mise of this version or newer on the host; that is the case unless you set remote_mise or bootstrap_command to an older one.
Rolling apply
A bad change that reaches every host at once can take the whole fleet down. A rolling apply changes the hosts in batches, one host at a time by default, and runs a health check on each host after its apply. The next batch starts only when every host of the current one applied and passed its check. When a host fails either, the rollout stops after its batch and reports which hosts were done, which failed, and which were never started:
[bootstrap.remote.rollout]
batch_size = 1
# on this machine: are the host's GitHub runners online again?
health_check = { local = "./scripts/runners-online.sh \"$MISE_REMOTE_HOST\"", timeout = "10m", interval = "15s" }
[bootstrap.remote.hosts.mac1]
host = "mac1.example.com"
tags = ["mac-ci"]
[bootstrap.remote.hosts.mac2]
host = "mac2.example.com"
tags = ["mac-ci"]
# on the host itself, over SSH; replaces the rollout's check for this host
health_check = { host = "launchctl print system/dev.mise.ci.actions-runner | grep -q 'state = running'" }rolling apply stopped after batch 1 of 2
done: none
failed: mac1 (health check `./scripts/runners-online.sh "$MISE_REMOTE_HOST"` did not pass within 10m00s (40 attempt(s)): exit status: 1)
not started: mac2A health check is a shell command, and exit status 0 means healthy. It runs in one of two places:
local: on this machine, withsh -cin the current directory (cmd /Con Windows, where the variables read as%MISE_REMOTE_HOST%), for a check that asks another service about the host, such as the GitHub API.MISE_REMOTE_HOSTis the host's inventory name andMISE_REMOTE_DESTINATIONits[user@]host.host: on the host, over SSH, withMISE_REMOTE_HOSTset. Like the apply, it may prompt for a key passphrase or host key only when one host runs at a time in an attended run; otherwise SSH runs withBatchMode=yes.
mise retries a failing check every interval (default 10s) until it passes or timeout (default 5m, at most 7 days) has passed, and then counts the host as unhealthy, with the end of the check's output in the error. The last wait is cut short so one more attempt starts at the deadline. That attempt, and any attempt that starts less than a second before the deadline, still gets one second (or timeout, if that is shorter), and a pass within it counts: the host can be found healthy up to a second after timeout.
An attempt still running when its time is up is stopped, together with every process a local check started. For a host check mise stops its SSH client, but SSH runs the command without a terminal, so the command itself can keep running on the host until it exits. Give a command that may hang its own limit there, for example timeout 30 ./check.sh.
A host's own health_check replaces the rollout's; a host with neither only has to apply. In a more local config file, each key of [bootstrap.remote.rollout] replaces the same key of a less local one.
The table turns rolling on for every run of mise bootstrap remote that reads the file. These options change one run:
| Option | Effect |
|---|---|
--rolling | Roll out even without [bootstrap.remote.rollout] |
--batch-size <N> | Apply N hosts at the same time in each batch (implies --rolling) |
--health-check-local <CMD> | Run this check on this machine for every host, replacing configured checks |
--health-check-host <CMD> | Run this check on every host, replacing configured checks |
--health-check-timeout <DURATION> | Retry each host's check this long |
--health-check-interval <DURATION> | Wait this long between attempts |
--no-rolling | Turn the rollout off; --parallel and --max-failures apply again |
# try one host first, then the rest two at a time
mise bootstrap remote mac1 --ask-sudo-password
mise bootstrap remote --tag mac-ci --batch-size 2 --ask-sudo-password--parallel, --max-failures and --fail-fast do not apply to a rolling apply, which always stops at the first batch with a failure. --dry-run prints the rollout order and each host's check, previews every batch, and runs no checks, since nothing changed. With --ask-sudo-password or --sudo-askpass, every host's sudo is checked before the first batch, and a host that fails the check stops the rollout before anything changes.
With [bootstrap.remote.hooks], a host's post-host hook runs after its apply and before its health check, and an unhealthy host counts as failed for post-run (MISE_BOOTSTRAP_REMOTE_OUTCOME is failure).
Run commands on this machine around a run
[bootstrap.remote.hooks] runs commands on the machine where you run mise bootstrap remote, not on the hosts: once before and after the whole run, and before and after each host. Use them to take hosts out of service while they change and put them back afterwards. For example, to send CI jobs to hosted runners while self-hosted Mac minis are bootstrapped:
[bootstrap.remote.hooks]
pre-run = "gh variable set MACOS_SELF_HOSTED --body false"
[bootstrap.remote.hooks.post-run]
description = "Send macOS jobs back to the self-hosted runners"
run = '''
if [ "$MISE_BOOTSTRAP_REMOTE_OUTCOME" = success ]; then
gh variable set MACOS_SELF_HOSTED --body true
else
echo "left MACOS_SELF_HOSTED off: $MISE_BOOTSTRAP_REMOTE_FAILED_HOSTS failed" >&2
fi
'''These are not [bootstrap.hooks], which run on each host as part of its mise bootstrap.
| Phase | Runs | When it fails |
|---|---|---|
pre-run | Once, before the first host starts | No host starts; post-run still runs |
pre-host | Before each host's apply | That host fails without being applied |
post-host | After each host's apply, also when the apply or pre-host failed | That host fails; a host that already failed stays so |
post-run | Once, after every host is done, also when hosts failed or you pressed Ctrl-C | The command fails, after reporting the hosts' errors |
A phase takes a command string, an array of commands, or a table with run and an optional description, which mise prints in place of the command. The commands of an array run in order, and the first that fails stops the hook. When several config files set the same phase, the global config's commands run first.
Each command runs in the current directory with the shell from unix_default_inline_shell_args, and gets these variables:
| Variable | Phases | Value |
|---|---|---|
MISE_BOOTSTRAP_REMOTE_PHASE | all | pre-run, post-run, pre-host, or post-host |
MISE_BOOTSTRAP_REMOTE_HOSTS | all | The selected hosts' names, separated by spaces |
MISE_BOOTSTRAP_REMOTE_HOST | pre-host, post-host | The host's inventory name |
MISE_BOOTSTRAP_REMOTE_DESTINATION | pre-host, post-host | [user@]host |
MISE_BOOTSTRAP_REMOTE_TAGS | pre-host, post-host | The host's tags, separated by spaces |
MISE_BOOTSTRAP_REMOTE_OUTCOME | post-host, post-run | success or failure |
MISE_BOOTSTRAP_REMOTE_ERROR | post-host | The host's error, when it failed |
MISE_BOOTSTRAP_REMOTE_FAILED_HOSTS | post-run | The hosts that failed, separated by spaces |
MISE_BOOTSTRAP_REMOTE_SKIPPED_HOSTS | post-run | The hosts that never started |
post-run reports failure when any host failed, pre-run failed, or the run was interrupted; after an interrupt the two host lists are empty. The hooks run only once a host is about to start: a configuration error, or every host failing its sudo check, ends the run before pre-run. A host that fails its sudo check gets no pre-host or post-host hook, and neither does a host that --max-failures kept from starting.
The per-host hooks run with the host, so with --parallel they run for several hosts at once, and their output gets the host's prefix. While output is prefixed, a hook gets no terminal input. --dry-run prints each hook's commands instead of running them.
Ctrl-C, or a SIGTERM or SIGHUP sent to mise, stops the run: no further host or pre-* hook starts. A hook that is running gets the signal and up to 10 seconds to finish, with the commands it started, before mise kills it, so a cleanup hook does not overlap it. A hook with prefixed output runs in a process group of its own, as task commands do, so mise signals and waits for every command in it; when mise itself runs inside a mise task, the hook stays in that task's group, so stopping the task stops the hook too. A hook that has the terminal stays in the terminal's process group so it can read input: a Ctrl-C there reaches its commands, but a SIGTERM or SIGHUP sent only to mise is passed on to the hook's shell alone. Each hook gets one SIGINT per Ctrl-C, so a trap that cleans up is not cut short by a second one. Then the post-host hooks of hosts that had started and the post-run hook still run. Press Ctrl-C again to stop those too. A hook that is killed by one of those signals, or exits with 129, 130, or 143, stops the run the same way.
These are commands from your config that run on this machine, so they follow the same trust rules as tasks: mise reads [bootstrap] only from trusted config files. Safe mode and MISE_NO_HOOKS=1 skip them, with a warning, as they skip [bootstrap.hooks].
What gets sent
mise archives the source directory and sends it to each host, leaving out .git, target, and node_modules. Add exclude entries or --exclude flags for local secrets and generated files. --keep-staging keeps the staging directory on the host for debugging and prints its path.
mise refuses a source that is your home directory or /, and stops when the source holds more than 512 MiB or 100,000 files after the excludes apply, naming the largest entries so you can exclude them or pick a narrower --source. Pass --yes to send such a directory anyway.
Symbolic links are sent as links. To send a link's target instead, list the link, relative to the source, in copy_link or pass --copy-link <PATH>. A directory link becomes a real directory while links inside it stay links, so you can share selected modules or playbooks without changing other links. A host's copy_link entries add to the top-level list, and command-line entries add to both.
copy_links = true or --copy-links replaces every link with its target, like rsync --copy-links. That can pull in large vendored, generated, or dependency trees, and files from outside the source directory. It also makes mise ignore copy_link.
Get mise onto the host
By default, mise gives each host the same mise version you are running, so the host reads your configuration the way your machine does. If your executable runs on the host, mise uploads it. Otherwise it downloads that version's official release for the host's platform (Linux x64, arm64, or armv7 with glibc or musl, or macOS x64 or arm64), checks its signature and checksum, and uploads it. Hosts on the same platform share one download. Before bootstrapping, mise runs mise version on the host to check that the executable works.
mise substitutes an official release only for an official release. A debug build, a source build with local changes, or a mise packaged by a distribution cannot be swapped, and neither can a platform outside that list or a Linux host whose libc mise cannot identify. For those, choose one of these options:
| Config key, flag | What it does |
|---|---|
mise_bin, --mise-bin | Upload a mise you built yourself, for example for an architecture with no official release |
remote_mise, --remote-mise | Use a mise already installed on the host |
bootstrap_command, --bootstrap-command | Run a shell command on the host that installs mise, such as a package manager or a site installer |
[bootstrap.remote.hosts.arm-lab]
host = "arm-lab.example.com"
mise_bin = "./artifacts/mise-linux-armv5"
[bootstrap.remote.hosts.nix-builder]
host = "builder.example.com"
bootstrap_command = "nix profile install nixpkgs#mise"You can set only one of these per host, and a command-line option replaces the one the inventory sets.
remote_mise is an executable name or path, not a shell expression. A bare name resolves through the host's login PATH, a ~/ path uses the host's home directory, and an absolute path is used as written. A relative path such as ./bin/mise resolves inside the staged project and cannot point outside it.
bootstrap_command runs in a login shell. mise then opens a fresh login shell to find mise, preferring an executable that is new or changed since before the command, so an older mise earlier on PATH cannot shadow the new one. If it cannot tell which executable is new, it stops and asks you to set remote_mise. A dry run never runs this command: it uses a mise already on the host, or stops and asks you to set remote_mise or mise_bin.
How mise decides whether your executable runs on the host
mise detects the host's operating system, architecture, and, on Linux, libc family. On Linux it also reads your executable's ELF interpreter. A static executable needs no libc check. A dynamically linked one needs the same interpreter path and libc family on the host. For glibc, the host's loader must provide the highest GLIBC_* symbol version the executable requires. For musl, the host's loader must be at least as new as yours. mise version on the host has the final say.
Before it downloads a release for another platform, mise checks that your executable matches one of the signed checksums for its own official release. It verifies the release's SHASUMS256.txt with its minisign signature and mise's embedded release key, then the downloaded file's SHA-256 checksum.
Keep mise on the host
Set install_mise to keep the executable mise used on the host after the run:
[bootstrap.remote]
install_mise = true
[bootstrap.remote.hosts.cache]
host = "cache.example.com"
install_mise = "/usr/local/bin/mise"true installs to ~/.local/bin/mise, where mise.run installs it. A string names a different executable path. It must be absolute or start with ~/, and it cannot be an existing directory. The same choices work on the command line:
mise bootstrap remote cache --install-mise
mise bootstrap remote cache --install-mise=/usr/local/bin/mise
mise bootstrap remote cache --no-install-miseA path needs the =, so a bare --install-mise cannot swallow a host name. --install-mise replaces a remote_mise or bootstrap_command that the inventory sets. In config, install_mise works with mise_bin but not with remote_mise or bootstrap_command, which already provide a mise on the host; use bootstrap_command when the host should own the install through its package manager.
mise installs the executable it would otherwise have staged, then runs the bootstrap with it, so the host ends on the version you ran. Replacing a mise that is running is safe, and an identical executable is not uploaded again. A dry run reports whether mise is already installed at the install path; if it would install it, the dry run uses a temporary copy.
Protect the install directory
mise does not use sudo to install itself, so the SSH user must be able to write the install path; /usr/local/bin/mise needs a user who owns that directory. Anyone else who can write to the directory can replace mise for that user, so keep it writable only by that user. mise checks the installed file's digest, but only when the host has sha256sum or shasum, and the check cannot cover later changes. Without install_mise, mise stages into a private mktemp -d directory instead.
Installing mise does not put its directory on the host's PATH. The run itself does not need it, because mise calls the installed executable by its full path, but mise by name in a new terminal or over ssh host mise does, and so do the [bootstrap.mise_shell_activate] blocks. ~/.local/bin is on PATH by default on many Linux distributions, but not on macOS.
mise does not edit the host's shell startup files for this. After the bootstrap, it reads PATH from the SSH user's login shell. When the run installed or replaced mise and that PATH lacks the install directory, mise warns with a [dotfiles] line entry for the startup file that shell reads first. On a Mac with the default zsh:
WARN /Users/admin/.local/bin/mise is not on mac-mini's login PATH, so `mise` by name does not find it there; add /Users/admin/.local/bin to PATH in the login shell's startup file, for example with this entry in the bootstrap config:
[dotfiles]
"~/.zshenv/mise-path" = { line = 'export PATH="$HOME/.local/bin:$PATH"' }Add the entry to the config the host bootstraps from. The next run applies it before the check, so the warning goes away. A run that finds the same executable already installed reports the missing directory only in debug output, so the warning appears once per install, not on every run. For bash, the entry names ~/.bash_profile, ~/.bash_login, or ~/.profile, whichever the login shell reads; for fish, ~/.config/fish/config.fish. When ZDOTDIR or XDG_CONFIG_HOME moves those files, or the path holds characters the entry cannot quote, the warning says only which directory to add. See Put mise on PATH first for the same entries written by hand.
Options and secrets
Remote runs accept the same --dry-run, --yes, --update, --only, --skip, --force-dotfiles, and --prompt-secrets options as mise bootstrap, plus --remote-env to choose config environments on the host:
mise bootstrap remote cache --dry-run
mise bootstrap remote cache --yes --update
mise bootstrap remote cache --only packages,files,services,compose
mise bootstrap remote cache --skip tools,task
mise bootstrap remote cache --force-dotfiles
mise bootstrap remote cache --prompt-secrets
mise bootstrap remote cache --remote-env linux,servermise does not copy your local environment to the host. A local -E only changes which local config files mise reads; the host loads the environments in mise_env or --remote-env, or the host's own miserc env when neither is set. Secret inputs set on this machine are not available there either, unless [bootstrap.remote.forward] forwards them: mise then resolves them here, from the environment or a local command such as gh api ..., and passes them to the host's bootstrap without putting them on a command line. Otherwise use --prompt-secrets for an attended run, or make the values available on the host.
Check hosts
mise bootstrap remote status checks inventory hosts without changing them. For each host it shows whether SSH connects, the host's mise version next to yours, the host's last-applied record, and whether the host has drifted from the config:
mise bootstrap remote status # every inventory host
mise bootstrap remote status --tag mac-ci
mise bootstrap remote status mac2 --jsonHost SSH mise Last applied Drift
mac1 ok 2026.11.4 (local 2026.11.5) bfb7b1f 2h ago by me@laptop 2 pending (package 1, service 1)
mac2 ok 2026.11.5 bfb7b1f 2h ago by me@laptop clean; unknown: file 1 (needs sudo)The drift column comes from mise bootstrap plan run on the host against the source you would send, so it covers what the plan covers: accounts, packages, files and directories, services, the firewall, Compose projects, and repositories. Dotfiles, tools, and the other parts the plan does not cover are not checked. Like a run, status uploads the source and stages mise in a temporary directory on each host, then removes it. It checks each source first, as a run without --yes does, and refuses a source such as your home directory or one over the size limit.
status never asks for a password. SSH runs with BatchMode=yes, and the plan runs with --unprivileged: a file, directory, or firewall that only root can inspect shows unknown (needs sudo), unless sudo -n works on the host. Hosts are checked four at a time; change that with --jobs.
It exits with status 1 when a host is unreachable, cannot be checked, or has pending changes, so a scheduled job can alert on it. A host whose only problem is unknown resources does not fail. Pass --no-fail to exit 0 whatever the hosts report; an error before any host is checked, such as ssh or tar missing on this machine, still fails. A host that takes longer than --timeout seconds (default 600) is reported as failed.
Adopt a configuration repository on a host
--adopt installs a configuration repository on each host instead of sending a project. It accepts the same two kinds of repository as local adoption:
mise bootstrap remote --host devbox --install-mise --adopt you/mise-configOWNER/REPO expands to https://github.com/OWNER/REPO.git. HTTPS and SSH URLs, and local paths on this machine, work too. Write a relative path as ./OWNER/REPO: mise refuses a bare OWNER/REPO that also exists in the current directory.
Other transports and custom Git helpers are rejected, and clones do not follow HTTP redirects, so use the repository's canonical URL. --adopt cannot be combined with --source, --copy-link, --copy-links, or --exclude. Hosts still come from --host or the inventory, never from the adopted repository's inventory.
mise fetches the repository once on this machine, with this machine's Git credentials, pins that commit for every selected host, and sends it to each one as a Git bundle over SSH. It does not change this machine's global config or copy its Git configuration, and a private repository needs no extra flags. Add --install-mise when the host does not have mise yet.
You do not need the GitHub relay for this transfer. Add --github-relay-read-only --github-relay-repo OWNER/REPO only when the bootstrap that follows needs other private GitHub content, such as a private [bootstrap.repos] entry or a private release, and repeat --github-relay-repo for each repository.
Global configuration
A repository of global mise config becomes a checkout in the host's global config directory, with the original credential-free origin, branch, and upstream. The checkout stays after the run. On the host:
- An existing checkout with the same origin is reused, and
--updatefast-forwards it. - Uncommitted changes, a different origin, conflicting files, or repository files ending in
.local.tomlstop the run for you to fix. - A non-empty directory that is not a Git checkout can be adopted after you confirm, and its existing files and local overrides are kept.
With --dry-run, mise does everything except change the host: it fetches, connects, stages, runs every check, and reports whether it would clone, fast-forward, or adopt, with the number of new files. If the host already has a global config, the bootstrap that follows is previewed too.
Setup repository
For a setup repository, one connected with mise dot origin set, the host restores your tracked files instead of checking the repository out, then records the origin. Track the mise config and template sources the bootstrap needs on your first machine; a file that is only referenced is not included. If that config declares the history watcher, bootstrap installs it like any other user service. If a file already on the host differs, setup stops before bootstrap runs.
mise bootstrap remote --host devbox --install-mise --adopt you/setup --dry-runWith --dry-run, the host shows the files it would write and any held for a decision, and records nothing. A setup preview can stage decrypted tracked configuration, so treat a directory kept with --keep-staging as sensitive.
If setup succeeds but the host cannot reach the repository on its own afterwards, the bootstrap says so. Give the host its own credentials for ongoing synchronization, for example by running gh auth login and gh auth setup-git there, or by setting an SSH URL with mise dot origin set.
Let hosts pull instead
mise bootstrap remote applies a configuration when you run it, from a terminal where you can answer sudo. To keep a fleet converged without anyone at a terminal, set each host up once with pull mode. A root service on the host then fetches the configuration repository on a timer and applies each new commit that an allowed SSH key signed. Once the host has a root-owned mise and the allowed signers file, the setup is one command over SSH:
ssh -t devbox sudo /usr/local/libexec/mise bootstrap pull install \
--repo https://github.com/example/fleet.git \
--allowed-signers /etc/mise/allowed_signersBorrow GitHub access
mise bootstrap remote accepts the same --github-relay-* flags as mise ssh, which let Git and mise on the host read private GitHub repositories with this machine's credentials for the length of the run. See GitHub relay.
Run a command on hosts
mise bootstrap remote exec runs one command on inventory hosts without bootstrapping them. It selects hosts and connects the same way as mise bootstrap remote: by name, --tag, --all, or --host, with each host's user, port, identity_file, and ssh_options, and the --port, -i, --ssh-option, and --connect-timeout overrides. Nothing is uploaded, and the host does not need mise.
# one host
mise bootstrap remote exec mac1 -- uptime
# every host tagged mac-ci, through sudo
mise bootstrap remote exec --tag mac-ci --sudo -- \
launchctl print system/dev.mise.ci.actions-runner
# a terminal on the host, so sudo can ask for a password
mise bootstrap remote exec mac1 --sudo -t -- softwareupdate --install --all
# a secret on stdin, never in the command line
gh auth token | mise bootstrap remote exec mac1 -- \
sh -c 'umask 077; rm -f ~/.runner-token; cat > ~/.runner-token'The command goes after --. mise quotes each word for the remote POSIX shell, so an argument with spaces, quotes, or $ arrives exactly as given; for pipes, redirection, or variables expanded on the host, run sh -c '...' yourself. --sudo runs the command as sudo -- <command>.
Without -t, sudo cannot prompt for a password, and in an unattended run mise sets BatchMode=yes as it does for a bootstrap, so a prompt fails instead of waiting. --parallel with several hosts sets it too, so their SSH passphrase and host-key prompts cannot fight over one terminal. -t asks OpenSSH for a terminal (-tt) when stderr is a terminal.
Hosts run one after another, in the order described in Select hosts. --parallel runs them all at once; it cannot be combined with -t. With one host, stdin, stdout, and stderr go straight to it, and mise exits with the command's exit status. With more than one:
- each line of output starts with the host's name, unless
-tis given; - piped stdin is read once and sent to every host. With
--parallel, it is read only as fast as the slowest running host takes it. mise keeps it in a temporary file for hosts that start later, up to 1 GiB; a larger input fails the run, so send it to one host at a time. Stdin from a terminal goes to each host in turn when they run one after another, and to none of them with--parallel; - every host runs even after one fails, then mise lists each host's exit status and exits with status 1 if any failed. Status 255 usually means SSH itself failed, for example because the host was unreachable.
- if the input could not be kept or replayed, the hosts may have received only part of it, so mise reports that and fails, after listing each host's status.
exec is a subcommand name, so mise bootstrap remote exec never bootstraps an inventory host named exec.
$ mise bootstrap remote exec --tag mac-ci -- sw_vers -productVersion
mac1 | 15.1
mac2 | 15.1How a remote run works
For each host, mise:
- Opens an OpenSSH connection with your normal SSH config and host-key policy.
- Creates a private
/tmp/mise-bootstrap.*staging directory withmktemp. - Archives the source directory locally and extracts it into the staging directory, or sends the repository bundle for
--adopt. - Provides mise, staged or installed as described above.
- Sends any forwarded secrets into a private file in the staging directory, which is read and removed before mise starts (not in a dry run).
- Runs
mise bootstrapfrom the staged project or the adopted configuration. From the staged project, config search stops at the staging directory, so amise.tomlthat another user left in the target's/tmpis not loaded. Hooks and tasks start in the staged project, which only the SSH user can read; see Run commands as another account. With--adopt, a real run starts them in the host's global configuration directory instead. - Removes the staging directory, even after a failed bootstrap, unless you pass
--keep-staging.
The remote mise bootstrap also receives the source's Git commit and your user@host, which it keeps in its last-applied record. For a local source it also receives whether the checkout had uncommitted changes; with --adopt it gets the adopted revision, without a dirty flag. Nothing else about this machine is sent.
On Unix, every command for one host shares one OpenSSH control connection. When nobody is at the terminal, mise sets BatchMode=yes, so a password prompt fails instead of hanging. In an attended terminal, the bootstrap of a single host, or of each host of a sequential run without sudo options, gets a TTY, so SSH, sudo, confirmation, and --prompt-secrets prompts work; see Several hosts for the other cases. mise never relaxes OpenSSH's host-key checks.
Run commands as another account
The staging directory is private to the SSH user (mode 0700). Without --adopt, hooks and the bootstrap task start in the staged project inside it. With --adopt, a real run starts them in the host's global configuration directory, which is usually private to the SSH user as well. A command that a hook or task runs as another account, such as sudo -u mise-ci ..., starts in a directory that account cannot read. Many programs fail there. On macOS, rustup-init stops with:
error: Unable to proceed. Could not locate working directory.: Permission denied (os error 13)Change to a directory the other account can read before switching. In a hook, cd first:
[bootstrap.hooks.post-tools]
run = "cd / && sudo -u mise-ci -H rustup-init -y"A task can set dir instead:
[tasks.bootstrap]
dir = "/"
run = "sudo -u mise-ci -H rustup-init -y"A command that needs files from the project, such as a script the task runs, cannot read them as the other account either. Copy what it needs to a place that account can read, or run it as the SSH user.
mise keeps the staging directory private on purpose. It sits in the host's shared /tmp and holds the staged configuration, the files it uses, a setup preview that can hold decrypted configuration, and whatever hooks and tasks write into the project while they run. Opening it to other accounts would open all of that to every account on the host, not only the one a command switches to. --exclude keeps files out of the archive, but it cannot cover what the bootstrap writes there.