Description
Problem
When running LemonLDAP-ng inside Docker with multiple or long domain names, the embedded NGINX instance may fail to start with the following error:
[emerg] could not build server_names_hash,
you should increase server_names_hash_bucket_size: 64
This happens because the default NGINX configuration uses a fixed server_names_hash_bucket_size, which is too small for environments with long fully qualified domain names.
Impact
- LemonLDAP-ng container fails to start
- Authentication service becomes unavailable
- OpenID Connect endpoints are unreachable
- Cascading failures in dependent applications (OIDC login loops, 302 redirects, UI errors)
Current limitation
At the moment, there is no supported way to configure this NGINX parameter through:
- LemonLDAP-ng configuration JSON
- Environment variables in Docker
- Helm / deployment parameters
The only workaround is to manually override the NGINX configuration inside the container.
Proposed improvement
Expose an environment variable (or equivalent configuration mechanism) in the Docker image to allow setting:
server_names_hash_bucket_size
Optionally also:
server_names_hash_max_size
Example desired usage
docker run \
-e NGINX_SERVER_NAMES_HASH_BUCKET_SIZE=128 \
-e NGINX_SERVER_NAMES_HASH_MAX_SIZE=512 \
lemonldap-ng
or in docker-compose:
environment:
NGINX_SERVER_NAMES_HASH_BUCKET_SIZE: 128
NGINX_SERVER_NAMES_HASH_MAX_SIZE: 512
Suggested benefit
- Makes LemonLDAP-ng more robust in multi-domain deployments
- Avoids container startup failures in production
- Reduces need for custom image overrides
- Improves cloud/Kubernetes compatibility
Additional context
This issue typically occurs in environments with:
- Long FQDNs (e.g.
*.env.region.company.tld)
- Multiple virtual hosts in NGINX
- Multi-tenant authentication setups
- Reverse proxy architectures
Description
Problem
When running LemonLDAP-ng inside Docker with multiple or long domain names, the embedded NGINX instance may fail to start with the following error:
This happens because the default NGINX configuration uses a fixed
server_names_hash_bucket_size, which is too small for environments with long fully qualified domain names.Impact
Current limitation
At the moment, there is no supported way to configure this NGINX parameter through:
The only workaround is to manually override the NGINX configuration inside the container.
Proposed improvement
Expose an environment variable (or equivalent configuration mechanism) in the Docker image to allow setting:
Optionally also:
Example desired usage
or in docker-compose:
Suggested benefit
Additional context
This issue typically occurs in environments with:
*.env.region.company.tld)