Created
January 1, 2026 15:52
-
-
Save micro-tiger/23b10a127078cf0ab33db53cff2c846e to your computer and use it in GitHub Desktop.
Syncthing Termux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| π οΈ Installation | |
| Install Termux via F-Droid. | |
| Install and run Syncthing: | |
| pkg update | |
| pkg upgrade | |
| pkg install syncthing | |
| syncthing | |
| Open in the browser: | |
| https://127.0.0.1:8384 | |
| To access the device storage, you need to grant permissions to Termux. Otherwise, only the Termux folder is available: | |
| /data/data/com.termux/files | |
| Path to grant permissions: | |
| Settings β Apps β All apps β Termux β App permissions β Files β Allow | |
| π Autostart | |
| Install termux:boot via F-Droid. | |
| Then in Termux: | |
| ## Create autostart directory | |
| mkdir -p ~/.termux/boot | |
| ## Create startup script | |
| nano ~/.termux/boot/syncthing.sh | |
| ## Make it executable | |
| chmod +x ~/.termux/boot/syncthing.sh | |
| Script: | |
| #!/data/data/com.termux/files/usr/bin/bash | |
| termux-wake-lock | |
| sleep 5 | |
| syncthing --no-browser | |
| You need to allow background activity and background autostart for Termux and termux:boot. | |
| Paths: | |
| Settings β Apps β All apps β Termux β Activity control | |
| Settings β Apps β Permissions β Background autostart β Termux, termux:boot | |
| π§ What happens when the phone boots | |
| Android boots | |
| Termux:Boot catches BOOT_COMPLETED | |
| It launches Termux | |
| Termux executes all *.sh files from: ~/.termux/boot/ | |
| syncthing starts and runs in the background |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment