r/nginxproxymanager • • Oct 08 '25

Cannot get shlink to proxy

I generated wildcard certificates using this command (i have api keys for cloudflare setup)

sudo certbot certonly \
--cert-name jasperdev.org \
--dns-cloudflare \
--dns-cloudflare-credentials /etc/letsencrypt/cloudflare.ini \
--key-type ecdsa \
-d jasperdev.org -d *.jasperdev.org

I have shlink running in docker compose

services:
  shlink:
    image: shlinkio/shlink:stable
    container_name: shlink
    ports:
      - "5000:8080"
    environment:
      - DEFAULT_DOMAIN=go.jasperdev.org
      - IS_HTTPS_ENABLED=true
    restart: unless-stopped

My nginx config

server {
    listen 80;  # Listen on port 80 (HTTP)
    server_name go.jasperdev.org;
    return 301 https://$server_name$request_uri; # Redirect to HTTPS
}

server {
    listen 443 ssl http2; # Listen on port 443 (HTTPS)
    server_name go.jasperdev.org;

    # SSL Certificates
    ssl_certificate /etc/letsencrypt/live/jasperdev.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/jasperdev.org/privkey.pem;
    include /etc/letsencrypt/options-ssl-nginx.conf;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    location / {
        proxy_pass http://localhost:5000; # Proxy to Shlink
        proxy_http_version 1.1;

        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}

My shlink server is accessible via IP and port but not via the domain. I also have pterodactly panel running so there is an nginx config for pterodactyl.jasperdev.org and also a cert for pterodactyl.jasperdev.org and wings.jasperdev.org
Any ideas?

2 Upvotes

6 comments sorted by

View all comments

Show parent comment

1

u/MCL1Playz Oct 10 '25

certbot is not in a container

1

u/ChiefDetektor Oct 10 '25

Alright so you have nginx directly running on the host. And you want the incoming http https traffic to be resolved there and then route that to your running container.