Can't reach my private Matrix server with the official Matrix integration or via CI/CD

Problem to solve

I want to connect to my private, self-hosted Matrix server from gitlab.com. But neither the project integration nor the CI/CD pipeline can connect to my private Matrix server. It says that it is not reachable, though it can be reached publically.

Steps to reproduce

  1. Activate the Matrix integration for a GitLab project
  2. Paste the self-hosted matrix server address, the access token and the room ID and save the integration settings
  3. Create a new issue for that project
  4. No message is sent to the Specified matrix room

Versions