I have been working on a project that uses a Raspberry Pi 3b+ to send collected data to my server. This Raspberry Pi is setup with a 4G module and is able to send and receive data to and from my server. Now I want to be able to do occasional updates over 4G, since I want to place the Raspberry somewhere I cannot access it that easily. I am not sure what the best approach is to make this reliable and not massively consume data.

For the program I wrote:

  • I wrote a web server so that the server can access the pi and make requests (such as auto update).
  • I wrote a data collector that collects data and stores it on the pi (I want this particular program to be updateable remotely), this is also written in nodejs

I have thought of maybe using git, since this only tracks changed files? Or else compile it and make it available for download?

I would love to hear some suggestions or better approaches, because at this point I am not sure what is best to d.


The best approach to remotely manage (and update) RPi is like with any other Linux: via SSH. Connect to it with SSH client and do anything you want to, including apt update / apt dist-upgrade.

There could be problem to connect to something remotely via 4G, because for that you need it to have a public routable address or at least some port forwarded to it, and network operators unwilling to provide that or request some additional money. This could be solved this way: on your server configure a VPN server (OpenVPN will do), configure RPi to connect to this server at startup and maintain a connection (reconnect if disconnected, etc.). It wouldn't consume much resources. Then you will be able to connect to it via this VPN channel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.