LoRaWAN
LoRaWAN
This could be something you'd find interesting if you haven't encountered it before.
I haven't tried it myself, but I searched for LoRa when working with IoT devices before. From what I understand, LoRa operates on a one-way and one-way exchange. If you need high bandwidth, you'll also have to supply it or pay for it. It's a fascinating technology, and I think many parts of Europe are already covered by the network, especially major cities. I don't know how it works outside Europe since my research was limited to that region.
You understand you won't be able to achieve a 20km one-way connection. Most WiFi equipment isn't designed for extended distances—typically only a few hundred feet. Even if you have a transmitter capable of 20km, the device you wish to connect can't send a response back. For true long-range coverage, you'll need a specialized wireless link using the device above, and then connect both ends to routers or access points in that area.
I'm experimenting with this and it functions as expected. It doesn't require Wi-Fi. However, LoRa using network protocols like LoRaWAN works well for IoT devices (you can design your own protocol). Yet there aren't many network devices available. I'm hoping this sparks more interest—perhaps @Linus could contribute insights on the subject.