---
title: TestingBot Tunnel Quickstart - Run Your First Local Test
description: A 5-minute quickstart for TestingBot Tunnel. Download, start the tunnel,
  and run your first Selenium, Cypress, Playwright or Appium test against localhost.
source_url:
  html: https://testingbot.com/support/tunnel/quickstart
  md: https://testingbot.com/support/tunnel/quickstart/index.md
---
# Your first tunneled test in 5 minutes

This guide gets a Selenium, Cypress, Playwright, Puppeteer or Appium test running against your local development server. If you have not already, [create a free TestingBot account](https://testingbot.com/users/sign_up) before you start.

STAGING · INTERNALapi.internal:8000staging.db:5432qa.example.dev:443YOUR MACHINESeleniumPlaywrightPuppeteerAppiumXCUITestMaestro$ testingbot-tunnel.jarDEDICATED ENDPOINTSSH/TLSTESTINGBOT GRIDDEVICES/BROWSERS · 6600+TVVMVMVMVMVMVM← REQUESTRESPONSE →123456

## Prerequisites

- JAVA11 or higher. Check with `java -version`.
- ACCOUNTA TestingBot account. The free trial is enough.
- CREDENTIALSYour TestingBot key and secret from [account settings](https://testingbot.com/members/user/edit).
- LOCAL SERVERAnything that responds on a local port, e.g. `localhost:3000`.

## Download the tunnel

Download the latest JAR and unzip it. Place `testingbot-tunnel.jar` anywhere on your `PATH`, or run it from the unzipped folder.

    curl -O https://testingbot.com/downloads/testingbot-tunnel.zip
    unzip testingbot-tunnel.zip
    cd testingbot-tunnel

Prefer Docker or Maven? See the [installation guide](https://testingbot.com/support/tunnel/installation) for every install method.

## Start the tunnel

Pass your TestingBot key and secret. You can also export them as environment variables so they never appear in your shell history.

    java -jar testingbot-tunnel.jar TESTINGBOT_KEY TESTINGBOT_SECRET

You will see log output as the tunnel provisions a dedicated VM in the TestingBot cloud and opens an SSH-encrypted channel. After 30 to 60 seconds, you will see:

    You may start your tests

The tunnel is now listening on `localhost:4445` for your Selenium and Appium clients.

## Run your first test

Change the hub URL in your test runner from the public TestingBot hub to your local tunnel endpoint. That is the only change required.

    - https://hub.testingbot.com/wd/hub
    + http://localhost:4445/wd/hub

Run your tests as you normally would, and the cloud browser will reach your `localhost` via the tunnel.

## Language examples

The same first test in five common languages. Each one points the WebDriver at the local tunnel hub.

[Java](https://testingbot.com#)[Python](https://testingbot.com#)[NodeJS](https://testingbot.com#)[Ruby](https://testingbot.com#)[C#](https://testingbot.com#)

    DesiredCapabilities caps = new DesiredCapabilities();
    caps.setCapability("browserName", "chrome");
    caps.setCapability("platformName", "WIN11");
    
    WebDriver driver = new RemoteWebDriver(
      new URL("http://KEY:SECRET@localhost:4445/wd/hub"),
      caps);
    
    driver.get("http://localhost:3000");
    System.out.println(driver.getTitle());
    driver.quit();

    from selenium import webdriver
    
    options = webdriver.ChromeOptions()
    options.set_capability("platformName", "WIN11")
    
    driver = webdriver.Remote(
        command_executor="http://KEY:SECRET@localhost:4445/wd/hub",
        options=options,
    )
    driver.get("http://localhost:3000")
    print(driver.title)
    driver.quit()

    const { remote } = require("webdriverio");
    
    const browser = await remote({
      hostname: "localhost",
      port: 4445,
      path: "/wd/hub",
      user: "KEY",
      key: "SECRET",
      capabilities: { browserName: "chrome", platformName: "WIN11" },
    });
    
    await browser.url("http://localhost:3000");
    console.log(await browser.getTitle());
    await browser.deleteSession();

    require "selenium-webdriver"
    
    caps = Selenium::WebDriver::Remote::Capabilities.new
    caps["browserName"] = "chrome"
    caps["platformName"] = "WIN11"
    
    driver = Selenium::WebDriver.for(:remote,
      url: "http://KEY:SECRET@localhost:4445/wd/hub",
      capabilities: caps)
    
    driver.navigate.to "http://localhost:3000"
    puts driver.title
    driver.quit

    var options = new ChromeOptions();
    options.AddAdditionalCapability("platformName", "WIN11", true);
    
    IWebDriver driver = new RemoteWebDriver(
      new Uri("http://KEY:SECRET@localhost:4445/wd/hub"),
      options);
    
    driver.Navigate().GoToUrl("http://localhost:3000");
    Console.WriteLine(driver.Title);
    driver.Quit();

## Run with Docker

Prefer not to install Java locally? The official `testingbot/tunnel` image on Docker Hub bundles everything you need. It supports both `amd64` and `arm64` and is the easiest way to run the tunnel from CI or a containerised dev environment.

1. **Pull the image** from Docker Hub.
2. **Start the tunnel** , passing your TestingBot key and secret as environment variables.
3. **Point your tests** at `http://localhost:4445/wd/hub`, exactly the same as the JAR version.

    docker pull testingbot/tunnel
    
    docker run --rm -it \
      --network host \
      -e TESTINGBOT_KEY=YOUR_KEY \
      -e TESTINGBOT_SECRET=YOUR_SECRET \
      testingbot/tunnel

`--network host` only works fully on Linux. On macOS and Windows, expose the ports explicitly so your tests can reach the tunnel on `localhost:4445`:

    docker run --rm -it \
      -p 4445:4445 -p 8087:8087 -p 8003:8003 \
      -e TESTINGBOT_KEY=$TESTINGBOT_KEY \
      -e TESTINGBOT_SECRET=$TESTINGBOT_SECRET \
      testingbot/tunnel

Once the container prints `You may start your tests`, the tunnel is ready. Stop it gracefully with `Ctrl+C`. For Compose, Maven and the NodeJS launcher, see the [installation guide](https://testingbot.com/support/tunnel/installation).

## Next steps

[
Multiple tunnels
 
Add identifiers to run more than one tunnel at a time.
 ](https://testingbot.com/support/tunnel/multiple)[
Upstream proxy
 
Forward through a corporate or GeoIP proxy.
 ](https://testingbot.com/support/tunnel/upstream-proxy)[
Monitoring
 
Configure Prometheus and Grafana.
 ](https://testingbot.com/support/tunnel/monitoring)[
Security model
 
Review SSH encryption and credential handling.
 ](https://testingbot.com/support/tunnel/security)[
Troubleshooting
 
If something goes wrong, this is where to look.
 ](https://testingbot.com/support/tunnel/troubleshooting)[
FAQ
 
Ports, devices, WebSockets and more.
 ](https://testingbot.com/support/tunnel/faq)

Was this page helpful? Yes No 

## Looking for More Help?

Have questions or need more information?   
 You can reach us via the following channels:

- [Email us](https://testingbot.com/contact/new)
- [Join our Slack Channel](https://join.slack.com/t/testingb0t/shared_invite/zt-3bcw9xch-jk19~6XPs_xBrsAgAedkCw)
