github.com/simpleiot/simpleiot@v0.18.3/docs/user/sync.md (about) 1 # Synchronization 2 3 Simple IoT provides for synchronized upstream connections via NATS or NATS over 4 Websocket. 5 6  7 8 To create an upstream sync, add a sync node to the root node on the downstream 9 instance. If your upstream server has a name of `myserver.com`, then you can use 10 the following connections URIs: 11 12 - `nats://myserver.com:4222` (4222 is the default nats port) 13 - `ws://myserver.com` (websocket unencrypted connection) 14 - `wss://myserver.com` (websocket encrypted connection) 15 16 IP addresses can also be used for the server name. 17 18 Auth token is optional and needs to be 19 [configured in an environment variable](configuration.md) for the upstream 20 server. If your upstream is on the public internet, you should use an auth 21 token. If both devices are on an internal network, then you may not need an auth 22 token. 23 24 Typically, `wss` are simplest for servers that are fronted by a web server like 25 Caddy that has TLS certs. For internal connections, `nats` or `ws` connections 26 are typically used. 27 28 Occasionally, you might also have edge devices on networks where nats outgoing 29 connections on port 4222 are blocked. In this case, its handy to be able to use 30 the `wss` connection, which just uses standard HTTP(S) ports. 31 32  33 34 ## Vidoes 35 36 There are also several videos that demonstrate upstream connections: 37 38 ### [Simple IoT upstream synchronization support](https://youtu.be/6xB-gXUynQc) 39 40 <iframe width="791" height="445" src="https://www.youtube.com/embed/6xB-gXUynQc" title="Simple IoT upstream synchronization support" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> 41 42 ### [Simple IoT Integration with PLC Using Modbus](https://youtu.be/-1PuBoTAzPE) 43 44 <iframe width="791" height="445" src="https://www.youtube.com/embed/-1PuBoTAzPE" title="Simple IoT Integration with PLC Using Modbus" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>