Content
Hostname Mismatch and Unable to Edit Host Name Field - Feb 29, 2024
Added by Tom Ruhland 9 months ago
Hey -
I am brand new here, so I appreciate your patience!
I have installed OP via Docker on an internal VM. I do not intend for it to be world facing.
I have gotten to the point where it is up and I can log in. When I enter my FQDN:8080 or my IPaddress:8080 I can get in without issue. But I get the message:
Hostname setting mismatch
Your application is running with its host name setting set to localhost:8080
, but the request is a FDQN:8080 hostname. This will result in errors! Go to System settings and change the "Host name" setting to correct this.
(FDQN is of course an alias for my actual machine name and domain).
When I go to System Settings, I can see the Host Name Field that says "localhost:8080", but I can not edit it. It's a locked field.
I have modified my .env OPENPROJECT_HOST__NAME= to my FQDN:8080
After restarting everything and logging back in I still get the error. I also get the error on different browsers and machines.
Of course there is no error when I access it via the VM. (because it's the localhost!)
I can't find an answer to this - anyone know the solution?
Thank you in advance!
-T
Replies (1)
Hi Tom,
The setting of the host name over the 'System Settings' only works in package based installations.
Changing the OPENPROJECT_HOST__NAME should work.
So the first step I would recommend to find out where the issue happens is that you check if the OPENPROJECT_HOST__NAME is set correctly in the container.
You can do so by open a bash on the web container:
And then enter the following command to see whats value is set for OPENPROJECT_HOST__NAME:
env |grep OPENPROJECT_HOST__NAME
If the value doesn't match then docker-compose is ignoring your .env file fore some reasons.
What you can try in that case would be to force recreate of the container by using the following command:
Best regards
Tizian