Chirpstack unable to connect to MQTT broker

Hi, I have been trying to setup a chirpstack service on a raspberry pi as the server and a Dragino LG308 as a gateway. In my case, I followed the getting started guide for Debian and I decided to deploy everything on the pi but the gateway bridge(following the guides in the documentation), as the LG308 comes with very little memory.
After configuring everything, I see that the gateway is working fine and it seems to be sending the packages to the MQTT server in the pi (it has manual ip to ensure correct routing every time). The problem at first was that the mosquitto service was running on loopback as I had the default configuration and it run on local only mode, so the Chirpstack service connected to it just fine but the gateway couldnt find it.
The problem now is that after adding the listener 1833 and allow_anonymous lines to mosquitto.conf it now can listen to messages from outside but the Chirpstack service cant connect. Here I attach the message from the journactl:

Apr 13 12:22:17 raspberrypi systemd[1]: Stopped ChirpStack open-source LoRaWAN Network Server.
Apr 13 12:22:17 raspberrypi systemd[1]: Started ChirpStack open-source LoRaWAN Network Server.
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231197Z  INFO chirpstack::cmd::root: Starting ChirpStack LoRaWAN Network Server version="4.3.0" docs="https://www.chirpstack.io/"
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231290Z  INFO chirpstack::region: Setting up regions
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231366Z  INFO setup{common_name=EU868 region_id=eu868}: chirpstack::region: Configuring region
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231514Z  INFO chirpstack::backend::joinserver: Setting up Join Server clients
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231534Z  INFO chirpstack::backend::roaming: Setting up roaming clients
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231558Z  INFO chirpstack::adr: Setting up adr algorithms
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231607Z  INFO chirpstack::integration: Setting up global integrations
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231627Z  INFO chirpstack::integration::redis: Initializing Redis integration
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.231643Z  INFO chirpstack::integration::mqtt: Initializing MQTT integration
Apr 13 12:22:17 raspberrypi chirpstack[1992]: 2023-04-13T10:22:17.241374Z  INFO chirpstack::integration::mqtt: Connecting to MQTT broker server_uri=tcp://0.0.0.0:1883/ client_id=ad4f79abab93b435 clean_session=false
Apr 13 12:22:17 raspberrypi chirpstack[1992]: Error: Setup MQTT integration
Apr 13 12:22:17 raspberrypi chirpstack[1992]: Caused by:
Apr 13 12:22:17 raspberrypi chirpstack[1992]:     0: Connect to MQTT broker
Apr 13 12:22:17 raspberrypi chirpstack[1992]:     1: [-1] TCP/TLS connect failure
Apr 13 12:22:17 raspberrypi systemd[1]: chirpstack.service: Main process exited, code=exited, status=1/FAILURE
Apr 13 12:22:17 raspberrypi systemd[1]: chirpstack.service: Failed with result 'exit-code'.
Apr 13 12:22:17 raspberrypi systemd[1]: chirpstack.service: Scheduled restart job, restart counter is at 5.
Apr 13 12:22:17 raspberrypi systemd[1]: Stopped ChirpStack open-source LoRaWAN Network Server.

I am guessing that the problem is the ip set for the MQTT server yet I have tried 0.0.0.0, 127.0.0.1, and the ip of the pi but nothign worked. Is there other configuration I should change for Chirpstack to be able to communicate with an open broker or am I missing something else?

Chirpstack.toml mqtt integration:

[integration]
  enabled=["mqtt"]

  [integration.mqtt]
    server="tcp://0.0.0.0:1883/"
    json=true

region_eu868.toml mqtt:

[regions.gateway.backend]

      # The enabled backend type.
      enabled="mqtt"

      # MQTT configuration.
      [regions.gateway.backend.mqtt]

        topic_prefix="eu868"

        # MQTT server (e.g. scheme://host:port where scheme is tcp, ssl or ws)
        server="tcp://0.0.0.0:1883/"
        username=""
        password=""

        qos=0

        clean_session=true

        client_id=""

        # Keep alive interval.
        #
        # This defines the maximum time that that should pass without communication
        # between the client and server.
        keep_alive_interval="30s"

Thanks in advance

I have tried using mosquitto_sub and mosquitto_pub both from the raspberri pi itself and when setting the ip to either of the 3 (localhost, any, and the pi’s ip) it works just fine.
From the dragino gateway I can also publish messages and they are received by the pi