psitransfer icon indicating copy to clipboard operation
psitransfer copied to clipboard

HTTPS reverse proxy (NPM jc21) not working

Open Aerya opened this issue 4 years ago • 2 comments

Hi,

I use this official Docker:

docker run -d \
--restart=always \
--name psitransfer \
-p 3007:3000 \
-v /home/aerya/mnt/test:/data \
-e PSITRANSFER_ADMIN_PASS=xx \
-e PSITRANSFER_UPLOAD_PASS=xx \
-e PSITRANSFER_DEFAULT_LANGUAGE=fr \
psitrax/psitransfer:latest

It works fine with http://ip:3007 but I can't make it work using Nginx Proxy Manager (NPM from JC21). Sub-domain with Cloudflare, SSL using DNS challenge (cert is ok).

Any tip/help would be appreciated! A.

Aerya avatar Jun 29 '21 12:06 Aerya

are the psitransfer container and the npm on the same network?

Hobbabobba avatar Sep 05 '21 15:09 Hobbabobba

Has Anyone gotten HTTPS working with PSITransfer yet? Also trying NPM (v2.9.18 © 2022) I have NPM working fine by it's self but I'm getting a gateway error for the Proxy. The HTTP://Domain:8080 working for PSITtransfer for the Public space to the Docker thought the firewall. I have to use HTTPS though. Or find a different solution.

JasonB73 avatar Jul 25 '22 20:07 JasonB73

Hi JasonB73. I have it mounted on a Synology running DSM 7.1 and configured a reverse proxy, and works pretty smooth using https.

NeilJared avatar Oct 17 '22 22:10 NeilJared

fruizaviles, thanks for the reply. Still haven't gotten it to work in ESXi7> Photon OS4 > Docker. Any chance you can email me? Looking for any help I can. I must be missing something simply. [email protected]

JasonB73 avatar Oct 18 '22 14:10 JasonB73

When you enable PsiTransfer to server also HTTPS you need to forward the https-port: https://github.com/psi-4ward/psitransfer/blob/master/config.js#L18

Also, you need to access it by the right protocol - HTTPS. Browsers usually try http first when you dont explicitly type the schema: ie https://my-psitrasfer.com vs psi-transfer.com. So you should also forward the http-port. PsiTransfer should answer to an unsecure connection with an redirect if you configure forceHttps https://github.com/psi-4ward/psitransfer/blob/master/config.js#L24

PS: Most users (like me) leave the HTTPS termination (and certificate management) to some other software - for example Traefik and/or Cert-Manager.

psi-4ward avatar Oct 18 '22 14:10 psi-4ward

Using this in Docker to add and setup. -------------HTTPS------------- docker run -d
--restart=always
--name SI-Transfer-HTTPS
-p 8080:8080
-p 8443:8443
-v /home/company/psitransfer:/data
-e PSITRANSFER_ADMIN_PASS=xxxxxx
-e PSITRANSFER_PORT=8080
-e PSITRANSFER_PORT=8443
-e PSITRANSFER_DEFAULTRETENTION=3600
-e PSITRANSFER_UPLOAD_PASS=xxxxxx
psitrax/psitransfer:latest

I tried editing the config.js // HTTPS, set all 3 values to enable "sslPort": 8443, "sslKeyFile": enable, "sslCertFile": enable, "forceHttps": ''enable,

When I try HTTPS://ip:8443 I get a connection timed out error?

JasonB73 avatar Oct 18 '22 16:10 JasonB73

Hi. Try https using port 443. It is mine working for all https services. Kind regards, Frank

El mar, 18 oct 2022 18:54, JasonB73 @.***> escribió:

Using this in Docker to add and setup. -------------HTTPS------------- docker run -d --restart=always --name SI-Transfer-HTTPS -p 8080:8080 -p 8443:8443 -v /home/company/psitransfer:/data -e PSITRANSFER_ADMIN_PASS=xxxxxx -e PSITRANSFER_PORT=8080 -e PSITRANSFER_PORT=8443 -e PSITRANSFER_DEFAULTRETENTION=3600 -e PSITRANSFER_UPLOAD_PASS=xxxxxx psitrax/psitransfer:latest

I tried editing the config.js // HTTPS, set all 3 values to enable "sslPort": 8443, "sslKeyFile": enable, "sslCertFile": enable, "forceHttps": ''enable,

When I try HTTPS://ip:8443 I get a connection timed out error?

— Reply to this email directly, view it on GitHub https://github.com/psi-4ward/psitransfer/issues/182#issuecomment-1282703084, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGKIVT5T73SB3QVGUT6WTDDWD3I2XANCNFSM47P7APDQ . You are receiving this because you commented.Message ID: @.***>

NeilJared avatar Oct 18 '22 20:10 NeilJared

@fruizaviles the port doesnt matter!

@JasonB73

"sslKeyFile": enable,
"sslCertFile": enable,
"forceHttps": ''enable,

is very wrong!

forceHttps needs to be true or false and you've a " before the enable which is incorrect json/javascript

sslKeyFile, sslCertFile - you notice the File ? You've to create certificates and provide the key and the certificate(chain). I will not going to cover it here. Just google how to acquire (ie LetsEncrypt) certificates

psi-4ward avatar Oct 21 '22 18:10 psi-4ward