Wednesday 22 May 2024

RPI: Setting up Raspberry Pi 3B+ to be accessible from anywhere

I have a simple trading bot that I currently run from a WSL Ubuntu session in my home computer. In this post, I'll set up a headless Raspberry Pi that can host that session. I still want to be able to control it from my mobile, so I need to do the following:

Set up RPI headless, Install and Disable screen saver

After installation, the board became unresponsive after some 10 minutes. I found

https://forums.raspberrypi.com/viewtopic.php?t=286000

Now, the RPI works fine for at least a couple of days.

Install app for accessing RPI from mobile

I found RaspController that is available for both Android and Iphone that gives a good interface to the RPI. 

Set up Dynamic DNS using NoIP

I activated a Dynamic DNS session using NoIP with both a host name and ipv4 IP.

As my router was too old, I decided to configure my RPI instead using the instructions below

https://www.noip.com/support/knowledgebase/install-linux-3-x-dynamic-update-client-duc

Make NoIP start automatically when booting

https://www.noip.com/support/knowledgebase/running-linux-duc-v3-0-startup-2

Configure Python and setup venv

There is plenty of documentation online

Nohup to run detached
Finally, since I need the program to run in the background, I used the nohup command to start the script,

https://www.digitalocean.com/community/tutorials/nohup-command-in-linux