Skip to content

Astrotheque/termux-vscode-scripts

Repository files navigation

Banner

Termux VS Code Server Control

Platform Launcher Termux Status

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.


Fire OS and Fire Max 11 Compatibility Badge

β€œAmazon”, β€œFire”, β€œFire OS”, and β€œFire Max 11” are trademarks of Amazon.com, Inc. or its affiliates.


πŸ“¦ Features

  • start-code-server.sh: Starts code-server on localhost port 8080
  • stop-code-server.sh: Terminates any running code-server instance
  • toggle-code-server.sh: Starts or stops based on current state
  • status-code-server.sh: Displays current running state

Each script has a matching .shortcuts/ entry for widget launching.


🧱 Folder Structure

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

πŸ”§ Setup Instructions

1. Clone the Repo

git clone https://github.com/Astrotheque/termux-vscode-scripts.git
cd termux-vscode-scripts
chmod +x *.sh .shortcuts/*

2. Copy or Symlink the Shortcuts

mkdir -p ~/.shortcuts
cp .shortcuts/* ~/.shortcuts/

3. Install Required Termux Packages

pkg install nodejs
npm install -g code-server

πŸ–₯️ Using Termux

This project was built and tested using the Termux terminal emulator for Android.

Tested Termux Version:

Recommended Installation Source:

βœ… GitHub Releases (secure and up-to-date)
❌ Do not use the Play Store version β€” it is outdated and unsupported.


πŸ› οΈ Termux Initial Setup Notes:

Run Updates:

pkg update && pkg upgrade

Grant storage permissions:

termux-setup-storage

Install required packages before using scripts:

pkg install git nodejs openssh

Code-Server Initial Setup Notes:

πŸ“„ Setup Guide for Code Server on Fire Max 11


🧩 Using Termux:Widget

πŸ”Ή Fire OS (Fire Max 11) Note

  • 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.

πŸ”Ή Install Termux:Widget

  1. Download from F-Droid or GitHub Releases
  2. Install via Android's native installer (tap .apk in file manager)
  3. Add the widget via Microsoft Launcher
  4. Tap your scripts to run them from the widget interface

🧠 Tips

  • Scripts use nohup to stay alive in background
  • Process control is handled via pkill -f code-server
  • Customize bind IP/port if needed

πŸ“œ License

MIT License


πŸ‘€ Maintainer

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.