This project provides simple bash scripts and Termux:Widget shortcuts to start, stop, toggle, and check the status of a locally hosted code-server
(VS Code in the browser) running inside Termux.
β Tested on Amazon Fire Max 11 using Fire OS 8.3.3.4 and Microsoft Launcher for widget access.
βAmazonβ, βFireβ, βFire OSβ, and βFire Max 11β are trademarks of Amazon.com, Inc. or its affiliates.
start-code-server.sh
: Starts code-server on localhost port 8080stop-code-server.sh
: Terminates any running code-server instancetoggle-code-server.sh
: Starts or stops based on current statestatus-code-server.sh
: Displays current running state
Each script has a matching .shortcuts/
entry for widget launching.
termux-vscode-scripts/
βββ start-code-server.sh
βββ stop-code-server.sh
βββ toggle-code-server.sh
βββ status-code-server.sh
βββ .shortcuts/
βββ Start VS Code
βββ Stop VS Code
βββ Toggle VS Code
βββ VS Code Status
git clone https://github.com/Astrotheque/termux-vscode-scripts.git
cd termux-vscode-scripts
chmod +x *.sh .shortcuts/*
mkdir -p ~/.shortcuts
cp .shortcuts/* ~/.shortcuts/
pkg install nodejs
npm install -g code-server
This project was built and tested using the Termux terminal emulator for Android.
Tested Termux Version:
v0.118.0
(installed directly from the official Termux GitHub repository)
Recommended Installation Source:
β
GitHub Releases (secure and up-to-date)
β Do not use the Play Store version β it is outdated and unsupported.
Run Updates:
pkg update && pkg upgrade
Grant storage permissions:
termux-setup-storage
Install required packages before using scripts:
pkg install git nodejs openssh
π Setup Guide for Code Server on Fire Max 11
- Fire OS disables custom launchers and widgets on the default home screen.
- Workaround: use Microsoft Launcher and open its Widget screen to access the Termux Widget interface.
- Download from F-Droid or GitHub Releases
- Install via Android's native installer (tap
.apk
in file manager) - Add the widget via Microsoft Launcher
- Tap your scripts to run them from the widget interface
- Scripts use
nohup
to stay alive in background - Process control is handled via
pkill -f code-server
- Customize bind IP/port if needed
MIT License
Astrotheque
https://github.com/Astrotheque
Trademark & Affiliation Notice
Termux is developed by the open-source community and is not affiliated with
Amazon, Microsoft, or Google.
βAmazon,β βFire,β βFire OS,β and βFire Max 11β are trademarks of
Amazon.com, Inc. or its affiliates.
βGoogle Playβ and βGoogle Play Storeβ are trademarks of
Google LLC.
βMicrosoftβ is a trademark of the
Microsoft group of companies.