How to Install Appium: A Step-by-Step Guide
Install the Appium server, add the driver for your target platform, configure Android prerequisites, and verify the setup with a sample session.
To install Appium, install a supported version of Node.js and npm, install the Appium server with npm install -g appium, start it with appium, and install a driver for the platform you want to automate. For Android, the usual starting point is the UiAutomator2 driver; you also need Android SDK tools, a Java JDK, and an emulator or a USB-debugging-enabled device. Installing the server alone does not install a driver or the platform toolchain.
This guide walks through a complete Android setup, explains the platform choices, shows how to validate the installation, and includes a minimal Python client example. For current installation instructions, see the Appium quickstart and current Appium requirements.
1. Check the requirements and choose a platform
Appium runs on macOS, Linux, and Windows. The current requirements page lists Node.js ^20.19.0 || ^22.12.0 || >=24.0.0 and npm >=10, and recommends Node.js LTS. These minimums can change, so check the requirements page before installing or upgrading.
Appium is the server that receives automation sessions. The selected driver implements automation for a particular platform. You will also need a client library in the language your tests use. The server, driver, client, SDK, and device or emulator are separate pieces.
| Target | Driver direction | Host and setup note |
|---|---|---|
| Android | UiAutomator2 | Android SDK tools and Java JDK; use an emulator or a debug-enabled physical device. |
| iOS | XCUITest | The official quickstart says iOS automation with XCUITest requires macOS. Follow current XCUITest documentation for Xcode and device-specific requirements. |
| Other supported targets | Choose the matching driver from the official driver list. | Check that driver’s current host, SDK, and target requirements. |
If you need to automate both Android and iOS, plan for separate drivers and platform toolchains. Appium’s server is shared, but its driver and target prerequisites are not.
2. Install Node.js and npm
- Install a supported Node.js release from the official Node.js website. Choose an LTS release that meets Appium’s current requirements.
- Open a new terminal and check the installed versions:
node --version
npm --version
Confirm Node.js is within one of the documented ranges and npm is version 10 or newer. If the terminal reports that either command is missing, reopen the terminal after installation or correct your PATH.
3. Install and start the Appium server
Install Appium globally with npm:
npm install -g appium
Then start the server in a terminal:
appium
Keep this process running while your tests execute. The default server is available locally at http://127.0.0.1:4723/. Press Ctrl+C in that terminal to stop the foreground server. Appium’s install guide emphasizes that a driver is required before you can create a session.
4. Install the driver for your platform
For Android, install UiAutomator2:
appium driver install uiautomator2
For Apple’s platforms, the documented driver installation command is:
appium driver install xcuitest
Install only the driver or drivers you need, and consult the official driver list for current platform support and commands. A driver installation does not install the target platform’s SDK or simulator.
5. Configure Android for UiAutomator2
Complete these prerequisites on the machine that will run the Appium server:
- Install Android Studio or the Android command-line tools.
- Use the SDK Manager or command-line tools to install an Android SDK platform and Android SDK Platform-Tools. Platform-Tools includes
adb. - Set
ANDROID_HOMEto your Android SDK directory. For example, the directory might be$HOME/Library/Android/sdkon macOS or%LOCALAPPDATA%\Android\Sdkon Windows, depending on your installation. - Install a Java JDK and set
JAVA_HOMEto its installation directory. A JRE alone is not sufficient. - Choose an Android Virtual Device (AVD) and launch it, or connect a physical Android device with developer options and USB debugging enabled.
Environment-variable paths vary by operating system and installation method. After setting them, open a fresh terminal so the environment is reloaded. Verify that the Android Debug Bridge can see a connected target:
adb devices
An emulator or device should appear in the output. If a physical device is listed as unauthorized, unlock it and accept its USB debugging prompt.
6. Check Android prerequisites with Driver Doctor
Run the UiAutomator2 prerequisite check:
appium driver doctor uiautomator2
Read the result carefully. Fix every required prerequisite; optional suggestions are not the same as required fixes. Once required checks pass, restart the Appium server and confirm its startup output lists UiAutomator2 as an available driver.
7. Install a client library and run a sample
The Appium server does not include a test client. Install the client for the language used by your test suite. The official client list covers JavaScript and TypeScript, Python, Java, Ruby, .NET, and other options.
Here is a minimal Python example using the Appium Python client. It connects to the local server, requests an Android UiAutomator2 session, prints the device name, and ends the session. Replace the device name with one available in your emulator or device configuration.
python -m pip install Appium-Python-Client
from appium import webdriver
from appium.options.android import UiAutomator2Options
options = UiAutomator2Options()
options.platform_name = "Android"
options.automation_name = "UiAutomator2"
options.device_name = "Android Emulator"
# Set app to an APK path or use app_package and app_activity for an installed app.
# options.app = "/absolute/path/to/app.apk"
driver = webdriver.Remote("http://127.0.0.1:4723", options=options)
try:
print(driver.capabilities.get("deviceName"))
finally:
driver.quit()
This example verifies that the server, driver, client, and target can establish a session. To automate a particular app, provide the appropriate app capability and follow the client and driver documentation for that app’s launch details.
8. Install the iOS driver when needed
For an iOS target, install XCUITest with appium driver install xcuitest and use a macOS host. Xcode, simulator or physical device configuration, signing, and provisioning requirements depend on the target and current XCUITest driver support. Use the current Appium quickstart and driver documentation for those specifics rather than applying the Android checklist to iOS.
9. Troubleshooting common installation problems
| Symptom | Likely cause | What to do |
|---|---|---|
appium: command not found or not recognized |
Global npm executable directory is not on PATH, or the terminal predates installation. | Open a new terminal, check npm prefix -g, and add npm’s global executable directory to PATH for your shell or operating system. |
| Unsupported Node.js or npm version | The installed runtime is outside Appium’s current requirements. | Compare node --version and npm --version with the current requirements page; install a supported Node.js LTS release and retry. |
| Session creation says no driver is available | The server is installed, but the platform driver is missing or not registered. | Install the matching driver, such as appium driver install uiautomator2, restart the server, and inspect its startup output. |
| Driver Doctor reports missing Android SDK tools | SDK Platform or Platform-Tools is missing, or the SDK path is not configured. | Install the required SDK components and set ANDROID_HOME to the actual SDK directory; open a fresh terminal and rerun Driver Doctor. |
adb is not recognized or finds no device |
Platform-Tools is missing or not on PATH; the emulator may be stopped; a device may not have authorized debugging. | Install Platform-Tools, add its directory to PATH if needed, launch the emulator, or accept the device’s USB debugging prompt. Check again with adb devices. |
Java or JAVA_HOME check fails |
No JDK is installed, or JAVA_HOME points to the wrong directory. |
Install a JDK, set JAVA_HOME to its home directory, reopen the terminal, and rerun Driver Doctor. |
| iOS driver setup fails on Windows or Linux | The XCUITest automation route requires a macOS host. | Run the iOS setup on a supported macOS machine and follow current Xcode and XCUITest requirements. |
| The client cannot connect to the server | Appium is not running, or the client URL does not match the server address. | Keep appium running, connect to http://127.0.0.1:4723/, and check the server terminal for startup errors. |
10. Performance, reliability, and cost considerations
- Server overhead: The Appium server is relatively lightweight, but the driver and target toolchain add their own requirements. Emulators, SDKs, and test applications usually determine much of the machine and storage needed.
- Reliability: Keep the server running for the duration of client sessions. Validate the driver and device before investigating test code; an unavailable device or missing SDK can look like a test failure.
- Repeatable setup: Record the Node.js/npm versions, installed driver, SDK/JDK configuration, and client dependency in your project setup notes. Check the official requirements before upgrades because supported runtime versions change.
- Cost: Appium installation itself is free. Your environment may still have costs for hardware, hosted machines, device labs, or cloud testing, but the cited installation material does not establish a specific provider or price.
11. Or skip the browser setup
Appium is for automating mobile apps. If the task is to capture a website for documentation, monitoring, or an AI workflow, ScreenshotNeo is a website screenshot API and MCP server: one GET request returns a PNG, JPEG, WebP, or PDF. See the ScreenshotNeo API documentation for options and response details.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
const image = Buffer.from(await res.arrayBuffer());
await (await import('node:fs/promises')).writeFile('shot.webp', image);
Cookie banners are accepted and removed before capture, along with known newsletter popups and chat widgets. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and billing status. An MCP server lets Claude, Cursor, and other MCP clients use screenshot tools. The free plan includes 1,000 screenshots each month with no card; paid plans start at $5 for 3,000 screenshots. Create a free ScreenshotNeo account.
Frequently asked questions
Does installing Appium install Android Studio?
No. Appium installs the server. Android Studio or Android command-line tools, SDK components, Java, and a target device or emulator are separate setup.
Can I install Appium without npm?
The installation path covered here uses npm and is the documented server installation command. Use the official installation guide for any currently supported alternative distribution method.
Can I use one Appium driver for Android and iOS?
No. Install the driver that matches the platform, such as UiAutomator2 for Android or XCUITest for Apple’s platforms.
Do I need a physical Android phone?
No. The Android setup can use an Android Virtual Device or a physical device configured for USB debugging.
Where should I look when a driver prerequisite changes?
Use the current Appium requirements, driver documentation, and the driver’s Doctor command where available; versioned older guides can have outdated runtime requirements.


