gotify / server

A simple server for sending and receiving messages in real-time per WebSocket. (Includes a sleek web-ui)
https://gotify.net
Other
11.49k stars 639 forks source link

notifications are not being send when using UFW #710

Closed asbeel1 closed 3 weeks ago

asbeel1 commented 3 weeks ago

Have you read the documentation?

You are setting up gotify in

Describe your problem Notifications aren't being send when using UFW. I have to allow port 443 in UFW and only than notifs are being send. I tried exposing port 443 in the docker compose but this didn't work. Does anyone know why this is the case?

Any errors, logs, or other information that might help us identify your problem diun: error: rpc error: code = Unknown desc = Post "/message?token=": context deadline exceeded (Client.Timeout exceeded whi le awaiting headers)

eternal-flame-AD commented 3 weeks ago

Docker only "registers" to the kernel that gotify is available to handle packets on that port. ufw sets your kernel network stack to reject all incoming packets on that port. Both must be in place for external access.

asbeel1 commented 3 weeks ago

How would I go about doing so?

eternal-flame-AD commented 3 weeks ago

Try pushing on the same machine you are running the docker container (use curl --insecure https://localhost if you have TLS enabled).

If it works: Check sudo ufw status verbose and check incoming traffic is allowed.

If it does not work: Check docker ps, make sure container is healthy, and note the container ID. Check docker inspect <id> -f '{{ .NetworkSettings.Ports}}' check if the correct port is exposed.

asbeel1 commented 3 weeks ago

I see. I will work with this, thank you for your help!