ServerAvatarDocs
API Reference

Settings, setup and server sync API

Read and change server settings (hostname, SSH, updates, swap, Redis, reboot), read the setup catalogue, and run, follow and ignore server syncs through the OSS Panel API.

Three server-wide areas live here: the Settings screen (hostname and time, SSH access, system updates, swap, Redis, rebooting), the setup catalogue that lists what can be installed on the server, and server sync, which reads a server that was set up before the panel (for example a migrated ServerAvatar v7 server) into the panel.

All paths are relative to https://<your-panel-host>/api. Read Authentication first. The examples use:

PANEL=https://panel.example.com
TOKEN='1|xcMq8K3vZ2pL…'

Permissions

KeyTitle in RolesUsed for
settingSettingsEverything under /settings, and GET /setup.
syncServer SyncEverything under /server/sync.

Reading needs view; every endpoint marked manage needs manage, which implies view. Where the table shows a number, that limit counts that endpoint only, per user, on top of the shared budget (see Rate limits). GET /setup, GET /settings/updates/run and GET /server/sync/{run} are polled while a job runs and sit outside the shared budget.

Endpoint index

MethodPathPermissionLimit per minutePurpose
GET/settingssettingsharedEvery settings group.
PUT/settings/generalsetting managesharedHostname, time zone, time sync.
PUT/settings/securitysetting managesharedSSH port and sign-in rules.
PUT/settings/updatessetting managesharedAutomatic security updates.
POST/settings/updates/runsetting managesharedInstall security updates now.
GET/settings/updates/runsettingpollingProgress of the latest run.
PUT/settings/swapsetting managesharedSwap file size.
PUT/settings/redissetting managesharedRedis memory limit, policy, password.
POST/settings/rebootsetting managesharedReboot the server.
GET/settings/rebootsettingsharedIs a reboot scheduled?
DELETE/settings/rebootsetting managesharedCancel a scheduled reboot.
GET/settings/reboot-schedule/presetssettingsharedChoices for the reboot schedule.
PUT/settings/reboot-schedulesetting managesharedRecurring reboot.
GET/setupsettingpollingWhat can be installed and what is.
GET/server/sync/latestsyncsharedThe most recent sync.
POST/server/syncsync manage10Start a sync.
GET/server/sync/{run}syncpollingOne sync, with its items.
GET/server/sync/ignoressyncsharedItems you chose to ignore.
POST/server/sync/ignoressync manage60Ignore an item.
DELETE/server/sync/ignores/{ignore}sync manage60Stop ignoring an item.
GET/server/sync/handoversyncsharedState of the v7 agent handover.
POST/server/sync/handoversync manage5Finish the v7 agent handover.

Settings

GET /settings

curl "$PANEL/api/settings" \
  -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json'

Returns {"settings": { … }, "last_changed": { … }}. settings has one key per group that exists on this server, so a group that does not apply is simply missing. last_changed says when each group was last changed through the panel.

GroupFields
generaltimezone, ntp (time sync on or off), clock_synchronized, hostname.
securityport (SSH port), permit_root_login (yes, no or prohibit-password), password_authentication, has_ssh_key, save_enforces_ssh_access.
updatessecurity_updates_enabled, auto_reboot, reboot_time, reboot_with_users, reboot_required, updates_available, security_updates_available, security_update (the latest run).
swapenabled, path, size, used, free (each with a _human value), system_total, unmanaged.
redismaxmemory, maxmemory_policy, unsafe_policies, has_password, password, password_manageable.
reboot_scheduleenabled, frequency, hour, day_of_week, day_of_month, timezone, next_run, next_run_human.

The Redis password is returned only to a role with manage on Settings; for everyone else it is null.

Each PUT below validates its body, applies the change on the server, and returns the group as it is afterwards under its own key, for example {"general": { … }}. 404 with That settings group is not available on this server when the group does not apply.

PUT /settings/general

FieldRules
hostnameRequired, up to 64 characters: letters, digits and -, with dots between labels; each label starts and ends with a letter or digit.
timezoneRequired: an identifier from GET /timezones.
ntpRequired boolean: keep the clock synchronised.

PUT /settings/security

FieldRules
portRequired, integer 1 to 65535: the SSH port. A port already in use by something else is refused.
permit_root_loginRequired: yes, no or prohibit-password.
password_authenticationRequired boolean. Turning it off needs an SSH key on the server (Add an SSH key before disabling password authentication, or you may lock yourself out.).

When you change the port while the firewall is on, the panel adds an allow rule for the new port, releases the rule for the old one and moves the Fail2ban SSH jail to the new port. Check has_ssh_key and your own access before changing this group.

PUT /settings/updates

FieldRules
security_updates_enabledRequired boolean: install security updates automatically.
auto_rebootRequired boolean: reboot when an update needs it.
reboot_timeRequired: now, or a time as HH:MM (24 hours).
reboot_with_usersOptional boolean: reboot even when someone is signed in.

POST /settings/updates/run and GET /settings/updates/run

POST takes no body, starts installing security updates now and answers 202 with {"security_update": { … }}. 422 when unattended-upgrades is not installed on the server, 409 (with the running update) when one is already running. GET returns {"security_update": { … }} for the latest run, or null; the update output is included only for a role with manage.

PUT /settings/swap

FieldRules
size_mbRequired, integer from 0 to 65536 (megabytes). 0 removes the panel's swap file.

Refused with 422 when the disk does not have room for the size and its reserve, or when swap is in use and there is not enough free memory to turn it off. The panel manages one swap file; swap set up outside the panel is left alone (unmanaged is then true).

PUT /settings/redis

FieldRules
maxmemoryRequired: 0 (no limit), or a number with an optional unit b, kb, mb or gb.
maxmemory_policyRequired: noeviction, allkeys-lru, allkeys-lfu, allkeys-random, volatile-lru, volatile-lfu, volatile-random or volatile-ttl. Any policy in unsafe_policies is refused: when the panel's own queue runs on Redis, the allkeys-* policies could delete queued jobs.
passwordOptional, 8 to 255 characters. Sets a new password.
remove_passwordOptional boolean: remove the password.

When a password change is still being applied the answer is 202 with {"message": "…"}. 422 on password when the panel cannot reach Redis with the password it has stored, or cannot write its own .env file to record a new one.

Reboot

POST /settings/reboot takes an optional delay_minutes (integer 0 to 60, default 0 = now) and answers 202:

{
  "reboot": {
    "scheduled": true,
    "when": "+5",
    "at": "25-11-2026 15:10:00",
    "at_iso": "2026-11-25T15:10:00+00:00",
    "timezone": "UTC",
    "seconds_remaining": 300,
    "delay_minutes": 5
  }
}

GET /settings/reboot returns {"reboot": {"scheduled", "at", "at_iso", "timezone", "seconds_remaining"}} (scheduled is false and the rest null when nothing is pending). DELETE /settings/reboot cancels a scheduled reboot and returns {"reboot": {"scheduled": false, "at": null, "seconds_remaining": null}}.

GET /settings/reboot-schedule/presets returns the choices for the recurring reboot: frequencies (daily, weekly, monthly), hours (00:00 to 23:00) and days_of_week, each as {"value", "label"}.

PUT /settings/reboot-schedule sets it and returns {"reboot_schedule": { … }}:

FieldRules
enabledRequired boolean.
frequencyRequired when enabled is true: daily, weekly or monthly.
hourRequired when enabled is true: integer 0 to 23.
day_of_weekOptional integer 0 to 6 (0 = Sunday), used by weekly.
day_of_monthOptional integer 1 to 28, used by monthly.

Setup

GET /setup

Returns {"setup": { … }}: the same list the Services screen offers for installing components. It has status (idle or installing), percent, key and label of the component being installed, complete, stack, web_server, system_updates_running, and components. Each component has key, title, description, state, detail, recommended, action, options and reason. action names the endpoint that installs the component, so there is no second install route to learn.

Server sync

A sync reads what is already on the server (accounts, sites, databases users, certificates, PHP settings, workers, cron jobs, SSH keys and more) and brings it under the panel's management. It always starts as a preview, which changes nothing, so you can check what it would do.

POST /server/sync

curl -X POST "$PANEL/api/server/sync" \
  -H "Authorization: Bearer $TOKEN" -H 'Accept: application/json' \
  -H 'Content-Type: application/json' -d '{"mode": "preview"}'
FieldRules
modeOptional: preview (default) or apply.
onlyOptional array of resource types to limit the run to.
include_firewallOptional boolean, default false: also read firewall rules.
include_ignoredOptional boolean, default false: also process items you ignored.

Answers 202 with {"sync": { … }} and runs in the background. Only one sync runs at a time: a second start is refused with 422. Limit: 10 per minute.

GET /server/sync/latest and GET /server/sync/{run}

latest returns {"sync": { … }} for the most recent run, or {"sync": null}. {run} returns one run, with its items:

{
  "sync": {
    "id": 4,
    "mode": "preview",
    "status": "completed",
    "finished": true,
    "options": {"only": [], "include_firewall": false, "include_ignored": false},
    "totals": { … },
    "started_at": "25-11-2026 14:02:11",
    "finished_at": "25-11-2026 14:02:40",
    "items": [
      {
        "id": 31,
        "resource_type": "application",
        "resource_key": "shop",
        "action": "found",
        "confidence": "high",
        "evidence": { … },
        "reason": null,
        "model_id": null
      }
    ]
  }
}

status is pending, running, completed or failed. An item's action is found (seen, not applied), adopted, skipped (with a reason) or failed. While a run is going, poll GET /server/sync/{run}?since=<last item id> to receive only the items added since; it returns up to 500 items per call. A run that stops reporting is marked failed.

Ignore list

GET /server/sync/ignores returns {"ignores": [ … ]}, each with id, resource_type, resource_key, note and created_at.

POST /server/sync/ignores:

FieldRules
resource_typeRequired: a resource type the sync knows (for example application, system_user, database_user, cronjob, worker, ssh_key, certificate, php_settings, firewall_rule, pm2_process).
resource_keyRequired, up to 255 characters: the item's resource_key.
noteOptional, up to 255 characters.

Answers 201 with {"ignore": {"id": 5}}. Ignoring the same item again updates its note. DELETE /server/sync/ignores/{ignore} answers 204.

Handover from the v7 agent

A sync only reads: it never changes the server. The three changes a migrated server still needs are done by the handover, on request: it stops and disables the old ServerAvatar v7 agent (the sites it started keep running), repairs the boot service that restarts each account's Node.js processes after a reboot, and gives their PM2 logs a rotation policy. It restarts no application.

GET /server/sync/handover returns the current state: needed, agent (unit, running) and users (per account username, boot_unit_healthy, log_rotation). POST /server/sync/handover does it and returns {"ok", "agent", "users"}: 200 when it worked, 500 when it did not. Limit: 5 per minute.

Common errors

StatusMessage or cause
403Your role does not include management for Settings. (or Server Sync).
404Unknown sync run or ignore entry; a settings group that does not apply.
409A security update is already running.
422Validation ({"message", "errors": {"field": ["…"]}}); an SSH port in use; no SSH key to disable passwords; not enough disk for swap; a sync already running.
429Over a limit; wait for Retry-After.
500{"message", "reference"}: a server command failed. Find the reference in the error log.

On this page