Skip to content

Manager operations

Use the target Manager's OpenAPI document and MCP tool schemas. Field names below are from the reviewed Manager API. The public MCP URL is the Manager origin plus /mcp. For a client that only supports stdio, the official MCP setup describes manager-control-program, API_BASE_URL and AUTH_TOKEN.

Choose another Manager

The CLI defaults to MIE’s Manager. For another installation, verify the Manager origin on its homepage. If the page links to a different organization, confirm the intended site before sending credentials. The Manager serves JSON at /api/v1/health and /api/openapi.json.

Set the verified origin once in the project's mieweb.jsonc. For example, if BioNanomics is the intended Manager:

{"targets":{"mieweb":{"instanceUrl":"https://manager.os.bionanomics.org"}}}

Then use the same npx mieweb login and npx mieweb whoami commands from that directory. This keeps both commands on the same instance. The CLI stores browser logins by Manager origin. A CI token supplied through MIEWEB_OS_TOKEN takes precedence over a saved login. CLI quickstart

From the unpacked skill directory, uv run --script scripts/check_manager.py <manager-origin> --cli-login checks the MCP connection with the saved CLI credential. Substitute the verified HTTPS origin. Use --token-env MIEWEB_OS_TOKEN instead when the runner's secret store supplies a key.

Create a guest and its routes

  1. Call get_session and list_sites. Choose a site the account can use. Call get_new_container_form(siteId) for allowed external domains and their IDs. Use list_containers for the site to check both the guest hostname and the HTTP route you intend to use. A differently named guest can already own the same externalHostname and externalDomainId pair. Inventory reflects the account's visibility. On a conflict, identify the existing resource and its owner before changing it. Keep output projections narrow. Container responses can include environment values.
  2. Choose an image the target node can pull. Use get_image_metadata for the reference and ports. Check the guest architecture and init model. The reviewed metadata resolver selects linux/amd64 from multi-architecture image indexes. A systemd-based MIE base image expects enabled services. The application's web process must listen on the container interface. A Compose file with host bind mounts describes a different runtime. Image guide · Registry source
  3. Call create_container with the site ID and the request body shown in the target tool's schema. The REST equivalent is POST /api/v1/sites/{siteId}/containers. In the example below, substitute the reviewed image tag and the numeric external domain ID from that site's form. The chosen image must serve HTTP on 8080.
{
  "hostname": "inventory-preview-42",
  "template": "ghcr.io/example/inventory:git-a1b2c3d",
  "services": {
    "web": {
      "type": "http",
      "internalPort": 8080,
      "externalHostname": "inventory-preview-42",
      "externalDomainId": 17,
      "authRequired": true
    }
  },
  "volumes": [{"name": "data", "mountPath": "/mnt/data", "mode": "rw"}]
}

The numeric 17 is an example. Service keys such as web are arbitrary. Pass application environment settings in the API's environmentVars array of {key,value} pairs when appropriate. Resolve sensitive values at execution time. Confirm the guest service reads its environment file if using Manager-injected variables. 4. Record the returned data.containerId (Manager database ID) and data.jobId. A 201 response means queued. Poll get_job until success, failure or cancelled; use get_job_status for log entries. Re-read get_container using the Manager ID. Use the returned service externalUrl. Where a data volume is requested, verify status: ready, appliedAt, its guest mount, and an application write/read. After a lost response, look up the exact hostname and active job before retrying.

Network and access settings

Desired service Manager configuration and checks
Website or API Set http for a plaintext guest upstream or https for TLS to the guest. The external site proxy terminates public TLS in both cases. Use one hostname + domain per route and check redirects and cookies against the external HTTPS origin.
Private web preview Set authRequired: true on each intended private HTTP service. Verify the domain has a working OAuth proxy, test the sign-in redirect, and verify the permitted audience and in-app roles. A missing auth backend can return 503.
SSH for release delivery or diagnostics Add a service such as "ssh":{"type":"tcp","internalPort":22} when needed. Read sshHost and sshPort from the container, check the host key, and use the enrolled user's SSH key. Confirm the guest's SSH, LDAP and sudo policy before placing private data there. The site's web login gate protects HTTP, not an SSH or TCP route.
Other protocols For TCP/UDP specify the internal port and read the assigned external port. For SRV supply dnsName as well. Keep database/cache listeners internal unless the design calls for externally authenticated access. A second TCP route to the web listener would bypass its HTTP gate.

Manager ownership, collaborators, OAuth admission, guest login and application roles govern different operations. Check the audience at the layer that enforces it. The shipped base includes a passwordless sudo rule for ldapusers; the site's actual guest login policy determines who can use it. Base image · Proxy implementation

Maintain and debug

  • Update in place. Capture the current release and the IDs of the web service and volume. update_container accepts service changes keyed by ID in each entry. Toggle authRequired on an existing ID. For a port change, submit a delete entry {"id":OLD_ID,"deleted":true} and a new full service in the same request. Check dnsWarnings, pendingRestart and any returned job. The reviewed schema and implementation differ on omitted env/entrypoint fields. Preserve the full intended values from the deployment's configuration when applying an update. A restart-only {"restart":true} refreshes the guest. Update implementation
  • Keep state across releases. Put application data and uploads on a verified volume or external service. Preserve encryption keys separately. The volume path depends on site, owner, hostname and volume name. Detach/delete can leave data available for same-identity reattachment. Proxmox guest backups exclude these bind mounts, so back them up separately and test recovery. Changing owner or hostname needs a data migration plan. Volume semantics
  • Find the failing layer. Start with the job and container state. For 502 inspect the guest service and the configured internal port/protocol. For 503 on a gated URL check the domain OAuth proxy before modifying the app. For a running guest with broken pages, inspect its service logs, built assets, environment and database migrations. Use bounded logs such as journalctl -u <unit> -n 100 --no-pager. For the Cloud path use npx mieweb tail --no-follow. Avoid pasting environment dumps or auth headers into logs or issues.
  • Roll back or clean up. For durable workloads redeploy the last known good release against a compatible schema. Plan recovery separately for destructive migrations. Remove only the identified disposable guest at the end of a time-limited trial, if cleanup is in scope. Verify the exact hostname is absent and account for detached data. Record what passed and what remains unverified.