Unable to load Planka after login #53

Closed
opened 2026-02-04 16:50:36 +03:00 by OVERLORD · 18 comments
Owner

Originally created by @Sup3rlativ3 on GitHub (Dec 26, 2020).

Hi,

I've tried installing using the docker compose file and changing the base_url as required but when I log in, I just get a spinning wheel.

image

The docker logs for the container shows the following.

[sup3rlativ3@localhost planka-dockerfiles]$ docker logs 591cbc5eea62
debug: Detected Sails environment is "production", but NODE_ENV is `undefined`.
debug: Automatically setting the NODE_ENV environment variable to "production".
debug:
(node:20) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
debug: -------------------------------------------------------
debug: :: Fri Dec 25 2020 23:11:54 GMT+0000 (Coordinated Universal Time)
debug: Environment : production
debug: Port        : 1337
debug: -------------------------------------------------------
[sup3rlativ3@localhost planka-dockerfiles]$

The docker logs for the postgres container are:

[sup3rlativ3@localhost planka-dockerfiles]$ docker logs 107aedbf9f12
********************************************************************************
WARNING: POSTGRES_HOST_AUTH_METHOD has been set to "trust". This will allow
         anyone with access to the Postgres port to access your database without
         a password, even if POSTGRES_PASSWORD is set. See PostgreSQL
         documentation about "trust":
         https://www.postgresql.org/docs/current/auth-trust.html
         In Docker's default configuration, this is effectively any other
         container on the same system.

         It is not recommended to use POSTGRES_HOST_AUTH_METHOD=trust. Replace
         it with "-e POSTGRES_PASSWORD=password" instead to set a password in
         "docker run".
********************************************************************************
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
sh: locale: not found
2020-12-25 23:09:58.410 UTC [30] WARNING:  no usable system locales were found
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
initdb: warning: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run initdb.


Success. You can now start the database server using:

    pg_ctl -D /var/lib/postgresql/data -l logfile start

waiting for server to start....2020-12-25 23:10:00.195 UTC [35] LOG:  starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
2020-12-25 23:10:00.197 UTC [35] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-12-25 23:10:00.218 UTC [36] LOG:  database system was shut down at 2020-12-25 23:09:59 UTC
2020-12-25 23:10:00.222 UTC [35] LOG:  database system is ready to accept connections
 done
server started
CREATE DATABASE


/usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*

waiting for server to shut down....2020-12-25 23:10:00.535 UTC [35] LOG:  received fast shutdown request
2020-12-25 23:10:00.536 UTC [35] LOG:  aborting any active transactions
2020-12-25 23:10:00.537 UTC [35] LOG:  background worker "logical replication launcher" (PID 42) exited with exit code 1
2020-12-25 23:10:00.538 UTC [37] LOG:  shutting down
2020-12-25 23:10:00.548 UTC [35] LOG:  database system is shut down
 done
server stopped

PostgreSQL init process complete; ready for start up.

2020-12-25 23:10:00.650 UTC [1] LOG:  starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit
2020-12-25 23:10:00.650 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2020-12-25 23:10:00.650 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2020-12-25 23:10:00.654 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-12-25 23:10:00.674 UTC [46] LOG:  database system was shut down at 2020-12-25 23:10:00 UTC
2020-12-25 23:10:00.678 UTC [1] LOG:  database system is ready to accept connections
[sup3rlativ3@localhost planka-dockerfiles]$

as a side note, I really think that changing the postgres trust as recommended at the top should be done to tighten the security.

I've gone into the container for Planka and tried to find some logs but haven't been able to find anything of use. The only log files I found were:

[sup3rlativ3@localhost planka-dockerfiles]$ docker exec -it 591cbc5eea62 bash
bash-5.0# find . -iname *.log
./node_modules/localforage/temp.test.log
./node_modules/simple-swizzle/node_modules/is-arrayish/yarn-error.log
bash-5.0#

So I opened the console in the browser (Edge Chromium) and got the following.

WebSocket connection to 'ws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 400

The logs from Firefox are:

Firefox can’t establish a connection to the server at ws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket. 2 websocket.js:124:12
GETws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket
[HTTP/1.1 400 Bad Request 3ms]
The connection to ws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket was interrupted while the page was loading.

From what I can see, there's something with the socket.io library that isn't working as expected.

https://github.com/websockets/ws/issues/979
https://github.com/socketio/socket.io/issues/1942

I'm wondering what it is I might have done wrong to cause this? I've tried recreating the entire setup but that hasn't helped.

Originally created by @Sup3rlativ3 on GitHub (Dec 26, 2020). Hi, I've tried installing using the docker compose file and changing the base_url as required but when I log in, I just get a spinning wheel. ![image](https://user-images.githubusercontent.com/1555043/103143271-d58dac00-4766-11eb-9689-5024a5a5ac1f.png) The docker logs for the container shows the following. ``` [sup3rlativ3@localhost planka-dockerfiles]$ docker logs 591cbc5eea62 debug: Detected Sails environment is "production", but NODE_ENV is `undefined`. debug: Automatically setting the NODE_ENV environment variable to "production". debug: (node:20) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency (Use `node --trace-warnings ...` to show where the warning was created) debug: ------------------------------------------------------- debug: :: Fri Dec 25 2020 23:11:54 GMT+0000 (Coordinated Universal Time) debug: Environment : production debug: Port : 1337 debug: ------------------------------------------------------- [sup3rlativ3@localhost planka-dockerfiles]$ ``` The docker logs for the postgres container are: ``` [sup3rlativ3@localhost planka-dockerfiles]$ docker logs 107aedbf9f12 ******************************************************************************** WARNING: POSTGRES_HOST_AUTH_METHOD has been set to "trust". This will allow anyone with access to the Postgres port to access your database without a password, even if POSTGRES_PASSWORD is set. See PostgreSQL documentation about "trust": https://www.postgresql.org/docs/current/auth-trust.html In Docker's default configuration, this is effectively any other container on the same system. It is not recommended to use POSTGRES_HOST_AUTH_METHOD=trust. Replace it with "-e POSTGRES_PASSWORD=password" instead to set a password in "docker run". ******************************************************************************** The files belonging to this database system will be owned by user "postgres". This user must also own the server process. The database cluster will be initialized with locale "en_US.utf8". The default database encoding has accordingly been set to "UTF8". The default text search configuration will be set to "english". Data page checksums are disabled. fixing permissions on existing directory /var/lib/postgresql/data ... ok creating subdirectories ... ok selecting dynamic shared memory implementation ... posix selecting default max_connections ... 100 selecting default shared_buffers ... 128MB selecting default time zone ... UTC creating configuration files ... ok running bootstrap script ... ok sh: locale: not found 2020-12-25 23:09:58.410 UTC [30] WARNING: no usable system locales were found performing post-bootstrap initialization ... ok syncing data to disk ... ok initdb: warning: enabling "trust" authentication for local connections You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb. Success. You can now start the database server using: pg_ctl -D /var/lib/postgresql/data -l logfile start waiting for server to start....2020-12-25 23:10:00.195 UTC [35] LOG: starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit 2020-12-25 23:10:00.197 UTC [35] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2020-12-25 23:10:00.218 UTC [36] LOG: database system was shut down at 2020-12-25 23:09:59 UTC 2020-12-25 23:10:00.222 UTC [35] LOG: database system is ready to accept connections done server started CREATE DATABASE /usr/local/bin/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/* waiting for server to shut down....2020-12-25 23:10:00.535 UTC [35] LOG: received fast shutdown request 2020-12-25 23:10:00.536 UTC [35] LOG: aborting any active transactions 2020-12-25 23:10:00.537 UTC [35] LOG: background worker "logical replication launcher" (PID 42) exited with exit code 1 2020-12-25 23:10:00.538 UTC [37] LOG: shutting down 2020-12-25 23:10:00.548 UTC [35] LOG: database system is shut down done server stopped PostgreSQL init process complete; ready for start up. 2020-12-25 23:10:00.650 UTC [1] LOG: starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 9.3.0) 9.3.0, 64-bit 2020-12-25 23:10:00.650 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432 2020-12-25 23:10:00.650 UTC [1] LOG: listening on IPv6 address "::", port 5432 2020-12-25 23:10:00.654 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2020-12-25 23:10:00.674 UTC [46] LOG: database system was shut down at 2020-12-25 23:10:00 UTC 2020-12-25 23:10:00.678 UTC [1] LOG: database system is ready to accept connections [sup3rlativ3@localhost planka-dockerfiles]$ ``` as a side note, I really think that changing the postgres trust as recommended at the top should be done to tighten the security. I've gone into the container for Planka and tried to find some logs but haven't been able to find anything of use. The only log files I found were: ``` [sup3rlativ3@localhost planka-dockerfiles]$ docker exec -it 591cbc5eea62 bash bash-5.0# find . -iname *.log ./node_modules/localforage/temp.test.log ./node_modules/simple-swizzle/node_modules/is-arrayish/yarn-error.log bash-5.0# ``` So I opened the console in the browser (Edge Chromium) and got the following. `WebSocket connection to 'ws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: Error during WebSocket handshake: Unexpected response code: 400` The logs from Firefox are: ``` Firefox can’t establish a connection to the server at ws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket. 2 websocket.js:124:12 GETws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket [HTTP/1.1 400 Bad Request 3ms] The connection to ws://192.168.1.111:3000/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket was interrupted while the page was loading. ``` From what I can see, there's something with the socket.io library that isn't working as expected. https://github.com/websockets/ws/issues/979 https://github.com/socketio/socket.io/issues/1942 I'm wondering what it is I might have done wrong to cause this? I've tried recreating the entire setup but that hasn't helped.
Author
Owner

@meltyshev commented on GitHub (Dec 26, 2020):

Hi, sorry for the long answer. Already trying to recreate this on my PC.

@meltyshev commented on GitHub (Dec 26, 2020): Hi, sorry for the long answer. Already trying to recreate this on my PC.
Author
Owner

@meltyshev commented on GitHub (Dec 26, 2020):

I've tested it, BASE_URL with my external IP address is working well. Can you provide your docker-compose file? You may have forgotten to specify a port number in the BASE_URL or something like that. This error appears when the BASE_URL doesn't fully match the browser's address bar.

@meltyshev commented on GitHub (Dec 26, 2020): I've tested it, BASE_URL with my external IP address is working well. Can you provide your docker-compose file? You may have forgotten to specify a port number in the BASE_URL or something like that. This error appears when the BASE_URL doesn't fully match the browser's address bar.
Author
Owner

@Sup3rlativ3 commented on GitHub (Dec 27, 2020):

Hi, thanks for the reply. my docker-compose is below (I've changed the domain name to be generic and replaced my secret key).

Just for your reference, I've tried setting the host_url to be the IP address as well as the hostname. I've tried using SSL (via the reverse proxy) and straight https but nothing seems to work.

version: '3'

services:
  planka:
    image: meltyshev/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: always
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/public/attachments
    ports:
      - 3000:1337
    environment:
      - BASE_URL=https://planka.mydomain.com
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - SECRET_KEY=gTdBafZ82LWsEG5s2kUsoipCzfftNz9uZiT3LkEFKVoQTZ9zWtsX
    depends_on:
      - postgres

  postgres:
    image: postgres:12-alpine
    restart: always
    volumes:
      - planka-db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust

volumes:
  user-avatars:
  project-background-images:
  attachments:
  planka-db-data:
@Sup3rlativ3 commented on GitHub (Dec 27, 2020): Hi, thanks for the reply. my docker-compose is below (I've changed the domain name to be generic and replaced my secret key). Just for your reference, I've tried setting the host_url to be the IP address as well as the hostname. I've tried using SSL (via the reverse proxy) and straight https but nothing seems to work. ``` version: '3' services: planka: image: meltyshev/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: always volumes: - user-avatars:/app/public/user-avatars - project-background-images:/app/public/project-background-images - attachments:/app/public/attachments ports: - 3000:1337 environment: - BASE_URL=https://planka.mydomain.com - DATABASE_URL=postgresql://postgres@postgres/planka - SECRET_KEY=gTdBafZ82LWsEG5s2kUsoipCzfftNz9uZiT3LkEFKVoQTZ9zWtsX depends_on: - postgres postgres: image: postgres:12-alpine restart: always volumes: - planka-db-data:/var/lib/postgresql/data environment: - POSTGRES_DB=planka - POSTGRES_HOST_AUTH_METHOD=trust volumes: user-avatars: project-background-images: attachments: planka-db-data: ```
Author
Owner

@Sup3rlativ3 commented on GitHub (Dec 27, 2020):

Request headers:

GET wss://planka.mydomain.com/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket HTTP/1.1
Host: planka.mydomain.com
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4346.0 Safari/537.36 Edg/89.0.731.0
Upgrade: websocket
Origin: https://planka.mydomain.com
Sec-WebSocket-Version: 13
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Sec-WebSocket-Key: Xq7t4r4Qy0S6wvFNBfzllQ==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

Response headers:

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Sec-WebSocket-Accept: ae5VJ0YcwN/4IvGa2U9I/hOqvzc=
Sec-WebSocket-Extensions: permessage-deflate
X-Powered-By: ARR/3.0
Connection: Upgrade
Date: Sun, 27 Dec 2020 00:25:43 GMT
@Sup3rlativ3 commented on GitHub (Dec 27, 2020): Request headers: ``` GET wss://planka.mydomain.com/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket HTTP/1.1 Host: planka.mydomain.com Connection: Upgrade Pragma: no-cache Cache-Control: no-cache User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4346.0 Safari/537.36 Edg/89.0.731.0 Upgrade: websocket Origin: https://planka.mydomain.com Sec-WebSocket-Version: 13 Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.9 Sec-WebSocket-Key: Xq7t4r4Qy0S6wvFNBfzllQ== Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits ``` Response headers: ``` HTTP/1.1 101 Switching Protocols Upgrade: websocket Sec-WebSocket-Accept: ae5VJ0YcwN/4IvGa2U9I/hOqvzc= Sec-WebSocket-Extensions: permessage-deflate X-Powered-By: ARR/3.0 Connection: Upgrade Date: Sun, 27 Dec 2020 00:25:43 GMT ```
Author
Owner

@jhonny1977 commented on GitHub (Dec 30, 2020):

Same problem happen on me. when we change to localhost:3000 it work perfect. I move to ubuntu wsl2 install everything it work at 192.168.1.10:3000 but only work local computer. when i using other computer open it. its failed

@jhonny1977 commented on GitHub (Dec 30, 2020): Same problem happen on me. when we change to localhost:3000 it work perfect. I move to ubuntu wsl2 install everything it work at 192.168.1.10:3000 but only work local computer. when i using other computer open it. its failed
Author
Owner

@clemone210 commented on GitHub (Jan 5, 2021):

Hi, thanks for the reply. my docker-compose is below (I've changed the domain name to be generic and replaced my secret key).

Just for your reference, I've tried setting the host_url to be the IP address as well as the hostname. I've tried using SSL (via the reverse proxy) and straight https but nothing seems to work.

version: '3'

services:
  planka:
    image: meltyshev/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: always
    volumes:
      - user-avatars:/app/public/user-avatars
      - project-background-images:/app/public/project-background-images
      - attachments:/app/public/attachments
    ports:
      - 3000:1337
    environment:
      - BASE_URL=https://planka.mydomain.com
      - DATABASE_URL=postgresql://postgres@postgres/planka
      - SECRET_KEY=gTdBafZ82LWsEG5s2kUsoipCzfftNz9uZiT3LkEFKVoQTZ9zWtsX
    depends_on:
      - postgres

  postgres:
    image: postgres:12-alpine
    restart: always
    volumes:
      - planka-db-data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=planka
      - POSTGRES_HOST_AUTH_METHOD=trust

volumes:
  user-avatars:
  project-background-images:
  attachments:
  planka-db-data:

I had the same.
You have to set the https protocol as well as the domainname which you will access it.
So if you access planka via reverse proxy through https://planka.mydomain.com you will have to enter

environment:
      - BASE_URL=https://planka.mydomain.com
@clemone210 commented on GitHub (Jan 5, 2021): > Hi, thanks for the reply. my docker-compose is below (I've changed the domain name to be generic and replaced my secret key). > > Just for your reference, I've tried setting the host_url to be the IP address as well as the hostname. I've tried using SSL (via the reverse proxy) and straight https but nothing seems to work. > > ``` > version: '3' > > services: > planka: > image: meltyshev/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: always > volumes: > - user-avatars:/app/public/user-avatars > - project-background-images:/app/public/project-background-images > - attachments:/app/public/attachments > ports: > - 3000:1337 > environment: > - BASE_URL=https://planka.mydomain.com > - DATABASE_URL=postgresql://postgres@postgres/planka > - SECRET_KEY=gTdBafZ82LWsEG5s2kUsoipCzfftNz9uZiT3LkEFKVoQTZ9zWtsX > depends_on: > - postgres > > postgres: > image: postgres:12-alpine > restart: always > volumes: > - planka-db-data:/var/lib/postgresql/data > environment: > - POSTGRES_DB=planka > - POSTGRES_HOST_AUTH_METHOD=trust > > volumes: > user-avatars: > project-background-images: > attachments: > planka-db-data: > ``` I had the same. You have to set the https protocol as well as the domainname which you will access it. So if you access planka via reverse proxy through https://planka.mydomain.com you will have to enter ``` environment: - BASE_URL=https://planka.mydomain.com ```
Author
Owner

@Syndamia commented on GitHub (Jan 6, 2021):

If you're using a reverse proxy with apache, you need to add this to your .conf file. Although, just so you know, I had to remove and recompose (docker-compose up -d) the docker container after modifying apache.

@Syndamia commented on GitHub (Jan 6, 2021): If you're using a reverse proxy with apache, [you need to add this to your .conf file](https://github.com/plankanban/planka/issues/43#issuecomment-705782001). Although, just so you know, I had to remove and recompose (`docker-compose up -d`) the docker container after modifying apache.
Author
Owner

@jhonny1977 commented on GitHub (Jan 23, 2021):

add some route command by administrator permission, then need changed in some setting inside planka. It already work for me. but with paintful.

@jhonny1977 commented on GitHub (Jan 23, 2021): add some route command by administrator permission, then need changed in some setting inside planka. It already work for me. but with paintful.
Author
Owner

@jhonny1977 commented on GitHub (Jan 23, 2021):

If you're using a reverse proxy with apache, you need to add this to your .conf file. Although, just so you know, I had to remove and recompose (docker-compose up -d) the docker container after modifying apache.

the docker ip and our local ip is different , so not just problem comes from docker. its a routing network problem

@jhonny1977 commented on GitHub (Jan 23, 2021): > If you're using a reverse proxy with apache, [you need to add this to your .conf file](https://github.com/plankanban/planka/issues/43#issuecomment-705782001). Although, just so you know, I had to remove and recompose (`docker-compose up -d`) the docker container after modifying apache. the docker ip and our local ip is different , so not just problem comes from docker. its a routing network problem
Author
Owner

@jhonny1977 commented on GitHub (Jan 23, 2021):

forget to told there also need configure some websocket setting to make it working

@jhonny1977 commented on GitHub (Jan 23, 2021): forget to told there also need configure some websocket setting to make it working
Author
Owner

@NickKelly1 commented on GitHub (Feb 3, 2021):

Had a similar problem using Nginx as a reverse proxy

Worked after adding these lines to my nginx.conf

server {
  ...
  location / {
    ...
    # upgrade websockets
    # https://stackoverflow.com/questions/12102110/nginx-to-reverse-proxy-websockets-and-enable-ssl-wss
    proxy_set_header Upgrade $http_upgrade;
    proxy_http_version 1.1;
    proxy_set_header Connection "upgrade";
  }
}
@NickKelly1 commented on GitHub (Feb 3, 2021): Had a similar problem using Nginx as a reverse proxy Worked after adding these lines to my `nginx.conf` ```nginx server { ... location / { ... # upgrade websockets # https://stackoverflow.com/questions/12102110/nginx-to-reverse-proxy-websockets-and-enable-ssl-wss proxy_set_header Upgrade $http_upgrade; proxy_http_version 1.1; proxy_set_header Connection "upgrade"; } } ```
Author
Owner

@Syndamia commented on GitHub (Feb 6, 2021):

Ok, my first answer was incomplete (mostly because I didn't know exactly fixed it), but now I had to remake my planka instance, and I started fully from scratch. I tracked my steps and this is what you have to do:

  1. Following @clemone543's answer, modify your docker-compose.yml file by replacing BASE_URL=http://localhost:PORT with BASE_URL=https://planka.yourdomain.com and recompose the docker container!
  2. Following @newhinton's answer in another issue, you gotta add this to your apache config, to redirect properly the socket.io (websocket) stuff:
ProxyPass /socket.io ws://localhost:YOUR_PORT/socket.io/
ProxyPassReverse /socket.io ws://localhost:YOUR_PORT/socket.io/
  1. Following StackOverflow, you also need to enable websockets with proxies in apache. You can do that with sudo a2enmod proxy_wstunnel (don't forget to restart apache2 afterwards).
@Syndamia commented on GitHub (Feb 6, 2021): Ok, my first answer was incomplete (mostly because I didn't know exactly fixed it), but now I had to remake my planka instance, and I started fully from scratch. I tracked my steps and this is what you have to do: 1. Following @clemone543's [answer](https://github.com/plankanban/planka/issues/68#issuecomment-754708438), modify your `docker-compose.yml` file by replacing `BASE_URL=http://localhost:PORT` with `BASE_URL=https://planka.yourdomain.com` **and** recompose the docker container! 2. Following @newhinton's [answer in another issue](https://github.com/plankanban/planka/issues/43#issuecomment-705782001), you gotta add this to your apache config, to redirect properly the socket.io (websocket) stuff: ```apache ProxyPass /socket.io ws://localhost:YOUR_PORT/socket.io/ ProxyPassReverse /socket.io ws://localhost:YOUR_PORT/socket.io/ ``` 3. Following [StackOverflow](https://stackoverflow.com/a/24042195), you also need to enable websockets with proxies in apache. You can do that with `sudo a2enmod proxy_wstunnel` (don't forget to restart apache2 afterwards).
Author
Owner

@ikwtif commented on GitHub (Mar 29, 2021):

I assume this issue hasn't been solved? I'm having the same issue, I'm using nginx proxy manager but I don't really have an idea on how to implement these "fixes" for this. I can see the login fine either on my local network or trough my domain, but it's just infinite loading after I login.

websocket.js:124 WebSocket connection to 'wss://planka.mydomain.be/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: 

Any ideas for how to fix this with nginx proxy manager?

@ikwtif commented on GitHub (Mar 29, 2021): I assume this issue hasn't been solved? I'm having the same issue, I'm using nginx proxy manager but I don't really have an idea on how to implement these "fixes" for this. I can see the login fine either on my local network or trough my domain, but it's just infinite loading after I login. ``` websocket.js:124 WebSocket connection to 'wss://planka.mydomain.be/socket.io/?__sails_io_sdk_version=1.2.1&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket' failed: ``` Any ideas for how to fix this with nginx proxy manager?
Author
Owner

@pbartyik commented on GitHub (Mar 30, 2021):

I had the same issue with nginx @ikwtif . I'm doing exactly as in #21 , the mistake I made was that BASE_URL had the port 3000 in it. Had to change it to https://whatever.mydomain.my and recompose. Although I did stop the running containers, wiped the installed docker volumes and then recompose. This wasn't a problem as I had a fresh install.

@pbartyik commented on GitHub (Mar 30, 2021): I had the same issue with nginx @ikwtif . I'm doing exactly as in #21 , the mistake I made was that BASE_URL had the port 3000 in it. Had to change it to https://whatever.mydomain.my and recompose. Although I did stop the running containers, wiped the installed docker volumes and then recompose. This wasn't a problem as I had a fresh install.
Author
Owner

@ikwtif commented on GitHub (Mar 31, 2021):

I had the same issue with nginx @ikwtif . I'm doing exactly as in #21 , the mistake I made was that BASE_URL had the port 3000 in it. Had to change it to https://whatever.mydomain.my and recompose. Although I did stop the running containers, wiped the installed docker volumes and then recompose. This wasn't a problem as I had a fresh install.

I'm running nginx proxymanager (https://github.com/jc21/nginx-proxy-manager/) , guess I should figure out how to use it with that then, might be a bit different. Not sure if I can just edit config files myself without breaking something. But I'll try, thanks

@ikwtif commented on GitHub (Mar 31, 2021): > I had the same issue with nginx @ikwtif . I'm doing exactly as in #21 , the mistake I made was that BASE_URL had the port 3000 in it. Had to change it to https://whatever.mydomain.my and recompose. Although I did stop the running containers, wiped the installed docker volumes and then recompose. This wasn't a problem as I had a fresh install. I'm running nginx proxymanager (https://github.com/jc21/nginx-proxy-manager/) , guess I should figure out how to use it with that then, might be a bit different. Not sure if I can just edit config files myself without breaking something. But I'll try, thanks
Author
Owner

@ikwtif commented on GitHub (Apr 1, 2021):

Just a FYI. I just had to toggle a button for websocket support in the nginx proxymanager. Apparently, I'm blind and I didn't even notice the button.

@ikwtif commented on GitHub (Apr 1, 2021): Just a FYI. I just had to toggle a button for websocket support in the nginx proxymanager. Apparently, I'm blind and I didn't even notice the button.
Author
Owner

@plutec commented on GitHub (Nov 27, 2024):

I solved the problem changing the parameter onlyAllowOrigins in config/env/production.js
I'm serving all the web in the port 3000.
My case:

onlyAllowOrigins: [
        'http://10.0.1.26:3000'
],

Hope it helps.

Best,

@plutec commented on GitHub (Nov 27, 2024): I solved the problem changing the parameter onlyAllowOrigins in config/env/production.js I'm serving all the web in the port 3000. My case: ``` onlyAllowOrigins: [ 'http://10.0.1.26:3000' ], ``` Hope it helps. Best,
Author
Owner

@kaipee commented on GitHub (Sep 18, 2025):

For NGINX reverse proxy the following works:

server {
    listen 443 ssl http2;
    server_name planka.<domain>;

    # SSL configuration (your existing SSL settings are good)
    ssl_certificate /etc/nginx/ssl/fullchain.pem;
    ssl_certificate_key /etc/nginx/ssl/privkey.pem;
    ssl_dhparam /etc/nginx/ssl/dhparam.pem;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    ssl_prefer_server_ciphers on;
    ssl_ecdh_curve secp384r1;
    ssl_session_timeout 10m;
    ssl_session_cache shared:SSL:10m;
    ssl_session_tickets off;

    # Logs
    access_log /var/log/nginx/planka.access.log;
    error_log /var/log/nginx/planka.error.log;

    client_max_body_size 100M;

    # CRITICAL: Add timeout settings
    proxy_connect_timeout 600s;
    proxy_send_timeout 600s;
    proxy_read_timeout 600s;

    location /socket.io/ {
        proxy_bind $server_addr;
        proxy_pass http://<planka>/socket.io/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_buffering off;
        proxy_request_buffering off;
        # Bypass Cloudflare for this critical WebSocket endpoint
        proxy_set_header CF-Visitor "";
    }

    location / {
        proxy_bind $server_addr;
        set $upstream http://<planka>;
        proxy_pass $upstream;
        proxy_http_version 1.1;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;

        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $host:$server_port;
        proxy_set_header X-Forwarded-Server $host;

        proxy_set_header CF-Connecting-IP $http_cf_connecting_ip;
        proxy_set_header CF-Ray $http_cf_ray;

        proxy_set_header X-Scheme $scheme;
        proxy_set_header Origin "";
        proxy_cache_bypass $http_upgrade;

        proxy_buffering off;
        proxy_request_buffering off;
    }
}
@kaipee commented on GitHub (Sep 18, 2025): For NGINX reverse proxy the following works: ``` server { listen 443 ssl http2; server_name planka.<domain>; # SSL configuration (your existing SSL settings are good) ssl_certificate /etc/nginx/ssl/fullchain.pem; ssl_certificate_key /etc/nginx/ssl/privkey.pem; ssl_dhparam /etc/nginx/ssl/dhparam.pem; ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH'; ssl_prefer_server_ciphers on; ssl_ecdh_curve secp384r1; ssl_session_timeout 10m; ssl_session_cache shared:SSL:10m; ssl_session_tickets off; # Logs access_log /var/log/nginx/planka.access.log; error_log /var/log/nginx/planka.error.log; client_max_body_size 100M; # CRITICAL: Add timeout settings proxy_connect_timeout 600s; proxy_send_timeout 600s; proxy_read_timeout 600s; location /socket.io/ { proxy_bind $server_addr; proxy_pass http://<planka>/socket.io/; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_buffering off; proxy_request_buffering off; # Bypass Cloudflare for this critical WebSocket endpoint proxy_set_header CF-Visitor ""; } location / { proxy_bind $server_addr; set $upstream http://<planka>; proxy_pass $upstream; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host:$server_port; proxy_set_header X-Forwarded-Server $host; proxy_set_header CF-Connecting-IP $http_cf_connecting_ip; proxy_set_header CF-Ray $http_cf_ray; proxy_set_header X-Scheme $scheme; proxy_set_header Origin ""; proxy_cache_bypass $http_upgrade; proxy_buffering off; proxy_request_buffering off; } } ```
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#53