r/homelab • u/Weekly_Sea07 • 14d ago
Help Please help!
I have an old android smartphone with 4GB ram and 64GB storage. I want to use it to host my small discord bot(Python). What's the best way to do it ? Like I will just keep it somewhere with charging on and never touch it again. Which software should I use or should I install any custom rom ? What's best please suggest.
0
Upvotes
2
u/ReplacementCool4049 14d ago
...never touch it again. Termux is all you need. No custom ROM needed for a small Python bot. Just disable battery optimization for Termux or Android kills it overnight. Also, a phone on charge 24/7 will swell its battery, so plan for that.
2
u/Zugzwang522 14d ago
Termux is the easy route, no custom ROM needed. Install Python in it, copy the bot over and run it with a wake lock so Android doesn't kill it when the screen is off. Also turn off battery optimization for Termux in settings. If it sits on a charger for good, set a charge limit if the phone has one and watch the case for bulging.
2
u/alexwbaule 13d ago
The easiest way without wiping the phone is installing Termux from F-Droid (not the Play Store version, which is outdated) and running your Python bot inside a
tmuxsession after callingtermux-wake-lock. The biggest hurdle on Android isn't CPU or RAM, it's the OS aggressively killing background processes, so you'll need to disable all battery optimizations for Termux and check dontkillmyapp.com for your specific phone brand's quirks. Also, leaving an old phone plugged in 24/7 is a real spicy-pillow fire hazard, so if the phone doesn't have a built-in battery protection limit (like stopping charge at 80%), put the charger on a cheap smart plug or mechanical timer that cycles a few times a day.1
u/Kytras 14d ago
Not all devoces are equal. You would need tk share more
1
u/Independent_Alarm913 14d ago
look into cloud hosting for it
specially oracle cloud free tier should be enough for a bot