Termux turns your Android phone into a portable Linux environment. With the right setup, you can work on the same codebase from your phone, laptop, or even a server. This guide shows you how to create a cross-platform development environment that’s light, fast, and secure.
If you’re new to Termux, start with this: How to install Termux on Android. Then, follow the steps below to make it your mobile dev powerhouse.
Why this matters
- Same tools and workflow on phone, desktop, and server.
- No need to carry a laptop for every quick edit or deployment.
- Works well with Git, Docker, APIs, and cloud platforms.
- Easy to secure with VPNs and SSH keys.
If you plan to use this for business or client work, consider reading Cyber Security Plan for Small Business to protect your workflow from the start.
1) Install core packages
Update Termux and install essential tools:
pkg update && pkg upgrade -y
pkg install -y git curl wget openssh tmux neovim python nodejs npm ripgrep fd
Why these?
- git — version control.
- openssh — connect securely between devices.
- tmux — keep processes running in background.
- neovim — fast and customizable editor.
- python, nodejs — popular dev stacks.
Do the basics from Things to Do After Installing Termux for a smooth start.
2) Sync your shell and dotfiles
Keep your config the same across devices using Git:
git clone https://github.com/<your-username>/dotfiles ~/.dotfiles
~/.dotfiles/install.sh
Pro tip: Store your aliases, prompt style, and editor settings here. That way, whether you’re on Termux or desktop, it feels the same.
3) Set up Python like your desktop
python -m pip install --upgrade pip
pip install --user pipx
~/.local/bin/pipx ensurepath
Restart Termux
pipx install virtualenv
pipx install black
pipx install ruff
Start a project:
mkdir -p ~/code/myapp && cd ~/code/myapp
python -m venv .venv
. .venv/bin/activate
pip install requests fastapi uvicorn
4) Install Node.js tools
npm install -g pnpm
Or use Yarn
npm install -g yarn
Create a quick frontend app:
mkdir -p ~/code/site && cd ~/code/site
pnpm create vite .
5) Configure SSH for cross-platform access
From Termux to server
ssh-keygen -t ed25519 -C "termux"
ssh-copy-id user@server
From laptop to Termux
sshd
ifconfig | grep 192.168
Then connect from your PC:
ssh -p 8022 u0_aNN@PHONE_IP
Always use a secure connection. See VPNs to Use When Using Termux for safe network setups.
6) Add language servers to Neovim
npm install -g typescript typescript-language-server
pipx install python-lsp-server
Set the same keymaps and themes on both devices for muscle memory.
7) Run VS Code in the browser
pkg install code-server
code-server
Edit the config in ~/.config/code-server/config.yaml
to set your password. Access it via your phone browser or remote.
8) Test with a local web server
Install Nginx for local or LAN testing:
Full Nginx in Termux setup guide
For quick public demos:
pkg install cloudflared
cloudflared tunnel --url http://localhost:3000
9) Security practices you can’t skip
- Use a VPN when on public Wi-Fi. Here’s a detailed Surfshark VPN review.
- Use strong passwords and SSH keys — MaxPhisher in Termux can test password phishing simulations for awareness training.
- Keep your packages updated:
pkg upgrade
,pip list --outdated
,npm -g outdated
. - Have a recovery plan — see Best Cyber Incident Response Companies for emergencies.
10) Troubleshooting common errors
Permission denied on sshd
<p>Run <code>termux-setup-storage</code>, then restart sshd. Check if port 8022 is free.</p>
npm install is too slow
<p>Switch to a closer mirror and try pnpm to save space.</p>
pip install fails
<p>Install build tools: <code>pkg install clang make cmake</code>.</p>
Next steps
Practice by building something small. See Quick Termux Projects You Can Do for ideas. If you later host it, apply Network Security Tips for Small Business to protect it.
Wrap up
You now have a portable, secure, and synced dev environment in Termux. Code anywhere, deploy anytime, and stay safe while doing it.