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
| Key | Title in Roles | Used for |
|---|---|---|
setting | Settings | Everything under /settings, and GET /setup. |
sync | Server Sync | Everything 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
| Method | Path | Permission | Limit per minute | Purpose |
|---|---|---|---|---|
GET | /settings | setting | shared | Every settings group. |
PUT | /settings/general | setting manage | shared | Hostname, time zone, time sync. |
PUT | /settings/security | setting manage | shared | SSH port and sign-in rules. |
PUT | /settings/updates | setting manage | shared | Automatic security updates. |
POST | /settings/updates/run | setting manage | shared | Install security updates now. |
GET | /settings/updates/run | setting | polling | Progress of the latest run. |
PUT | /settings/swap | setting manage | shared | Swap file size. |
PUT | /settings/redis | setting manage | shared | Redis memory limit, policy, password. |
POST | /settings/reboot | setting manage | shared | Reboot the server. |
GET | /settings/reboot | setting | shared | Is a reboot scheduled? |
DELETE | /settings/reboot | setting manage | shared | Cancel a scheduled reboot. |
GET | /settings/reboot-schedule/presets | setting | shared | Choices for the reboot schedule. |
PUT | /settings/reboot-schedule | setting manage | shared | Recurring reboot. |
GET | /setup | setting | polling | What can be installed and what is. |
GET | /server/sync/latest | sync | shared | The most recent sync. |
POST | /server/sync | sync manage | 10 | Start a sync. |
GET | /server/sync/{run} | sync | polling | One sync, with its items. |
GET | /server/sync/ignores | sync | shared | Items you chose to ignore. |
POST | /server/sync/ignores | sync manage | 60 | Ignore an item. |
DELETE | /server/sync/ignores/{ignore} | sync manage | 60 | Stop ignoring an item. |
GET | /server/sync/handover | sync | shared | State of the v7 agent handover. |
POST | /server/sync/handover | sync manage | 5 | Finish 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.
| Group | Fields |
|---|---|
general | timezone, ntp (time sync on or off), clock_synchronized, hostname. |
security | port (SSH port), permit_root_login (yes, no or prohibit-password), password_authentication, has_ssh_key, save_enforces_ssh_access. |
updates | security_updates_enabled, auto_reboot, reboot_time, reboot_with_users, reboot_required, updates_available, security_updates_available, security_update (the latest run). |
swap | enabled, path, size, used, free (each with a _human value), system_total, unmanaged. |
redis | maxmemory, maxmemory_policy, unsafe_policies, has_password, password, password_manageable. |
reboot_schedule | enabled, 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
| Field | Rules |
|---|---|
hostname | Required, up to 64 characters: letters, digits and -, with dots between labels; each label starts and ends with a letter or digit. |
timezone | Required: an identifier from GET /timezones. |
ntp | Required boolean: keep the clock synchronised. |
PUT /settings/security
| Field | Rules |
|---|---|
port | Required, integer 1 to 65535: the SSH port. A port already in use by something else is refused. |
permit_root_login | Required: yes, no or prohibit-password. |
password_authentication | Required 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
| Field | Rules |
|---|---|
security_updates_enabled | Required boolean: install security updates automatically. |
auto_reboot | Required boolean: reboot when an update needs it. |
reboot_time | Required: now, or a time as HH:MM (24 hours). |
reboot_with_users | Optional 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
| Field | Rules |
|---|---|
size_mb | Required, 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
| Field | Rules |
|---|---|
maxmemory | Required: 0 (no limit), or a number with an optional unit b, kb, mb or gb. |
maxmemory_policy | Required: 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. |
password | Optional, 8 to 255 characters. Sets a new password. |
remove_password | Optional 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": { … }}:
| Field | Rules |
|---|---|
enabled | Required boolean. |
frequency | Required when enabled is true: daily, weekly or monthly. |
hour | Required when enabled is true: integer 0 to 23. |
day_of_week | Optional integer 0 to 6 (0 = Sunday), used by weekly. |
day_of_month | Optional 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"}'| Field | Rules |
|---|---|
mode | Optional: preview (default) or apply. |
only | Optional array of resource types to limit the run to. |
include_firewall | Optional boolean, default false: also read firewall rules. |
include_ignored | Optional 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:
| Field | Rules |
|---|---|
resource_type | Required: 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_key | Required, up to 255 characters: the item's resource_key. |
note | Optional, 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
| Status | Message or cause |
|---|---|
403 | Your role does not include management for Settings. (or Server Sync). |
404 | Unknown sync run or ignore entry; a settings group that does not apply. |
409 | A security update is already running. |
422 | Validation ({"message", "errors": {"field": ["…"]}}); an SSH port in use; no SSH key to disable passwords; not enough disk for swap; a sync already running. |
429 | Over a limit; wait for Retry-After. |
500 | {"message", "reference"}: a server command failed. Find the reference in the error log. |
Related
- Server settings, Security, Memory and Updates and restart: the same settings in the panel
- Server sync
- Services
Server operations API
Read server metrics and processes, control services, read and clear logs, list background operations, manage cron jobs and the disk cleaner, and read the server activity log through the OSS Panel API.
Central connection and add-ons API
Turn the Central management connection on or off, read its status, and the add-on routes that only a connected Central panel can call, through the OSS Panel API.