Redirect HTTPS doesn’t work with Synology NAS reverse proxy to Planka container… #250

Closed
opened 2026-02-04 18:06:22 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @tikok974 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)

Capture d’écran_2022-11-24_16-05-31

I tried to change BASE_URL to the address I use in my browser (http://myserver.mydomain:3000) but it doesn't work !
Many thanks

Originally posted by @tikok974 in https://github.com/plankanban/planka/issues/111#issuecomment-1326608078

Originally created by @tikok974 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) [ ![Capture d’écran_2022-11-24_16-05-31](https://user-images.githubusercontent.com/20242955/203817848-44da440c-1fd7-483b-ba0d-42dc32bb813b.png) ](url) I tried to change BASE_URL to the address I use in my browser (http://myserver.mydomain:3000) but it doesn't work ! Many thanks _Originally posted by @tikok974 in https://github.com/plankanban/planka/issues/111#issuecomment-1326608078_
Author
Owner

@tikok974 commented on GitHub (Nov 25, 2022):

Hi everybody,

Finally I received an answer here
Thanks for @mzch for his help

I added these parameters as shown in my screenshot below

Capture d’écran_2022-11-25_09-38-15
Capture d’écran_2022-11-25_08-51-00
Capture d’écran_2022-11-25_08-51-07
Capture d’écran_2022-11-25_08-51-41

...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

@tikok974 commented on GitHub (Nov 25, 2022): Hi everybody, Finally I received an answer [here](https://github.com/plankanban/planka/issues/111#issuecomment-1326608078) Thanks for @mzch for his help I added these parameters as shown in my screenshot below ![Capture d’écran_2022-11-25_09-38-15](https://user-images.githubusercontent.com/20242955/203938131-ff74ff8a-8147-46ea-8485-a09ba178e6be.png) ![Capture d’écran_2022-11-25_08-51-00](https://user-images.githubusercontent.com/20242955/203933193-b91783c8-105d-46f0-b781-e95b85c08f27.png) ![Capture d’écran_2022-11-25_08-51-07](https://user-images.githubusercontent.com/20242955/203933225-b9a72d69-6950-41be-912a-37449fc9b5ae.png) ![Capture d’écran_2022-11-25_08-51-41](https://user-images.githubusercontent.com/20242955/203933511-d41dfed1-553d-4dfc-9f80-bd95d5faa976.png) ...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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#250