From bd67effa76c642f33ebbb6ff951fc3bd0b54c889 Mon Sep 17 00:00:00 2001 From: Matt Bentley Date: Sun, 1 Mar 2026 08:08:18 -0500 Subject: [PATCH] Added java arg override info Signed-off-by: Matt Bentley --- KNOWN_ISSUES.md | 5 ++--- README.md | 9 +++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md index 4502add..cb357b8 100644 --- a/KNOWN_ISSUES.md +++ b/KNOWN_ISSUES.md @@ -36,8 +36,7 @@ While MongoDB is fairly robust, the persistent data can become corrupt if a clea > [!WARNING] > **Deprecation and Removal Notice** - armv7l images will no longer be available starting with the v5.15.20 and later versions. See [this issue](https://github.com/mbentley/docker-omada-controller/issues/542) describing the change. The last version that will be available for `armv7l` is `5.15.8.2`. - -> [!WARNING] +> > Do not run the Omada Controller on your `armv7l`/`armhf` (32 bit arm) based operating system! If you're running as Raspberry Pi 3, 4, Pi Zero 2W, you should [run a 64 bit operating system](https://www.raspberrypi.com/news/raspberry-pi-os-64-bit/) so you can use the `arm64` image which is supported. At any time, TP-Link can break compatibility with 32 bit arm and there will be no upgrade path forward! You have been warned! #### Unsupported Base Image for `armv7l` @@ -52,7 +51,7 @@ The `armv7l` architecture is 32 bit and MongoDB is no longer available as a pre- Systems such as Raspberry Pis may not have sufficient memory to run with the default memory settings of this image. If you system only has 1 GB of RAM, I would highly recommend adjusting the Xmx arguments. This can be done by one of two ways: -1. Setting the `_JAVA_OPTIONS` environment variable; for example, `_JAVA_OPTIONS="-Xms512m -Xmx2048m"`. This will not modify the parameter so tools like `ps` will still show the original value but this variable takes priority over the CLI args. +1. Setting the `_JAVA_OPTIONS` environment variable; for example, `_JAVA_OPTIONS="-Xms128m -Xmx768m"`. This will not modify the parameter so tools like `ps` will still show the original value but this variable takes priority over the CLI args. 1. Overriding the `CMD` [as seen in this issue here](https://github.com/mbentley/docker-omada-controller/issues/198#issuecomment-1100485810). Changing these values would be necessary on these low resource systems to prevent the operating system from killing the container due to it thinking it can allocate more memory than it should. The controller process may still actually functionally require more memory so your mileage may vary in terms of the impact of running on such a low resource system. diff --git a/README.md b/README.md index b2b61da..e075817 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,8 @@ If you have issues running the controller, feel free to [create a Help discussio In order to ensure that the container does not attempt to use excessive amounts of CPU or memory, it is strongly suggested that you set resource constraints on your container. The examples do not specifically have those set as the values you set may depend on your system's available resources. A safe starting point, which I personally use, is the `docker run...` equivalent of `--cpus 2 --memory 4g --memory-swap 5g`. Adapt this for whatever method you use whether it's `docker run...`, `docker compose`, k8s manifests, or the Helm chart. +If you wish to modify the default JVM arguments of `-Xms128m -Xmx1024m` to something else, you can do so by utilizing the `_JAVA_OPTIONS` environment variable. See the [Low Resource Systems](KNOWN_ISSUES.md#low-resource-systems) section of the known issues for more details. + ### Controller Backups While you can take backups of your controller by making a copy of the persistent data, the chance of data corruption exists if you do so while the container is running as there is a database used for persistence. The best way to take backups is to use the automatic backup capabilities within the controller itself. Go to `Settings` > `Maintenance` > `Backup` and scroll down to `Auto Backup` to enable and configure the feature. These backups can be restored as a part of the installation process on a clean controller install. If you do not see `Settings` > `Maintenance`, you may be drilled down into a sites' configuration. Make sure you're in the Global view as settings that impact the controller as a whole, like backups, are in that Global view. @@ -287,7 +289,6 @@ There are some differences between the build steps for `amd64`, `arm64`, and `ar > [!NOTE] > Regardless of how you run the container, I would strongly recommend adding CPU and memory limits for the container. See the section on [Container Resource Constraints](#container-resource-constraints) in the Best Practices for Operation section of the documentation. - These example below are based on `docker run...` commands. See [Using Docker Compose](#using-docker-compose) for compose examples or [Using k8s](#using-k8s) for example k8s manifests. See [Optional Environment Variables](#optional-environment-variables) for details on the environment variables that can modify the behavior of the controller inside the container. To run this Docker image and keep persistent data in named volumes: ### Using `net=host` @@ -338,9 +339,6 @@ docker run -d \ > [!WARNING] > In most cases, overriding the default port numbers using environment variables mostly ONLY works the first time the container is started by default. After the database is initialized, the controller app reads the port configuration from the database and any modification of the ports through the controller's web interface will also be persisted to the database as well. If you wish to modify the ports using the environment variables on subsequent container startups, you must also set the `WEB_CONFIG_OVERRIDE` environment variable to `true` and they'll be re-read on next startup. -> [!TIP] -> tl;dr - If you make changes to the ports via the web UI, you should update the environment variables to match as well, just to be safe as there are some odd quirks to how the ports are read. - There are two sets of ports for the main controller (not including the specific ports used for a variety of management functions; see the [Optional Environment Variables](#optional-environment-variables) section for full details on those): * One set for HTTP/HTTPS for the controller itself @@ -348,6 +346,9 @@ There are two sets of ports for the main controller (not including the specific * Another set for HTTP/HTTPS for the captive portal, typically used for authentication to a guest network * 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. +> [!TIP] +> If you make changes to the ports via the web UI, you should update the environment variables to match as well, just to be safe as there are some odd quirks to how the ports are read. + ### Running Rootless There is an optional ability to run the container in a rootless mode. This version has fewer pre-flight capabilities to do tasks like set permissions for you but works in environments where running containers as root is blocked (i.e. - many Kubernetes environments). To activate the [rootless entrypoint](entrypoint-rootless.sh) the following conditions must be met: