Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [OpenProject] <unable to change the host name in the 'System Settings' > #1690

Open
kejXero opened this issue Dec 29, 2024 · 21 comments
Open
Labels
bug Something isn't working stale Element will be closed automatically

Comments

@kejXero
Copy link

kejXero commented Dec 29, 2024

Description

I am running OpenProject as an Home Assistant add-on. I have changed the port number from the default 8080 to 18080, due port is being used in another add-on. After login, at the buttom of the webpage, the following is stated: Hostname setting mismatch. Your application is running with its host name setting set to localhost:8080, but the request is a 192.168.XX.YY hostname. This will result in errors! Go to System settings and change the "Host name" setting to correct this. It is not possible to change the host name from the current localhost:8080.

Reproduction steps

1. Go to 'Login screen'
2. Click on 'System settings / General'
3. Scroll down to 'Host name'
4. See error, unable to change host name from localhost.

Addon Logs

Clip of the log...

2024-12-29 17:25:33,996 INFO reaped unknown pid 47590 (exit status 0)
I, [2024-12-29T17:25:38.143351 #1003]  INFO -- : [d6598e5d-6282-4282-96e4-13e24cc50d21] method=GET path=/ format=*/* controller=HomescreenController action=index status=302 allocations=1601 duration=20.80 view=0.00 db=10.70 location=http://127.0.0.1:8080/login user=3
2024-12-29 17:25:39,144 INFO reaped unknown pid 47599 (exit status 0)
I, [2024-12-29T17:25:43.305990 #1003]  INFO -- : [bbcf19ce-a44a-488d-986d-ad9fbf86709a] method=GET path=/ format=*/* controller=HomescreenController action=index status=302 allocations=1613 duration=17.21 view=0.00 db=8.75 location=http://127.0.0.1:8080/login user=3
2024-12-29 17:25:44,309 INFO reaped unknown pid 47607 (exit status 0)
I, [2024-12-29T17:25:48.457679 #1003]  INFO -- : [d680f0ec-8286-4ea3-b37d-8dd4d7057d97] method=GET path=/ format=*/* controller=HomescreenController action=index status=302 allocations=1614 duration=21.72 view=0.00 db=11.00 location=http://127.0.0.1:8080/login user=3

Architecture

No response

OS

No response

@kejXero kejXero added the bug Something isn't working label Dec 29, 2024
@ash286
Copy link

ash286 commented Dec 31, 2024

I agree with this issue. Neither it allows to change hostname from the System settings / General tab nor it takes from Add-on config.yaml files. I can't even set OPENPROJECT_HTTPS="true" It doesn't take any environment variables set in the config.yaml file.

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Element will be closed automatically label Jan 12, 2025
@ash286
Copy link

ash286 commented Jan 14, 2025

I am still waiting.

@kejXero
Copy link
Author

kejXero commented Jan 14, 2025

Same here. The issue is still open

@alexbelgium
Copy link
Owner

@baldarn Hi, I think you initially set up the add-on would you have time to check? Or should I discontinue the add-on? Thanks!

@baldarn
Copy link
Contributor

baldarn commented Jan 15, 2025

I will try and take a look.

I didn't see this issue till you pinged me ;)

@alexbelgium
Copy link
Owner

I will try and take a look.

I didn't see this issue till you pinged me ;)

Thanks! No worry, it's not like we're on a payroll ;-)

@baldarn
Copy link
Contributor

baldarn commented Jan 15, 2025

@ash286 @kejXero
i strongly recommend to use a proxy over the addon.

you can use nginix proxy admin
this can allow you to rewrite the hostname, add an ssl certificate, without changing the confs of the other addons

@ash286
Copy link

ash286 commented Jan 17, 2025

Thank you @alexbelgium and @baldarn for responding to this even though you are not on a payroll. I really appreciate it.

@ash286 @kejXero i strongly recommend to use a proxy over the addon.

you can use nginix proxy admin this can allow you to rewrite the hostname, add an ssl certificate, without changing the confs of the other addons

I'm not sure how can I combine nginix with cloudflare tunnel that I'm using. For testing purpose, I tried assigning variables OPENPROJECT_HTTPS, OPENPROJECT_HOST__NAME, SERVER_PROTOCOL_FORCE_HTTPS and OPENPROJECT_PORT direclty using portainer that created another container and worked but it still can't work over cloudflare tunnel. I mean I get the login screen but as soon as I make login it doesn't redirect into anything and all I see is a white screen. This is now different issue but, I have similar problem with nextcloud where I can see nextcloud login screen over the other end of cloudflare tunnel but loggin in doesn't take me anywehre. (Apparently, nextcloud has a configuration option to set extern url in trusted_domains and to change port).

I am a bit lost with Openproject and nextcloud. Your help and suggestions would be great🙏

@github-actions github-actions bot removed the stale Element will be closed automatically label Feb 23, 2025
Copy link
Contributor

github-actions bot commented Mar 2, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Element will be closed automatically label Mar 2, 2025
@ash286
Copy link

ash286 commented Mar 2, 2025

@baldarn I am sorry but I am not really sure how can I achieved the following you mentioned

you can use nginix proxy admin
this can allow you to rewrite the hostname, add an ssl certificate, without changing the confs of the other addons

I tried Redirection Host as well as Proxy Hosts options in nginix proxy admin but it does not rewrite any request comming through Cloudflared add-on

I have changed port 8080 to 8089 in Openproject config but when I log into Openproject using local ip or http://homeassistant.local:8089 it keeps showing the following footer

Image

And when I try to access Openproject via url through Cloudflared tunnel, I get login page but as soon as I make login it shows just blank page with an error footer at the bottom. Please see the screenshot

Image

What am I doing wrong?

@baldarn
Copy link
Contributor

baldarn commented Mar 3, 2025

my suggestion is to let https only on the proxy and then forward http traffic.

then disable ssl on openproject

this should work

@kejXero
Copy link
Author

kejXero commented Mar 3, 2025 via email

@ash286
Copy link

ash286 commented Mar 3, 2025

Does Openproject still have the ability to send out emails with links back to the server?

Would these links not be obsolete if we are not able to set the correct address?

No I don't think emailing functionality would affect. Email functionality is depend on SMTP setup and that would be withing docker while getting access to docker is front end thing.

@ash286
Copy link

ash286 commented Mar 4, 2025

my suggestion is to let https only on the proxy and then forward http traffic.

then disable ssl on openproject

this should work

This is what I am doing within Cloudflared addon. Calibre does not have SSL and I'm accessing it in similar way you mentioned but Openproject does not work.

Secondly, I tried using NPM to setup proxy but NPM does not seem working for me. Can you access Openproject via cloudflare tunnel? if yes, plesae guide me through your way.

@baldarn
Copy link
Contributor

baldarn commented Mar 4, 2025

I confirm the issue

A trick i did to have this working was editing the env with portainer addon

you can change that value changing the env var OPENPROJECT_HOST__NAME

give it a try.

@ash286
Copy link

ash286 commented Mar 4, 2025

A trick i did to have this working was editing the env with portainer addon

you can change that value changing the env var OPENPROJECT_HOST__NAME

Thank you for confirming the issue. I changed hostname env var OPENPROJECT_HOST__NAME using with portainer addon but the main problem is still there that I am seeing only a while blank page when accessing openproject via cloudflare tunnel. I tried env OPENPROJECT_HTTPS = true but docker doesn't like it so chnaged it back to OPENPROJECT_HTTPS = false.

I also added bridge IP into proxy list in configuration.yaml.

What else am I mssing?

@ash286
Copy link

ash286 commented Mar 5, 2025

I was looking at the page source and found some clue. Apparently it does load the page over live domain via cloudflare tunnel but somehow style="display:none" is added into the page and that hides entire page while page loaded using local networks has style="". When I removed display:none from style, it displayed the page but of course when reloaded the page or cliked on any menu item style="display:none" appeared again and page became hidden.

See this screenshot

Image

@ash286
Copy link

ash286 commented Mar 5, 2025

OK. I now solved this🤩. The culprit was Rocket Loader in cloudflare tunnel. By disabling it problem is solved for now :)

@ash286
Copy link

ash286 commented Mar 6, 2025

@baldarn @alexbelgium Do you think that updating openproject version to latest 15.3.x would solve the problem of hostname not being updated?

@baldarn
Copy link
Contributor

baldarn commented Mar 6, 2025

@baldarn @alexbelgium Do you think that updating openproject version to latest 15.3.x would solve the problem of hostname not being updated?

I don't think so, the hostname is configured via the env var, so is not editable via the UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Element will be closed automatically
Projects
None yet
Development

No branches or pull requests

4 participants