this post was submitted on 19 Jan 2024
10 points (91.7% liked)

Selfhosted

39906 readers
351 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Hello, recently I have moved from nginx to traefik and have found an "issue" that I would like to have fixed.

Originally with the nginx config I had a block that allowed for ntfy to work with curl without having to specify https:// but with traefik this doesn't work and throws out Permanent Redirect when trying to send a notification using curl.

This are currently my traefik settings for ntfy using labels:

...
    labels:
      - traefik.http.routers.ntfy.rule=Host(`ntfy.cronyakatsuki.xyz`)
      - traefik.http.routers.ntfy.tls=true
      - traefik.http.routers.ntfy.entrypoints=websecure
      - traefik.http.routers.ntfy.tls.certresolver=lets-encrypt
      - traefik.port=80
...

Is there any way to setup traefik and ntfy to be able to send notification without having to specific the protocol or is there no way?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 9 months ago* (last edited 9 months ago)

So curl is trying to reach ntfy via http? Have you tried redirecting http traffic to https and also adding an endpoint for it?

- "traefik.http.middlewares.ntfy-https-redirect.redirectscheme.scheme=https"    
- "traefik.http.routers.ntfy.middlewares=ntfy-https-redirect"    

Also, i'm not sure which version of traefik you are using, but traefik.port is no longer used. Try:

- traefik.http.services.ntfy.loadbalancer.server.port=80