Skip to main content

Apply host network, access-scope or listen-port changes

PUT 

/settings/network

Required role: admin. Only an account or token with the admin role can call this operation.

Example request
curl --request PUT \
--header "Authorization: Bearer $HOSERVA_TOKEN" \
--header "Content-Type: application/json" \
--data @body.json \
"https://$HOSERVA_HOST:8008/api/v1/settings/network"

Address, DNS and gateway changes are written to one managed ifupdown file under /etc/network/interfaces.d/ and applied with a 60-second confirm-or-revert: unless confirmNetworkSettings is called over the new configuration before the window expires (or the daemon dies), the previous file is restored. Access scope and listen port apply without that window — access scope takes effect immediately; a listen-port change is persisted and used on the next daemon start. Addressing fields are refused when the backend is not ifupdown.

Request​

Responses​

Settings after the apply, including any pending confirm window.