A Termux add-on app to run programs at boot.
When developing (or packaging), note that this app needs to be signed with the same key as the main Termux app in order to have the permission to execute scripts.
Termux:Boot application can be obtained from:
Additionally we offer development builds for those who want to try out latest features ready to be included in future versions. Such build can be obtained directly from Cirrus CI artifacts.
Signature keys of all offered builds are different. Before you switch the installation source, you will have to uninstall the Termux application and all currently installed plugins.
- Install the Termux:Boot app.
- Start the Termux:Boot app once by clicking on its launcher icon. This allows the app to be run at boot.
- Create the
~/.termux/boot/
directory. - Put scripts you want to execute inside the
~/.termux/boot/
directory. If there are multiple files, they will be executed in a sorted order. - Note that you may want to run
termux-wake-lock
as first thing if you want to ensure that the device is prevented from sleeping.
Example: To start an sshd server and prevent the device from sleeping at boot, create the following file at ~/.termux/boot/start-sshd
:
#!/data/data/com.termux/files/usr/bin/sh
termux-wake-lock
sshd
Released under the GPLv3 license.