[BUG] COOKIE_SECURE=false causes docker container be unable to start
Author: sparx82Created Sep 15, 2026Updated Sep 17, 2026
Labelsfixed in next release
Pre-flight checklist
- I have searched existing issues and this bug has not been reported yet
- I am running the latest available version of TREK
- I have read the Troubleshooting guide and my issue is not covered there
TREK version
4.2.1
Describe the bug
Hi All,
I'm running TREK locally in a Docker environment on Debian (TrueNAS). If I deploy it with out the COOKIE_SECURE env set, it starts but obviously I cannot login because it says that it cannot login without HTTPS. If I then set COOKIE_SECURE=false the container doesn't start up anymore but only throws this error in the log:
TREK: 1: Syntax error: end of file unexpected (expecting "fi")
I deploy the container using Portainer.
Steps to reproduce
Set COOKIE_SECURE=false
Expected behavior
Starts up
Deployment method
Other
Host OS
TrueNAS
Accessing TREK from
Desktop browser
Browser (if applicable)
No response
Relevant logs or error output
Screenshots
No response
Additional context
No response
Source: liketrek/TREK