Added WEB_CONFIG_OVERRIDE to force overriding the ports on startup

* Fixes #729

Signed-off-by: Matt Bentley <mbentley@mbentley.net>
This commit is contained in:
Matt Bentley
2026-02-15 06:12:36 -05:00
parent f2d149626e
commit dffdeae91c
11 changed files with 27 additions and 6 deletions
+2 -1
View File
@@ -319,7 +319,7 @@ __tl;dr__: Always make sure the environment variables for the ports match any ch
If you want to change the ports of your Omada Controller to something besides the defaults, there is some unexpected behavior that the controller exhibits. There are two sets of ports: one for HTTP/HTTPS for the controller itself and another for HTTP/HTTPS for the captive portal, typically used for authentication to a guest network. The controller's set of ports, which are set by the `MANAGE_*_PORT` environment variables, can only be modified using the environment variables on the first time the controller is started. If persistent data exists, changing the controller's ports via environment variables will have no effect on the controller itself and can only be modified through the web UI. On the other hand, the portal ports will always be set to whatever has been set in the environment variables, which are set by the `PORTAL_*_PORT` environment variables.
If you absolutely need to have the ports re-read from the environment variables, you can add `web.config.override=true` to the `omada.properties` file inside the container and they'll be read on next startup.
If you absolutely need to have the ports re-read from the environment variables, you can set the `WEB_CONFIG_OVERRIDE` environment variable to `true` and they'll be re-read on next startup.
### Running Rootless
@@ -389,6 +389,7 @@ The Helm charts are published to [mbentley/omada-controller-helm](https://hub.do
| `TLS_1_11_ENABLED` | `false` | `true`, `false` | Re-enables TLS 1.0 & 1.1 if set to `true` | >= `4.1` |
| `TZ` | `Etc/UTC` | _\<many\>_ | See [Time Zones](#time-zones) for more detail | >= `3.2` |
| `UPGRADE_HTTPS_PORT` | `8043` | `1024`-`65535` | Dedicated HTTPS port for upgrades, separate from the main Controller port | >= `6.1` |
| `WEB_CONFIG_OVERRIDE` | `false` | `true`, `false` | Forces the controller to re-read port configuration from `omada.properties` on startup; see [Using non-default ports](#using-non-default-ports) | >= `5.x` |
Documentation on the ports used by the controller can be found in the [TP-Link FAQ](https://support.omadanetworks.com/us/document/13090/).
+1
View File
@@ -26,6 +26,7 @@ services:
- PORT_TRANSFER_V2=29815
- PORT_RTTY=29816
- PORT_DEVICE_MONITOR=29817
- WEB_CONFIG_OVERRIDE=false
- SHOW_SERVER_LOGS=true
- SHOW_MONGODB_LOGS=false
- SSL_CERT_NAME=tls.crt
+1
View File
@@ -34,6 +34,7 @@ services:
- PORT_TRANSFER_V2=29815
- PORT_RTTY=29816
- PORT_DEVICE_MONITOR=29817
- WEB_CONFIG_OVERRIDE=false
- SHOW_SERVER_LOGS=true
- SHOW_MONGODB_LOGS=false
- SSL_CERT_NAME=tls.crt
+6 -3
View File
@@ -34,6 +34,9 @@ setup_environment() {
PORT_DEVICE_MONITOR="${PORT_DEVICE_MONITOR:-29817}"
UPGRADE_HTTPS_PORT="${UPGRADE_HTTPS_PORT:-8043}"
# WEB CONFIG OVERRIDE
WEB_CONFIG_OVERRIDE="${WEB_CONFIG_OVERRIDE:-false}"
# EXTERNAL MONGODB
MONGO_EXTERNAL="${MONGO_EXTERNAL:-false}"
EAP_MONGOD_URI="${EAP_MONGOD_URI:-mongodb://127.0.0.1:27217/omada}"
@@ -126,9 +129,9 @@ update_port_configuration() {
done
}
update_mongodb_properties() {
update_general_properties() {
# update stored property values when different of environment defined values (works for any value)
for ELEM in MONGO_EXTERNAL EAP_MONGOD_URI
for ELEM in WEB_CONFIG_OVERRIDE MONGO_EXTERNAL EAP_MONGOD_URI
do
# convert element to key name
KEY="$(echo "${ELEM}" | tr '[:upper:]' '[:lower:]' | tr '_' '.')"
@@ -660,7 +663,7 @@ common_setup_and_validation() {
setup_directories
print_timezone_info
update_port_configuration
update_mongodb_properties
update_general_properties
fix_permissions
import_ssl_certificate
enable_tls_1_11
@@ -44,3 +44,5 @@ data:
PORT_RTTY: "29816"
PORT_DEVICE_MONITOR: "29817"
WEB_CONFIG_OVERRIDE: "false"
+1 -1
View File
@@ -3,5 +3,5 @@ name: omada-controller-helm
description: Helm chart for deploying the TP-Link Omada SDN Controller
icon: https://static.tp-link.com/assets/images/icon/favicon-omada.ico
type: application
version: 1.1.4
version: 1.1.5
appVersion: "6.1.0.19"
+3 -1
View File
@@ -14,6 +14,7 @@ The Helm chart releases do not correspond to the controller version so below is
| Controller Version | Chart Version | Change Notes |
| ------------------ | ------------- | :------------ |
| `6.1.0.19` | `1.1.5` | Add `webConfigOverride` option to force re-read of port configuration |
| `6.1.0.19` | `1.1.4` | Improve secret handling and external MongoDB support |
| `6.1.0.19` | `1.1.3` | Adds the ability to configure an initcontainer |
| `6.1.0.19` | `1.1.2` | Fix #721; duplicate port in values.yaml |
@@ -90,6 +91,7 @@ The following table lists the configurable parameters of the Omada Controller ch
| `config.ports.transferV2` | Device transfer port (v2) | `29815` |
| `config.ports.rtty` | RTTY connection port | `29816` |
| `config.ports.deviceMonitor` | Device monitoring port (Omada 6+) | `29817` |
| `config.webConfigOverride` | Force re-read of port configuration from properties on startup | `false` |
| `config.rootless` | Run controller in rootless mode | `true` |
| `config.showMongoDBLogs` | Display MongoDB logs (auto-disabled with external MongoDB) | `false` |
| `config.showServerLogs` | Display server logs in container output | `true` |
@@ -301,7 +303,7 @@ When using a LoadBalancer service, ensure your load balancer supports both TCP a
### To a newer chart version
```bash
helm upgrade omada-controller oci://registry-1.docker.io/mbentley/omada-controller-helm --version 1.1.4
helm upgrade omada-controller oci://registry-1.docker.io/mbentley/omada-controller-helm --version 1.1.5
```
### Upgrading the Application Version
@@ -80,6 +80,8 @@ spec:
value: {{ .Values.config.ports.rtty | quote }}
- name: PORT_DEVICE_MONITOR
value: {{ .Values.config.ports.deviceMonitor | quote }}
- name: WEB_CONFIG_OVERRIDE
value: {{ .Values.config.webConfigOverride | quote }}
- name: ROOTLESS
value: {{ .Values.config.rootless | quote }}
- name: SHOW_SERVER_LOGS
+4
View File
@@ -67,6 +67,10 @@ config:
# Port used for device monitoring (New in Omada 6)
deviceMonitor: 29817
# Forces the controller to re-read port configuration from omada.properties on startup.
# Useful when management ports have been changed via the web UI and need to be overridden.
webConfigOverride: false
# Configures the Omada Controller to run in rootless mode. When this is enabled, the pod
# and container security contexts are set to non-root user IDs.
rootless: true
+3
View File
@@ -323,6 +323,9 @@ case "${OMADA_MAJOR_VER}" in
{ \
echo "" ;\
echo "" ;\
echo "# web config override" ;\
echo "web.config.override=false" ;\
echo "" ;\
echo "# external mongodb" ;\
echo "mongo.external=false" ;\
echo "eap.mongod.uri=mongodb://127.0.0.1:27217/omada" ;\
+2
View File
@@ -64,6 +64,8 @@ spec:
value: "29816"
- name: PORT_DEVICE_MONITOR
value: "29817"
- name: WEB_CONFIG_OVERRIDE
value: "false"
- name: SHOW_SERVER_LOGS
value: "true"
- name: SHOW_MONGODB_LOGS