-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
nginx proxy manager configuration #206
Comments
Not sure about nginx proxy manager, but have you seen the nginx reverse proxy example in the docs? |
I know this example. But in nginx proxy manager it looks a bit different. In this issue there is a similar problem. This is the config for the host
|
So the file at conf.d/include/proxy.conf contains the proxy config adapted from the docs? Where do you proxy the api requests? If all is set up correctly, you should be able to reach /api/v1/info through the proxy - on the same domain/ip +port as the frontend. Or you could just continue to expose the api ports and use the api directly, but that kind of defeats the purpose of a proxy. I'm not sure if I can help you here, while I know my way around nginx I don't know how the nginx proxy manager is different. You might want to ask in the forum, someone else might be able to help you there. |
I created a topic in the forum This is the configuration of npm. It is automatic stored in the volume /data/nginx/proxy_host. As you can see in the docker-compose #206 the api is available with port 3456. |
Hi @kolaente which of these strings are variables? Do I need to replace frontend to the IP and api to IP:Port?
EDIT: listen to 80 or the port (10002) defined in the docker-compose?
EDIT2: On the login page of the public domain I see this line. Is this correct? NPM is running on a different stack than vikunja |
If you did not change the names of the containers or
Does it work? |
Is it a problem that vikunja and NPM is not in the same docker network? I always define the IP:Port and not the internal names of the containers. The login still fails.
Console: EDIT: issue on NPM |
If the nginx config you showed is the one of the proxy container like in the examples it should be fine.
The console message you posted tells you everything you need to know: The API URL you configured at the frontend container should be https. On the other hand, since you are now using a proxy you should be fine to remove it all together as long as you're accessing everything only through that proxy. |
This is my nginx config now
I set the parameter in the compose If I change that to https I get the error:
Remove the |
Did you try in a private tab after restarting the container? The error seems to indicate it is still using the http URL.
Yeah exactly. |
I removed the line from the docker-compose. Now I can login and there is no error with the public domain. If I open the interal IP:Port I cannot login because the sign in account is it is not possible to use a local login in parallel? |
It should be possible but you will probably need to manually change the ip address in Vikunja's frontend. |
Ok thanks. For the end user this is not ideal but it works. |
So, I had the same issue and sorted out a viable solution for using NGINX Proxy Manager with a Docker install of Vikunja. I've tried to detail the method here: https://github.com/TheBig-O/Vikunja-NGINX-Proxy-Manager |
@TheBig-O That looks great! Do you want to submit a PR to add this to the docs? |
@kolaente, I want to try one more thing tonight to see if I can streamline this option a bit. If it works, I'll submit that. If not, I'll go with the posted recommendation. Glad this helped. |
Submitted a PR. Hopefully, the revised and shortened wording is still clear. |
Hi, so I tried following the new guide https://github.com/TheBig-O/Vikunja-NGINX-Proxy-Manager but I kept failing, after much trial and error I figured a way to do it from the UI. First to get it up and running I used docker compose
went on to create a docker-compose.yml file and running After it has spun up the containers it assigns them automatically a network in my case vikunja_default For example I have my npm running on npm_default
You don't have to assign the DB container Running a command to check that everything is on the same network
So in this case Just make sure to note that these IP addresses will be different on your system just try to find them following the above command Now for the fun part Click to Add a Proxy Host Then fill in the form
Then we move to the next tab Custom Locations and we will add a new location We will fill the form
We will click the cog and add last line We can finally request a new SSL Certificate and Save our configuration! That's it we did it! Hope this helps someone <3 |
@DrProphet0 Nice guide! One thing I'd like to add is you may want to use the docker container host names instead of the IP - within the same docker network you can access containers using their host names. IPs can change, host names usually don't. You can figure out what host name the container have with @TWART016 Given there's now multiple guides here in this issue and in the docs, I'm going to close this issue now. Feel free to ping if you have any other issues. |
@kolaente, I had a NGINX Proxy Manager meltdown for the proxy host I used in my PR. When I recreated, I used @DrProphet0 guide and it worked perfectly. As his is much easier, I would list his in your official documentation. |
@DrProphet0 would you be open to send a PR to the docs? |
Hi yes, I submitted a PR! |
Thank you for this, however, it doesn't work if nginx proxy manager and vikunja are on separate networks. It's more common to have your proxy on one server and your services on other. I've tried everything above and still get the "Network Error" at login. |
@DrProphet0 thanks for your complete explanation. PS. without Nginx Proxy manager front end works fine. Thanks |
For anyone still having issues with this after following the solution by DrProphet0, there is a simple solution using docker networks and editing the proxy setup in NPM which is described in the Reddit article linked below: https://www.reddit.com/r/selfhosted/comments/xovuh6/setting_up_nginx_proxy_manager_with_vikunja/ |
I find the steps from @TheBig-O's and @DrProphet0's guide still quite confusing and wasn't able to get them to work with reverse proxy and HTTPS. (couldn't get pass Network Error on HTTPS) @Jemberg's link also didn't quite make sense to me who has little experience with docker network. With more digging and more trial and error, I actually found even easier and more straight forward steps to properly setup Vikunja with Nginx Proxy Manager and HTTPS. I am using a blank Ubuntu server, and of course having docker, docker-compose and NPM already setup. Following https://vikunja.io/docs/docker-walkthrough/, you should be able to get Vikunja to work via HTTP connection to your server ip. From there, all you have to do is adjust the following things: In docker-compose.ymlapichange VIKUNJA_SERVICE_FRONTENDURL to your desired domain
expose port 3456 on host
frontendadd VIKUNJA_API_URL to environment
proxychange ports
In your DNS providerAdd two
(setting is different for different DNS provider, the end result should be In Nginx Proxy ManagerAdd two Proxy Host, and you don't have to add anything extra from @DrProphet0's comment You can of course set SSL however you want. Your HTTPS frontend should be able to reach the api after these adjustments. My docker-compose.yml if anyone is interested: Inspiration from: |
@kingfungdesign great tutorial, do you want to send a PR to add it to the docs? (include at https://kolaente.dev/vikunja/api/src/branch/main/docs/content/doc/setup/reverse-proxies.md#nginx-proxy-manager-npm) |
Couldn't get the account to work. Here's the file. |
@kingfungdesign Thanks, now integrated! |
Hi,
I have running a nginx proxy manager instance in docker.
Now I want to configure vikunja with nginx proxy manager.
The vikunja instance in available from the WAN. Just the login failed:
Network Error
In npm I set the domain name with
Scheme http
Forward Hostname / IP: 192.168.178.15
Forward Port: 10002
SSL Certificate
No Advanced configuration
docker-compose von vikunja:
Does anyone have a proxy configuration for npm?
The text was updated successfully, but these errors were encountered: