Can web-interface be https?


#1

Is it possible to make web-interface HTTPS instead of HTTP? In that case how? Can’t find anything on https://loraserver.io


#2

Please see the documentation: https://www.loraserver.io/lora-app-server/install/config/.

Once the tls_cert and tls_key are set ( [application_server.external_api] ), TLS will be activated.


#3

Thanks, although It’s very loosen explained. When using Letsencrypt

sudo letsencrypt certonly --standalone -d DOMAINNAME.HERE

First I get this message: “Problem binding to port 80: Could not bind to IPv4 or IPv6.”, which is because Nginx is running on port 80 aswell. Then when stopping nginx:

sudo systemctl stop nginx

I receive a http-01 error saying “The server could not connect to the client to verify the domain”, which makes sense, as nginx doesn’t redirect to port 8080, and therefore is the domain unavailable.

For my company, it’s very crucial that it’s https, so I appreciate all help! Thanks in advance

What am I supposed to do to make this work? Nginx conf file can be seen here:

server {

    index index.html index.htm index.nginx-debian.html;
    server_name DOMAINNAME.dk; # managed by Certbot

    listen 80;
    server_name DOMAINNAME;

    location / {
    proxy_set_header   X-Forwarded-For $remote_addr;
    proxy_set_header   Host $http_host;
    proxy_pass         "http://IP-ADDRESS:8080";
}

    location ~ ^/api/(gateways|devices)/(\w+)/(frames|events)$ {
    proxy_pass https://IP-ADDRESS:8080/api/$1/$2/$3;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_read_timeout 86400s;
    proxy_send_timeout 86400s;
    }  

}


#4

Letsencrypt has a nginx plugin :slight_smile:

This tutorial might be helpful: https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04.