Package repositories
Channels
The distribution feed includes the following channels:
devchannel: this channel is intended for unstable and development releases.stagingchannel: this channel contains pre-release builds and packages that passed QA and can be tested by end users.stablechannel: this channel is for stable releases.subscriptionchannel: this channel is reserved for stable releases that have undergone additional testing. Access to this channel is restricted to machines with a valid subscription.
Repositories
Official package repositories are hosted at https://updates.nethsecurity.nethserver.org.
Each release in the distribution feed is associated with a fixed repository. The fixed repository contains the image released and the packages. The repository will receive updates compatible with the same release.
Examples
Here are some examples of releases and their corresponding repositories:
-
Dev example:
8.8.0-dev.42.20260604123010.a1b2c3dand its repository is available athttps://updates.nethsecurity.nethserver.org/dev/8.8.0-dev.42.20260604123010.a1b2c3d -
Staging example:
8.8.0and its repository is available athttps://updates.nethsecurity.nethserver.org/staging/8.8.0 -
Stable example:
8.8.0and its repository is available athttps://updates.nethsecurity.nethserver.org/stable/8.8.0 -
Branch example:
8.8.0-PR123.17.20260604123010.a1b2c3dand its repository is available athttps://updates.nethsecurity.nethserver.org/PR123/8.8.0-PR123.17.20260604123010.a1b2c3d
APK repository configuration
Repositories are now configured using apk variables instead of the usual rewrite of the feeds. This allows greater customization and standardization.
The /etc/apk/repositories.d/distfeeds.list contains a standard entry:
https://${endpoint}/${version}/targets/${target_arch}/packages/packages.adb
https://${endpoint}/${version}/packages/${package_arch}/base/packages.adb
https://${endpoint}/${version}/packages/${package_arch}/luci/packages.adb
https://${endpoint}/${version}/packages/${package_arch}/nethsecurity/packages.adb
https://${endpoint}/${version}/packages/${package_arch}/packages/packages.adb
Since all scripts inside /etc/apk/repositories.d/*list are executed by alphabetical order, we can define the following:
-
/etc/apk/repositories.d/99-defaults.listthis file should contain the defaults that are applied only if the variables are not set. It uses theset -defaultoption for apk repositories that allows to set the variables if uset. -
/etc/apk/repositories.d/01-enterprise.listis created only when there’s a valid subscription, this overwrites theendpointvariable with the correct path and authentication.
The script distfeed-setup is in charge of making and managing the main distfeed.list file and 01-enterprise.list if needed.
Customization options
It’s possible by nature of apk repositories override the variables added by adding the /etc/apk/repositories.d/98-overrides.list. This allows to overwrite previously set variables as the user sees fit.
The repository variables are generated in /etc/apk/repositories.d/99-defaults.list.
They include target_arch, package_arch, repo_channel, version, and the default endpoint.
If you need to override one of these values, create /etc/apk/repositories.d/98-overrides.list and write the variables there.
If you want to change the base URL, add the variable override you need in 98-overrides.list, apk will then handle by itself the replacement.
Image updates work differently, they use the ns-plug.config.repository_url uci config with the /etc/repo-channel. To switch channels for images, do the following:
echo "<channel>" > /etc/repo-channel
uci set ns-plug.config.repository_url="https://updates.nethsecurity.nethserver.org/$(cat /etc/repo-channel)"
uci commit ns-plug
distfeed-setup
You can now refresh the update page, and the new repository channel will be used.
Force updates on a subscription machine
A machine with a valid subscription receives updates from the subscription channel. The subscription channel contains stable releases that have undergone additional testing. Updates are pushed to the subscription channel after one week from the release date.
If you have a machine with a valid subscription and want to force an update, you can do the following:
echo 'set repo_channel=stable' > /etc/apk/repositories.d/98-overrides.list
echo 'set endpoint=updates.nethsecurity.nethserver.org/${repo_channel}' >> /etc/apk/repositories.d/98-overrides.list
apk update
apk upgrade
You can replace the repo_channel with the following options:
stablepackages released beforehand to communitystagingpackages yet to be released, but already been tested internally
At the end, you can move the file for later use.
mv /etc/apk/repositories.d/98-overrides.list /etc/apk/repositories.d/98-overrides.list.staging
apk update
Upstream OpenWrt repositories
You can add custom feeds by adding the repos the /etc/apk/repositories.d/customfeeds.list file.
To enable OpenWrt package repositories use the following commands
cat << 'EOF' > /etc/apk/repositories.d/customfeeds.list
https://downloads.openwrt.org/releases/${openwrt_version}/targets/${target_arch}/packages/packages.adb
https://downloads.openwrt.org/releases/${openwrt_version}/packages/${package_arch}/base/packages.adb
https://downloads.openwrt.org/releases/${openwrt_version}/packages/${package_arch}/luci/packages.adb
https://downloads.openwrt.org/releases/${openwrt_version}/packages/${package_arch}/packages/packages.adb
https://downloads.openwrt.org/releases/${openwrt_version}/packages/${package_arch}/routing/packages.adb
EOF