Chirpstack v4 API over HTTPS

I am trying to access API over HTTPs on chirpstack v4, but getting 404 Not Found error.

I have v4.3.2 running on debian. HTTPs is configured via nginx. Chirpstack web GUI is working fine.
If I disable the nginx, web API also works and I am getting good responses. http://mydomain:8090/api/gateways?limit=10 is returning the gateway list.

But once I enable back nginx and ufw, above method does not work anymore, so does https://mydomain/api/gateways?limit=10

Can anyone help what I am doing incorrectly, kind of stuck
I have looked at this article - it says web API over HTTPs is not supported in V4?

here additional info:



'# Comment out to enable TLS


'# API interface configuration.

’ # interface:port to bind the API interface to.

'# Secret.
'# This secret is used for generating login and API tokens, make sure this
'# is never exposed. Changing this secret will invalidate all login and API
'# tokens. The following command can be used to generate a random secret:
'# openssl rand -base64 32



nginx default

server {

location / {
    proxy_pass http://localhost:8080;

location ^~ /api {
    grpc_pass grpc://localhost:8090;

listen [::]:443 ssl ipv6only=on; # managed by Certbot
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mydomain/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mydomain/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


server {
if ($host = {
return 301 https://$host$request_uri;
} # managed by Certbot

listen 80 ;
listen [::]:80 ;
return 404; # managed by Certbot



debian:/etc$ sudo ufw status
Status: active

To Action From

22 ALLOW Anywhere
1700 ALLOW Anywhere
Nginx Full ALLOW Anywhere
22 (v6) ALLOW Anywhere (v6)
1700 (v6) ALLOW Anywhere (v6)
Nginx Full (v6) ALLOW Anywhere (v6)


In v4, API is not bundled by default.

I have installed chirpstack API already, and it works ok on http (via swagger and via postman), but it does not work if I switch to HTTPs (via nginx). So question is more for a HTTPs > is API supported for secure http?


Good, so back to my initial question: there is something incorrect in my setup, which prevents accessing my Chirpstack over https, what I am doing wrong?

This is not correct.
It is still http proxy_pass. Not grpc

location ^~ /api {
grpc_pass grpc://localhost:8090;

Hi datnus,
Thanks for the suggestion.
Proxy_pass requires http or https as per nginx article

If I change grpc_path to proxy_path, then nginx fails to start

 location /api/ {
    rewrite /api/(.*) /api/$1  break;
    proxy_pass http://localhost:8090/;
    proxy_redirect     off;
    proxy_http_version 1.1;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_read_timeout 86400s;
    proxy_send_timeout 86400s;

location /api.InternalService {
    grpc_pass grpc://localhost:8080;
    grpc_read_timeout 86400s;
    grpc_send_timeout 86400s;

That did the trick! API over HTTPs is working now. Many thanks!


What do you mean, API is not bundled by default? Does this mean grpc doesn’t work out of the box?

The gRPC API is included by default and works out of the box. The REST API has been moved to a separate repository/service: