title: Connection uri of local MQTT broker
body: <p>I currently have two MQTT brokers both working perfectly fine. One of them is a <strong>Raspberry Pi</strong> on my <strong>local</strong> network. The other one is a <strong>remote</strong> broker hosted on <a href="http://cloudmqtt.com" rel="nofollow noreferrer">CloudMQTT</a>. </p>
  
  <p>The goal is to sync both brokers with each other. The easy solution for this, of course, is a bridge, but I'm having some trouble getting a proper bridge setup.</p>
  
  <p>As you can see in the image below, when I try to setup a bridge on <a href="http://cloudmqtt.com" rel="nofollow noreferrer">CloudMQTT</a>, it asks for a <strong>'Connection uri'</strong>. For a remote broker, this would be <code>mqtt://username:password@m20.cloudmqtt.com:1883</code>, but I can't seem to figure out how to do this for a local broker. <a href="https://i.stack.imgur.com/q6ZlA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q6ZlA.png" alt="enter image description here"></a></p>
  
  <p>As far as I know, you can only connect to your local network when you have a static IP and the ports forwarded to the Raspberry Pi, so how would I be able to get around this? The two brokers need to keep a <strong>permanent TCP</strong> connection open, but the remote broker can't open it himself. Wouldn't it be possible for the local broker to open this connection? If so, how would I get the two brokers to sync?</p>
  
  <p>Any help is appreciated, thanks a lot for your help in advance!</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>This is my full /etc/mosquitto/mosquitto.conf file:</p>
  
  <pre><code>pid_file /var/run/mosquitto.pid
  
  persistence true
  persistence_location /var/lib/mosquitto/
  
  log_dest file /var/log/mosquitto/mosquitto.log
  
  include_dir /etc/mosquitto/conf.d
  
  
  connection CloudMQTT-Bridge
  
  topic # both 2 local/testing remote/testing
  
  bridge_protocol_version mqttv311
  
  address m20:cloudmqtt.com:17001
  remote_username jcw******
  remote_password p-fO*****
  remote_clientid RaspberryPiBroker
  </code></pre>