Skip to content

Hub Setup

Prerequisites

  • Appium version 3.X
  • Node.js >= 22.0.0
  • PostgreSQL >= 12 (for Hub-Node architecture)
  • Appium drivers installed (uiautomator2, xcuitest)

iOS Real Device Testing

For iOS real device testing, Device Farm supports two methods:

  1. Default: xcrun devicectl (Apple's native tool)
  2. Automatically used if GO_IOS is not set
  3. Requires Xcode and iOS development tools to be installed
  4. No additional configuration needed
  5. Works on macOS systems

  6. Optional: go-ios (for non-macOS systems or if you prefer to use go-ios)

  7. Download and install go-ios from https://github.com/danielpaulus/go-ios
  8. Set the GO_IOS environment variable to the path of the go-ios binary:
    export GO_IOS=/path/to/go-ios
    
  9. Or add it to your shell profile (.bashrc, .zshrc, etc.):
    echo 'export GO_IOS=/path/to/go-ios' >> ~/.zshrc
    source ~/.zshrc
    
  10. Note: If GO_IOS is set, Device Farm will use go-ios instead of xcrun devicectl for iOS real device communication.

Installation

npm install -g farm-orchestrator

Start the Hub

Set up your database and start the orchestrator:

# Database Credentials
export DB_HOST=localhost
export DB_USER=postgres
export DB_PASSWORD=secret
export DB_NAME=device_farm

# Optional: Override default admin credentials
export DEFAULT_ADMIN_USERNAME=your_admin_username
export DEFAULT_ADMIN_PASSWORD=your_admin_password

# Start Hub
farm-orchestrator

Hub is now running at http://localhost:3000

First-Time Login

After starting the hub, you need to log in as an admin to generate API tokens for node connections:

  1. Navigate to http://localhost:3000 in your browser
  2. Use the default credentials (or your custom credentials if you set environment variables):
  3. Username: admin@device-farm.org
  4. Password: Admin@123

Default Credentials

If you didn't set DEFAULT_ADMIN_USERNAME and DEFAULT_ADMIN_PASSWORD environment variables, the default credentials are: - Username: admin@device-farm.org - Password: Admin@123