Tarsana docsDashboardMenu

Update a server

A Tarsana server runs one image, built from one spec. To update it, you change the spec, let Tarsana build the new image, create a server from it, and then remove the old server. Your servers stay small, signed and identical to their spec.

Before you start, finish Run it on your provider. You need spec.json and the ID of the server you created. With the API you also need TENANT and ACCESS_TOKEN, and the server ID in OLD_SERVER_ID.

1. Change the spec

Make your change in spec.json. For example, move to a newer package snapshot to pick up security updates:

"snapshot_id": "20260915T000000Z"

Check it with validate before you submit.

API

curl -X POST "https://api.tarsana.io/v1/tenants/$TENANT/specs/validate" \
  -H "X-Tarsana-Access-Token: $ACCESS_TOKEN" \
  -H "X-Tarsana-Tenant: $TENANT" \
  -H "Content-Type: application/json" \
  --data @spec.json
{
  "valid": true,
  "spec_hash": "sha256:cdff062988d4722b2ff052c97ebefb8b571858c493ce47b159df73b1c88809b1",
  "problems": []
}

Portal

Choose All operations, then Check a spec without submitting it. Fill in tenant, paste the changed spec into body, and press Send.

MCP

Ask your agent:

Your agent calls the validate tool:

{
  "method": "tools/call",
  "params": {
    "name": "validate",
    "arguments": {
      "tenant": "acme",
      "body": {
        "...": "the contents of spec.json"
      }
    }
  }
}

2. Submit it

A changed spec has a new hash, so submit returns a new submission ID and starts a new build.

API

curl -X POST "https://api.tarsana.io/v1/tenants/$TENANT/specs" \
  -H "X-Tarsana-Access-Token: $ACCESS_TOKEN" \
  -H "X-Tarsana-Tenant: $TENANT" \
  -H "Content-Type: application/json" \
  --data @spec.json
{
  "submission": "sha256:cdff062988d4722b2ff052c97ebefb8b571858c493ce47b159df73b1c88809b1",
  "created": true
}
export NEW_SUBMISSION=sha256:paste-the-rest-of-the-new-submission-value

Portal

Under Recent builds, choose Build a new image. Paste the changed spec into body, press Review and then Confirm and send.

MCP

Ask your agent:

Your agent calls the submit tool:

{
  "method": "tools/call",
  "params": {
    "name": "submit",
    "arguments": {
      "tenant": "acme",
      "body": {
        "...": "the contents of spec.json"
      }
    }
  }
}

3. Wait for the build

API

Ask for the status until pipeline.state is succeeded:

curl "https://api.tarsana.io/v1/tenants/$TENANT/submissions/$NEW_SUBMISSION" \
  -H "X-Tarsana-Access-Token: $ACCESS_TOKEN" \
  -H "X-Tarsana-Tenant: $TENANT"
{
  "state": "accepted",
  "pipeline": {
    "job": "j-bbdde9adc372c296",
    "state": "dispatched",
    "created": true,
    "what": "A sentence about the build's progress."
  }
}

Portal

The new build is listed first under Recent builds. Wait until its Build column reads Ready; reload the page to see it move on.

MCP

Ask your agent:

Your agent calls the status tool:

{
  "method": "tools/call",
  "params": {
    "name": "status",
    "arguments": {
      "tenant": "acme",
      "submission": "sha256:cdff062988d4722b2ff052c97ebefb8b571858c493ce47b159df73b1c88809b1"
    }
  }
}

4. Create the new server

Create a server from the new submission with create-server. Use a new request_id: the same name returns the server you already created for that submission.

API

curl -X POST "https://api.tarsana.io/v1/tenants/$TENANT/submissions/$NEW_SUBMISSION/create-server" \
  -H "X-Tarsana-Access-Token: $ACCESS_TOKEN" \
  -H "X-Tarsana-Tenant: $TENANT" \
  -H "Content-Type: application/json" \
  --data '{"request_id": "web-2"}'
{
  "created": {
    "action_id": "ff97f81e3825703462ecab41c1c4ffa3",
    "idempotent_replay": false,
    "operation_id": "5000",
    "state": "provisioning",
    "target": {
      "id": "1000",
      "region": "fsn1"
    }
  }
}

Portal

Under Images ready to use, choose Create a server on the new image's row. Fill in request_id, for example web-2, press Review and then Confirm and send.

MCP

Ask your agent:

Your agent calls the create-server tool:

{
  "method": "tools/call",
  "params": {
    "name": "create-server",
    "arguments": {
      "tenant": "acme",
      "submission": "sha256:cdff062988d4722b2ff052c97ebefb8b571858c493ce47b159df73b1c88809b1",
      "request_id": "web-2"
    }
  }
}

Wait until the new server has finished its first boot and serves what it should, then move your traffic to it, for example by changing a DNS record or a load balancer target.

5. Remove the old server

Copy anything you still need off the old server first: this cannot be undone. Then decommission-server it.

API

curl -X POST "https://api.tarsana.io/v1/tenants/$TENANT/providers/hetzner/servers/$OLD_SERVER_ID/decommission" \
  -H "X-Tarsana-Access-Token: $ACCESS_TOKEN" \
  -H "X-Tarsana-Tenant: $TENANT"
{
  "decommissioned": {
    "state": "destroyed",
    "observed": "not-found",
    "action_id": "ff97f81e3825703462ecab41c1c4ffa3",
    "idempotent_replay": false,
    "requested_at": "2026-10-05T02:15:41.166635+00:00",
    "completed_at": "2026-10-05T02:15:41.169045+00:00",
    "target": {
      "id": "1000",
      "region": "fsn1"
    }
  }
}

Portal

Under Your servers, choose Decommission on the old server's row. The form Decommission a server that Tarsana created opens with tenant, provider_name and server_id filled in. Press Review, check that it is the old server's ID, and then press Confirm and send.

MCP

Ask your agent, with the old server's ID:

Check what it is about to remove before you let it go ahead.

Your agent calls the decommission-server tool:

{
  "method": "tools/call",
  "params": {
    "name": "decommission-server",
    "arguments": {
      "tenant": "acme",
      "provider_name": "hetzner",
      "server_id": "1001"
    }
  }
}

The old submission and its records stay in your tenant. You can still verify its signature or read its audit trail.

Update a server in place

A server that joined Tarsana can also take a new release without being replaced. request-update sends it the release your release channel carries. If your channel carries no release, which is the case until Tarsana publishes one for you, it sends the newest ready build of the spec the server was created from: change the spec, submit it and wait for the build as in steps 1 to 3, then request the update instead of creating a new server. If the server already has that build, nothing is sent and the answer is nothing_newer. The server installs the update the next time it restarts, and goes back to the release it ran before if the new one does not start healthy. Follow it with update-status until update.state is confirmed, reverted or failed.

API

curl -X POST "https://api.tarsana.io/v1/tenants/$TENANT/servers/web-1/update" \
  -H "X-Tarsana-Access-Token: $ACCESS_TOKEN" \
  -H "X-Tarsana-Tenant: $TENANT"
{
  "update": {
    "channel": "server-web-1",
    "cycle": 1,
    "expires": "2026-10-05T10:44:07Z",
    "os_version": "1.0.1",
    "requested_at": "2026-10-05T06:44:05Z",
    "source_channel": "candidate",
    "state": "requested",
    "why": "published; the server has not reported since"
  }
}
curl "https://api.tarsana.io/v1/tenants/$TENANT/servers/web-1/update" \
  -H "X-Tarsana-Access-Token: $ACCESS_TOKEN" \
  -H "X-Tarsana-Tenant: $TENANT"

Portal

Under Your servers, choose Request update on the server's row. The form Update a server to its newest release opens with tenant and server_name filled in. Press Review and then Confirm and send. The row's Update column shows how it goes; Update details opens See how a server's update went for that server, where you press Send.

MCP

Ask your agent:

Your agent calls the request-update tool:

{
  "method": "tools/call",
  "params": {
    "name": "request-update",
    "arguments": {
      "tenant": "acme",
      "server_name": "web-1"
    }
  }
}

Your agent calls the update-status tool:

{
  "method": "tools/call",
  "params": {
    "name": "update-status",
    "arguments": {
      "tenant": "acme",
      "server_name": "web-1"
    }
  }
}

Servers you manage yourself

If you install Tarsana images on servers you created yourself, provision installs a newly built image on one of them. You name the provider, the server and its addresses in a provisioning request; the image always comes from the submission's finished build.

Next steps

View this page as Markdown