question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error message "You cannot login over an insecure connection. Please use HTTPS or Tor." misleading

See original GitHub issue

Describe the bug When calling btcpayserver from the web I get the notification “You cannot login over an insecure connection. Please use HTTPS or Tor.” although an SSL certificate is installed. Even the browser says that an SSL certificate is installed.

To reproduce the bug Steps to reproduce the reported bug:

  1. Install this package https://aur.archlinux.org/packages/btcpayserver-git/ which I made.
  2. Follow these installation instructions: https://aur.archlinux.org/cgit/aur.git/tree/README.md?h=btcpayserver-git
  3. Run nbxplorer and btcpayserver in tmux.
  4. Call the website.

Screenshots The error: screenshot-20210301-110141

The valid certificate: screenshot-20210301-111145

Your BTCPay Environment (please complete the following information):

  • BTCPay Server Version: 1.0.6.7
  • Deployment Method: Manual, AUR package
  • Browser: Brave

Settings file for btcpayserver I tried giving the setting “httpscertificatefilepath” all possible certificates in /etc/letsencrypt/live/“subomain.domain.me” but this does not solve the problem. In that case, btcpayserver threw exceptions with log message fail: Configuration: The https certificate file could not be found at privkey.pem..

### Global settings ###
#network=mainnet

### Server settings ###
#port=23000
#bind=127.0.0.1
#httpscertificatefilepath=devtest.pfx
#httpscertificatefilepassword=toto

### Database ###
#postgres=User ID=root;Password=myPassword;Host=localhost;Port=5432;Database=myDataBase;
#mysql=User ID=root;Password=myPassword;Host=localhost;Port=3306;Database=myDataBase;
sqlitefile=sqlite.db

### NBXplorer settings ###
#BTC.explorer.url=http://127.0.0.1:24444/
#BTC.explorer.cookiefile=/home/user/.nbxplorer/Main/.cookie
#BTC.lightning=/root/.lightning/lightning-rpc
#BTC.lightning=https://apitoken:API_TOKEN_SECRET@charge.example.com/

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
Kukkscommented, Mar 4, 2021

Thanks for posting the solution! The error is meant for end users not system admins so. I fear such an advanced message may intimidate new users. Maybe we can post a more precise info on the server logs

On Thu, 4 Mar 2021, 09:30 Matheus Gabriel Werny de Lima, < notifications@github.com> wrote:

I finally found the error. The cause were missing HTTP headers. In this case, the error message “You cannot login over an insecure connection. Please use HTTPS or Tor.” is false and misleading! It should be changed changed to indicate that solely expected headers are missing.

The following settings work.

http { # Variables map $scheme $proxy_x_forwarded_ssl { default off; https on; }

map $http_upgrade $proxy_connection
{
    default upgrade;
    "" close;
}

server
{
    listen          443 ssl;
    server_name     subdomain.domain.me;

    # SSL
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
    ssl_certificate_key /etc/letsencrypt/live/subdomain.domain.me/privkey.pem;
    ssl_certificate /etc/letsencrypt/live/subdomain.domain.me/fullchain.pem;

    location /
    {
        # Proxy
        proxy_pass          http://localhost:8080;
        proxy_http_version  1.1;
        proxy_set_header    Host $host;
        proxy_set_header    Upgrade $http_upgrade;
        proxy_set_header    Connection $proxy_connection;
        proxy_set_header    X-Forwarded-For $remote_addr;
        proxy_set_header    X-Forwarded-Proto $scheme;
        proxy_set_header    X-Forwarded-Ssl $proxy_x_forwarded_ssl;
        proxy_set_header    X-Forwarded-Port $server_port;
    }
}

}

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/btcpayserver/btcpayserver/issues/2322#issuecomment-790426624, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAN357UDB3TYMIKGUOZ44EDTB5AIZANCNFSM4YMHWPQA .

1reaction
kenaitiancommented, Aug 10, 2021

This may be the fix to this problem - https://docs.btcpayserver.org/ChangeDomain/

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to configure Umbrel BTCPay Server with NGINX ...
Today I published a guide on my website on how to expose one's Umbrel node with BTCPay ... I get the error “You...
Read more >
Error message "You cannot login over an insecure connection. ...
Error message "You cannot login over an insecure connection. Please use HTTPS or Tor." misleading.
Read more >
How to Fix “Safari Can't Establish a Secure Connection” Error
In a nutshell, this error message means that the browser doesn't trust the encrypted data on the site. Alternatively, Safari could not access ......
Read more >
Site blocked because "not secure"... How to force/bypass ...
I can access the main page then navigate fine on all test-browser. The website is therefore fine. - "Not secure" : Despite the...
Read more >
[solved] Can't access torproject.org / Newbie Corner / Arch ...
This may happen when an attacker is trying to pretend to be torproject.org, or a Wi-Fi sign-in screen has interrupted the connection. Your ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found