openwrt-iac / uapi / install
The signed APK feed for OpenWrt. The newest release runs on OpenWrt main and the next release cut from it. On OpenWrt 25.12, pick 3.5.0 in the list. Run these on your router as root.
uclient-fetch -qO /etc/apk/keys/uapi-feed.pub.pem \
https://openwrt-iac.github.io/feed/uapi-feed.pub.pem
echo 'https://openwrt-iac.github.io/feed/packages/all/uapi/packages.adb' \
> /etc/apk/repositories.d/uapi.list
apk update
apk add uapi
The same feed serves every package under the openwrt-iac org
(currently uapi and unbound-uci-ext). Subsequent
apk add <package> calls find them without further
setup. Pin this exact build with
apk add uapi=4.0.1-r1.
uclient-fetch -qO /etc/apk/keys/uapi-feed.pub.pem \
https://openwrt-iac.github.io/feed/uapi-feed.pub.pem
echo 'https://openwrt-iac.github.io/feed/packages/all/uapi/packages.adb' \
> /etc/apk/repositories.d/uapi.list
apk update
apk add 'uapi<4'
The feed serves this release beside 4.0.1, for routers that 4.0.1 does not
support. apk does not fall back to it on its own, so the version constraint picks it. The
constraint stays in /etc/apk/world, and apk upgrade then keeps
this major. A router that already runs it from the feed needs the same command once, or
apk upgrade fails on 4.0.1. It serves its API under
/api/v3, not /api/v4.
wget https://github.com/openwrt-iac/uapi/releases/download/v2.5.1/uapi-2.5.1-r1.apk \
-O /tmp/uapi-2.5.1.apk
apk add --allow-untrusted /tmp/uapi-2.5.1.apk
The feed serves the current release only, so this one comes from its GitHub
Release and needs no signing key or repository entry. It serves its API under
/api/v2, not /api/v4.
wget https://github.com/openwrt-iac/uapi/releases/download/v1.2.1/uapi-1.2.1-r1.apk \
-O /tmp/uapi-1.2.1.apk
apk add --allow-untrusted /tmp/uapi-1.2.1.apk
The feed serves the current release only, so this one comes from its GitHub
Release and needs no signing key or repository entry. It serves its API under
/api/v1, not /api/v4.
uapi installed under /usr/share/uapi/, registered
/api/v4=/usr/share/uapi/main.uc with uhttpd's
main instance, and restarted uhttpd. The token store
lives at /etc/config/uapi (a conffile - preserved across
upgrades).
Mint a token and try the API:
uapi-token create --name first_token --scope '*:rw'
# (the cleartext token is printed once - copy it)
curl -H "Authorization: Bearer <token>" \
https://<router>/api/v4/system
apk upgrade uapi picks up new releases from this feed. The
token store is preserved across upgrades.
The feed carries the current release only, so a downgrade does not come from it. Use the version selector at the top of this page for an older release's steps; anything other than the current release installs from its GitHub Release. A major bump also moves the API prefix, so crossing one changes the URL your clients call. See CHANGELOG for per-release breaking-change notes.