# How do I connect an Android phone to Desktop Commander Remote?

> Experimental: run Desktop Commander Remote on an Android phone with Termux, a free app that adds a command line to Android. Setup takes a few minutes.

Source: https://desktopcommander.app/help/devices/connect-android-phone

::: warning Experimental
Desktop Commander doesn't officially support Android. We've tested these steps, but we can't promise everything will work smoothly on every phone.
:::

There's no Android app for Desktop Commander, but you can run Desktop Commander Remote on an Android phone or tablet with Termux. Termux is a free, open source app that adds a Linux command line to Android, so Desktop Commander can run on your phone the same way it runs in a terminal on a computer. Setup takes a few minutes. The phone then works as a device of its own, so the AI can use it even when your computers are off.

This article is for Desktop Commander Remote, which you use from ChatGPT, Claude or another AI app.

## Before you start

- Desktop Commander Remote is added to your AI app. See [What is Desktop Commander and how do I install it?](https://desktopcommander.app/help/getting-started/what-is-desktop-commander)
- An Android phone or tablet with Android 11 or newer, or Android 7 or newer if you install Termux from F-Droid

## What the AI can do on your phone

The AI works through Termux, so it can do what Termux can do:

- Read and manage files in your phone's storage, like photos and videos, downloads and WhatsApp media, after you allow storage access
- Show what takes up space and find large or duplicate files
- Run command line tools that you install in Termux

It can't change Android settings, manage your installed apps or read other apps' private data.

## Set up Termux

1. Install Termux from [Google Play](https://play.google.com/store/apps/details?id=com.termux).

   Or install it from [F-Droid](https://f-droid.org/packages/com.termux/), which usually has more stable and up to date builds. Use only one of the two.

2. Open Termux and update its packages:

   ```bash
   pkg update && pkg upgrade -y
   ```

   If it asks a question while updating, press Enter to keep the default answer.

3. Install Node.js and the Android tools:

   ```bash
   pkg install nodejs-lts android-tools -y
   ```

4. Give Termux access to your files:

   ```bash
   termux-setup-storage
   ```

   Allow access when Android asks. On some phones this opens a settings page where you turn on file access for Termux.

## Connect your phone

Run this in Termux:

```bash
npx -y @wonderwhy-er/desktop-commander@latest remote
```

Termux shows a link and a code. If your browser doesn't open by itself, open the link in your phone's browser. Check that the code on the page matches the code in Termux, then tap **Verify device**.

If the codes don't match, don't verify. Run the command again.

## What you should see

Termux shows **Device ready**. Your phone appears in your device list at [mcp.desktopcommander.app](https://mcp.desktopcommander.app/) with the name `localhost`.

Go back to ChatGPT or Claude and ask: "Use Desktop Commander Remote to show how much free space my Android phone has and what takes up the most."

If your computers are online too, tell the AI to use the device called `localhost`.

## Stay online

Desktop Commander works only while it runs in Termux.

- You can switch to other apps, but don't close Termux
- Android can stop apps in the background to save battery. To keep Termux running, pull down its notification and tap **Acquire wakelock**, and turn off battery optimization for Termux in your phone's settings
- After the phone restarts, open Termux and run the command from [Connect your phone](#connect-your-phone) again

## Stop or remove your phone

- **Stop:** pull down the Termux notification and tap **Exit**. The phone goes offline until you run the command again
- **Remove:** remove or revoke the phone on [mcp.desktopcommander.app](https://mcp.desktopcommander.app/)

## If it didn't work

- If `pkg` can't download packages, run `termux-change-repo` and pick a different mirror
- [Why can't Desktop Commander Remote find my computer?](https://desktopcommander.app/help/troubleshooting/remote-cant-find-computer)

## Related articles

- [How do I connect a computer to Desktop Commander Remote?](https://desktopcommander.app/help/devices/connect-computer)
- [How do I use Desktop Commander safely and limit its access?](https://desktopcommander.app/help/security-privacy/use-safely-limit-access)
- [Why can't Desktop Commander Remote find my computer?](https://desktopcommander.app/help/troubleshooting/remote-cant-find-computer)
