Skip to content

Upgrade in place

POST
/api/server/upgrade
Code sample: Shell / cURL
curl --request POST \
--url http://127.0.0.1:8004/api/server/upgrade \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "executable": "example" }'

Re-executes the server as another btmux binary, as btmux upgrade does, keeping sessions, shells, and scrollback. GET /api/info then reports the new version, or upgrade_error if the exec failed.

Media typeapplication/json
object
executable
required

The btmux binary to run, an absolute path on the server.

string

Example generated

{
"executable": "example"
}

Upgrading; clients reconnect to the new binary

A malformed JSON body

Media typetext/plain
string

Missing or wrong access token

Media typetext/plain
string

The request’s Host or Origin isn’t allowed, or the caller can’t use this route (a guest token, or btmux connect)

This server can’t hand off to that binary; only a restart can

Media typetext/plain
string

A body over the size limit

Media typetext/plain
string

No Content-Type: application/json

Media typetext/plain
string

A body that doesn’t match its schema

Media typetext/plain
string

An upgrade is in progress, or the built-in Neovim has unsaved changes

Media typetext/plain
string