mirror of
https://github.com/plankanban/planka.git
synced 2026-02-05 00:39:58 +03:00
planka behind a nginx reverse proxy not working #88
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 @santosh on GitHub (Apr 3, 2021).
I am running the latest version of planka, straight from the master.
I have modified start script of client to serve it on port
3006. And here is part of my nginx configurationThis should serve the content on
mydomain.com/planka. This does partially happens as I can see theindex.htmlpage being loaded at/planka/. But this is what I get in the console.I have been in a similar situation with grafana, but luckily there is such a mechanism in grafana which allows hosting from sub path.
What are your views on this? Any workaround?
@nickbe commented on GitHub (Apr 5, 2021):
I'm using apache for everything productive including reverse proxy stuff. But maybe Maks knows what to do here.
@Zazama commented on GitHub (Apr 8, 2021):
This is my config, maybe it can help you.
You also might have to append /planka/ to your BASE_URL setting
@rubenmdh commented on GitHub (Apr 8, 2021):
I was struggling to get this to work, too. Finally got it working yesterday behind nginx.
This is my nginx related config:
Backend should be outside of the server tag: (I used eth0 IPv4 address, but I guess localhost or 127.0.0.1 should suffice)
Also make sure to configure the docker-compose.yml accordingly. I had to configure the BASE_URL to the exact url that was configured in nginx.
eg: BASE_URL=https://planka.example.com
@santosh commented on GitHub (Apr 11, 2021):
I still get the same error.
@mortbauer commented on GitHub (May 1, 2021):
I just yesterday deployed planka behind traefik, works like a charm, happy to share config if wished.
@zhangrr commented on GitHub (May 11, 2021):
Please show the config. Thanks.
@mortbauer commented on GitHub (May 14, 2021):
@zhangrr I created a gist with the contents of my ansible role for planka, the traefik specific labels are araound line 88. Hope it helps.
@janwels89 commented on GitHub (Sep 9, 2021):
Seems like its only possible to reverse proxy planka to the root of a domain.
I could not get a reverse proxy to https:'domain_here'/planka/ working...
there is static/.... stuff missing...
reverse proxy to / on the domain is working fine.
@Stadtschreck commented on GitHub (Oct 16, 2021):
I have a similiar problem, i use ngnix proxy manager,
if i set the baseurl to the local ip4, it work (over the ip)
if i set the url from nginx as baseurl, i stuck at the loading screen
@soundneedle commented on GitHub (Jan 10, 2022):
Think I'm having the same issue. I'm using Synology reverse proxy, eg. https://planka.domain.com. If BASE_URL is set to same I can access planka externally, however it fails internally at its docker address 192xxxx:xxxx. If I set BASE_URL to the internal address 192.xxxx:3000, I can access it there but not at planka.domain.com.
I've setup many other docker containers w/reverse proxy and don't have this issue. Should this work or is there a config needed?
@Rykimaruh commented on GitHub (Jan 21, 2022):
I am also having this issue. I placed it behind the Nginx server (non-docker version) and when it loads the page remotely, it's stuck loading. However, when I try it using localhost:3000, it loads up the sign-in page without issue.
@jitka commented on GitHub (Mar 23, 2022):
I have same issue (could not access static files after setting proxy to domain.com/planka) I would like to see "official" nginx setup example.
@ontheair81 commented on GitHub (Mar 23, 2022):
For me it works without problem and without any custom configuration. Using this dockerized nginx reverse proxy for all of my services.
Never used that, maybe you can try to use a regular subdomain (planka.domain.com) instead?
@Alumniminium commented on GitHub (Apr 10, 2022):
I had to add a route for the websocket connection to fix the infinite loading.
@djchoyr commented on GitHub (Jun 20, 2022):
I'm using a synology NAS but I don't know where the problem is. I have created other proxies for other docker services without any problem. Could you add the docker-compose code?
@tikok974 commented on GitHub (Nov 24, 2022):
Hi everybody,
I installed Planka about 2 weeks ago to test it via Docker on my Synology NAS. I tried to set up a reverse proxy to use HTTPS instead of HTTP but it doesn't work !
In HTTPS I get to the login page and when I try to log in nothing happens after validating my credentials.
However, if I do it in HTTP ...it's ok :(
The proxy on my NAS captures HTTPS on port 3017 and redirects HTTP on port 3000 to the localhost (NAS is Docker host).
The Docker container has a port forwarding setting (port 3000 for the host to port 1337 for the container)
Here is my docker-compose if it can help to find what is wrong
`version: '3'
services:
planka:
container_name: my-planka
image: ghcr.io/plankanban/planka:latest
command: >
bash -c
"for i in
seq 1 30; do./start.sh &&
s=
? && break || s=?;echo "Tried $$i times. Waiting 5 seconds...";
sleep 5;
done; (exit $$s)"
restart: unless-stopped
volumes:
- user-avatars:/app/public/user-avatars
- project-background-images:/app/public/project-background-images
- attachments:/app/private/attachments
- /volume1/docker/planka/logs/:/app/logs/
ports:
- 3000:1337
networks:
netplanka:
ipv4_address: 192.168.12.4
environment:
- BASE_URL=https://myserver.mydomain:3017
- TRUST_PROXY=0
- DATABASE_URL=postgresql://postgres:xxxxxxxx@xxxxxxx@192.168.12.5/planka
- SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
depends_on:
- postgres
postgres:
container_name: my-plankapostgres
image: postgres:14-alpine
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=planka
- POSTGRES_HOST_AUTH_METHOD=trust
- POSTGRES_PASSWORD=XXXXXXXXXXX
networks:
netplanka:
ipv4_address: 192.168.12.5
networks:
netplanka:
name: netplanka
driver: bridge
ipam:
config:
- subnet: 192.168.12.0/27
gateway: 192.168.12.1
volumes:
user-avatars:
project-background-images:
attachments:
db-data:`
I attach the capture from my browser (developer mode)

I tried to change BASE_URL to the address I use in my browser (https://myserver.mydomain:3000) but it doesn't work !
Many thanks
@mzch commented on GitHub (Nov 24, 2022):
Do you add settings of websocket proxy to nginx?
@tikok974 commented on GitHub (Nov 25, 2022):
Hi mzch !
You are very nice !
That was good !
I added these parameters as shown in my screenshot below
...and put the real URL (the one i enter in my browser) in the BASE_URL variable of Planka and it works !
I hope it will also help other people ;)
Thanks a lot for your help ;)
@nmincone commented on GitHub (May 28, 2024):
Maybe this will help with users on Linux/Docker NPM deployment. Here is the stack I used, .env variables can be changed.
Ensure base URL is set to "https". I didn't need to add any NPM advanced proxy settings for this to work with a wildcard cert...
`version: '3'
services:
planka:
image: ghcr.io/plankanban/planka:latest
restart: unless-stopped
volumes:
- /home/docker/planka/user-avatars:/app/public/user-avatars
- /home/docker/planka/project-background-images:/app/public/project-background-images
- /home/docker/planka/attachments:/app/private/attachments
ports:
- 3333:1337 # change to suit
environment:
- BASE_URL=https://planka.domain.com #change to suit
- DATABASE_URL=postgresql://postgres@postgres/planka
- SECRET_KEY=${SECRET_KEY}
- TRUST_PROXY=1
# - TOKEN_EXPIRES_IN=365 # In days
postgres:
image: postgres:14-alpine
restart: unless-stopped
volumes:
- /home/docker/planka/db-data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=planka
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d planka"]
interval: 10s
timeout: 5s
retries: 5
volumes:
user-avatars:
project-background-images:
attachments:
db-data:`
@romanlucas commented on GitHub (Oct 24, 2024):
I had a similar problem: trying to serve planka (runing in docker) only on a local network via nginx. What did the trick for me was two things:
In the docker-compose.yml:
- BASE_URL=http://myservername/planka # use the exact url i want users in local network to use in the browser
- CORS_ORIGIN=http://myservername # configure planka to allow requests from the nginx-server
In the nginx config:
server {
listen 80;
server_name yourservername;
}
hope this might help anyone in the future.
@koin32 commented on GitHub (Jan 27, 2025):
Hello everyone, the infinite loading error has stopped, what should I do?
`location / {
`
@nmincone commented on GitHub (Jan 27, 2025):
I put Planka behind NGNPM and did not have to add any advanced routing settings.
@HelloMihai commented on GitHub (Apr 4, 2025):
[SOLUTION]
for anyone looking
in NGINX when creating the proxy host, simply check: