Upgrade Command
This page covers release checks, downloads, and application. Back up the binary, WebUI, configuration, and persistent data before a production upgrade, and prepare a rollback.
upgrade
Checks, downloads, or applies OxiDNS upgrades from GitHub Releases.
Supported subcommands:
upgrade checkupgrade downloadupgrade apply
Common usage:
oxidns upgrade
oxidns upgrade --force
oxidns upgrade check
oxidns upgrade download --target latest
sudo oxidns upgrade apply
sudo oxidns upgrade apply --no-restart
Common arguments:
--target <TAG|latest>- Release tag or
latest. - Default:
latest
- Release tag or
--repository <OWNER/REPO>- GitHub repository.
- Default:
svenshi/oxidns
--asset <NAME|auto>- Release asset name.
autoselects the archive for the current platform and build bundle. - Default:
auto
- Release asset name.
-c, --config <PATH>- Runtime configuration file used to read
api.http.webui.rootwhen--webui-diris not set. - When omitted,
upgradefirst checksconfig.yamlin the current directory. On Linux package installs, it also uses/etc/oxidns/config.yamlwhen present.
- Runtime configuration file used to read
-d, --working-dir <DIR>- Base directory for runtime-relative paths, with the same semantics as
start -d/--working-dir. - When omitted and the Linux package configuration is detected,
/var/lib/oxidnsis used; otherwise the current directory is used.
- Base directory for runtime-relative paths, with the same semantics as
--bundle <auto|full|standard|minimal>- Selects the release build bundle when
--asset autois used. - Default:
auto, which follows the current binary's build bundle. fulluses the legacy asset name, for exampleoxidns-x86_64-unknown-linux-musl.tar.gz;standard/minimaluse slim asset names such asoxidns-standard-x86_64-unknown-linux-musl.tar.gz.
- Selects the release build bundle when
--cache-dir <DIR>- Directory for cached upgrade files.
- Default:
./upgrade-cache
--backup-dir <DIR>- Directory for binary backups before
apply. - Default:
./upgrade-backups
- Directory for binary backups before
--webui-dir <DIR>- Directory where the WebUI static assets are installed during
apply; relative paths are resolved against-d/--working-dir, and should stay aligned withapi.http.webui.root. - When omitted,
upgradefirst infers it fromapi.http.webui.root; if no WebUI root is configured, it uses./webui.
- Directory where the WebUI static assets are installed during
--skip-webui- For
apply, skip the WebUI directory upgrade and replace only the binary.
- For
--no-restart- Skip restarting the service after a successful
apply. By default the installed service is restarted automatically via the system service manager (systemd / launchd / Windows SCM).
- Skip restarting the service after a successful
--allow-prerelease- Allows prerelease releases.
--force- For
apply, continue downloading, verifying, and replacing even when the selected release is not newer than the current version.
- For
--timeout <DURATION>- HTTP timeout such as
30sor2m.
- HTTP timeout such as
--socks5 <ADDR>- Optional SOCKS5 proxy.
--insecure-skip-verify- Disables TLS certificate verification.
--github-token <TOKEN>- GitHub personal access token for API requests, used to raise the rate limit or access private repositories.
Behavior:
checkonly queries the release and compares versions.downloaddownloads the archive and verifies SHA256 with the GitHub release assetdigestfield.- An explicit
--assetalways wins and skips--bundleinference. - Omitting the subcommand defaults to
apply. applyupdates only when a newer version is available by default.--forceforces the update.- On Unix,
applyunpacks the.tar.gz, backs up the current binary, and replaces it. On Windows,applyunpacks the.zip, backs up and replaces the binary, and also upgrades the WebUI directory. - By default, after replacing the binary
applybacks up and installs the archive'swebui/directory into--webui-dir;--skip-webuiskips it, and an archive withoutwebui/is skipped without affecting the binary upgrade. - In the default Debian package layout,
sudo oxidns upgrade applyinfers the WebUI directory from/etc/oxidns/config.yamland/var/lib/oxidns; when/var/lib/oxidns/webuiis a symlink, the real target directory is updated. - After a successful
apply, the service is restarted automatically via the system service manager. Pass--no-restartto skip the automatic restart. - After a successful
apply, the CLI asks whether to clean the cache and backup directories. The default answer isY.