mirror of
https://github.com/plankanban/planka.git
synced 2026-02-24 19:08:59 +03:00
SSL error behind Nginx proxy #519
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @satonotdead on GitHub (Jun 1, 2024).
I followed the example (as per the documentation) and verified that the container is running well on localhost. However, I can't connect to it from my domain, even though I've set up the certificates and DNS correctly.
What could be causing this issue? Is there a variable or configuration, such as
VIRTUAL_HOSTNAMEthat I need to set?Thanks!
@dev0T commented on GitHub (Jun 2, 2024):
Same thing here, can't get it to work through https
@Dherlou commented on GitHub (Jun 8, 2024):
I just setup Planka behind an nginx (reverse) proxy with TLS-termination at the proxy-level. Both planka and nginx are containers inside the same docker network. I use letsencrypt certificates created by certbot in another container.
Here are the relevant snippets that I changed. Btw, I setup Planka to be available behind a specific path, i.e. https://{domain}/{path}. As far as I can tell, this setup seems to work, although some optimization regarding the official documentation might be needed, but this should be a good starting point.
nginx.conf
docker-compose.yml
@satonotdead commented on GitHub (Jun 12, 2024):
I'm still getting a
wrong certificateerror with that configuration. I'm using a subdomain and have tried bothlocalhostand thecontainer IP.I suspect the issue is that docs assumes everyone is using a Docker container for Nginx, which isn't true for all of us. I prefer to host Nginx on the host machine to reduce attack vectors.
@RustyClanker commented on GitHub (Jun 13, 2024):
I run Planka on my local network behind Nginx on a different host. I could not find good documentation on it and I was running into the cross-site blocking errors, I had also run into the SSL cert error previously but it was due to using
rewrite.Below is my configuration for the proxy serving Planka, it does not give me a cert error and does not give me grief with cross-site origin. You will also need to do the following:
docker-compose.ymltohttps://<proxy_domain>not to the<upstream_host>:<port>In the end the BASE_URL was what was giving me grief for the cross-site issue, so some of the header directives could be unnecessary, I just haven't got around to removing them one by one to see if it breaks.
To note: I run bind on my network for resolving my LAN domains, you will run into issues if your cert is signed against a certain domain and you try to use it with an IP address as your
<proxy_domain>.I hope this helps you and anyone else struggling with running Planka behind an external Nginx server.
@satonotdead commented on GitHub (Jun 13, 2024):
Hey, thanks for your following up.
I tried your configuration (removing a few headers and adding new ones) and still not working. I renewed the certificates and restarted everything as well.
Please, can you reformulate this?
I suspect the issue is related to this and not on the Nginx configuration, which appears to be a commonly used template.
@RustyClanker commented on GitHub (Jun 13, 2024):
When you request a certificate from a signing authority it will either be a wildcard certificate, which can be used for any sub-domain and the primary domain, or for a specific (sub-)domain. If you have self-signed the certificate it needs to be, again, a wildcard or for a specific IP address/(sub-domain). You will also need the full chain (your cert -> intermediates -> root) as well as the private key.
So in other words, the certificate you are using needs to be signed in a way that it is valid for the value of
<proxy_domain>used inserver_name <proxy_domain>.@michaeledi commented on GitHub (Jun 13, 2024):
Thanks! This solved my
mix-contentissue like a charm.@satonotdead commented on GitHub (Jun 14, 2024):
Thanks, I'm using Let's Encrypt and signing certificates for each subdomain. I'm hosting ~30 services and that's the only facing this SSL issue.
I'm sadly moving to another service because I tried a lot of modifications without success.
@marigbede commented on GitHub (Jun 24, 2024):
@satoshinotdead
I would suggest you follow the following links one after the other.
https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04
https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04
However, you must ensure that the following have been achieved before you start.
@satonotdead commented on GitHub (Jun 25, 2024):
@marigbede Thanks for the information, I prefer to use the official docs and skip hosting providers ones.
I have more than 50 services running. The issue I posted (and few folks around) is related with the Planka architecture and has nothing to do with installing Nginx and/or Docker.
@marigbede commented on GitHub (Jun 25, 2024):
@satoshinotdead Nice going. The documentation does not bind you to Digital Ocean because I have used those steps in all manner of places. I can take a look at your issue if you would like and if for nothing, just another fresh pair of eyes perspective.
@satonotdead commented on GitHub (Jun 27, 2024):
@marigbede thanks man, I'm just trying to figure it out.
My configuration is Nginx as Proxy and docker-compose Planka container.
I don't want to containerize Nginx and I usually proxy from it to localhost and port exposed from docker (to localhost or using upstream to container IP).
I understand that's the base for everything else but I see that not everyone host their files and/or manage their own servers. Maybe I'm wrong but I think there are a corporate standard that don't fit with all of us.
I like to be simple when managing my stuff. So, if I have Nginx then I don't want an application
bloatedwith another instance of Nginx.Tried to use localhost and docker IP like upstream and proxied. Perhaps I need to expose the ports from Planka to localhost?
Planka is asking for Javascript on curl (that's OK, it's working) but there is impossible to proxy to it.
@daniel-hiller commented on GitHub (Jul 14, 2024):
Hi,
Planka is working just fine with a normally installed NGINX.
I do it the same way in the Planka installer.
Here is the config: https://github.com/plankanban/planka-installer/blob/main/config/nginx-planka.conf.
That configuration is working just fine on a freshly installed nginx (Debian, Ubuntu, and CentOS)
You just need to add a cert (the certbot will be your friend).
I wrote it so often in the issues, but here again: You need to adjust the
BASE_URL=https://your.domain.tld@bkostrowiecki commented on GitHub (Sep 24, 2024):
I successfully configured dockerized Planka and Nginx Reverse Proxy on Windows Host machine, so I think the real problem is how someone configures Nginx and Docker as it seems like it's not Planka fault.
@satonotdead commented on GitHub (Sep 26, 2024):
Hey, thanks for your reply. Can you share your Nginx and
docker-compose.ymltemplate?I'm aware that's very probable I'm missing something.
@Delares commented on GitHub (Dec 29, 2024):
Good afternoon. I would be very grateful if you could possibly provide some guidance on how you managed to achieve this. I have attempted to solve the problem of external access to the plan, but unfortunately I have not been successful.
@bkostrowiecki commented on GitHub (Jan 9, 2025):
Here's my docker-compose.yaml file, but I'm sure it's just the default
Here's my nginx configuration regarding planka:
@jorgecarleitao commented on GitHub (Jul 20, 2025):
This is not Planka - I could configure this as intended following the documentation for Caddy - absolutely no surprises using
in docker compose.
@brennanag commented on GitHub (Jan 19, 2026):
I have been trying to get planka to work with my nginx install and I guess it's not for me. So frustrating! I wish this was more friendly for people to install. As someone kind of new to this sort of thing, why are some services quite easy to install and some like this quite hard?
@Dherlou commented on GitHub (Jan 19, 2026):
How does your setup look like?
Generally speaking, setup complexity depends on the use case.
What you always need is some kind of service discovery, so that your proxy knows where the actual app lives, so that it can proxy there:
The application in the container also needs to know under which URL it lives infront of the proxy (e.g. for link generation). Sometimes, it works implicitly if the app reads the
X-Forwarded-*orX-Real-IPheaders set by the proxy. Sometimes, it needs to be explicitly defined, e.g. if the proxy does not set these headers by default, the app does not read those headers, needs explicit configuration for trusting the proxy's headers or needs to know its URL without user interaction (e.g. during cron execution). However, how you need to define this, depends completely on the application that you want to proxy. Sometimes, an environment variable is enough, sometimes it needs multiple, sometimes it needs changes in a configuration file and sometimes you cannot even configure it (if the application has no support for being proxied at all).Sometimes, it gets even worse and the application itself does not ship a webserver for asset serving (like media files) and expects that a reverse proxy is used to serve static files, because its own webserver only processes script files. That is what Tandoor did until v2.3.
Depending on your setup (e.g. if you only use one domain for everything), you may want to map the path
/pathin front of the proxy to the path/behind the proxy, which needs additional configuration, like in my example above.At the moment, my preferred setup is using docker containers for all my applications, so that I can use traefik as a proxy. Traefik has some nice features like generating and utilizing TLS-Certificates on demand with a very simple configuration. It also allows to define its configuration as container or service tags directly on the services/containers to be proxied, so that all relevant configuration lives in one place.
@jorgecarleitao commented on GitHub (Jan 20, 2026):
With Caddy:
(replace
example.comwith your domain, and have an A record to your IP)Docker compose:
deploy:
if you can't make it work, you need to explain what does not work specifically.