Skip to content
Introduction / 02

Getting started ​

Development and CI only

Puth exposes remote browser objects through its API. Keep the server restricted to your development environment or CI network; do not expose it to the internet.

Run a Puth server, open its GUI, then connect your test client. For an overview of how these pieces fit together, see What is Puth?.

Start the server ​

Choose npm or Docker to run Puth.

npm ​

Use Node.js 24 or newer:

sh
npm install --global puth
puth start

On startup, Puth downloads and caches the required Chrome installation if needed. Follow the prompt to choose its location.

Puth checks ~/.cache/puth and .cache/puppeteer relative to the server's working directory. Using the home directory cache avoids downloading separate copies for each project.

Docker ​

sh
docker run -it --rm -p 127.0.0.1:7345:7345 ghcr.io/puth-io/puth

latest follows the newest release. To keep CI reproducible, pin a version from the package page, for example ghcr.io/puth-io/puth:0.9.0.

When a browser running in Docker needs to reach an application on your host, use host.docker.internal. On Linux, add --add-host=host.docker.internal:host-gateway to the Docker command.

Docker Compose ​

The OCI image includes Chrome and can also run with Podman. To start it alongside your development services:

yaml
services:
  puth:
    image: ghcr.io/puth-io/puth
    ports:
      - '127.0.0.1:7345:7345'
    volumes:
      - ./puth/snapshots:/puth/storage/snapshots

The volume preserves snapshots from the container so you can keep them as CI artifacts. Configure your client with the server address it can reach: http://127.0.0.1:7345 from your host, or http://puth:7345 from another service on the same Compose network.

Open the GUI ​

Visit http://localhost:7345 while the server is running. The GUI shows browser activity and can open exported snapshot files by drag and drop.

The Puth GUI with a failed test: its steps on the left, the page at the failing step on the right

Each test lists its steps, split into the pages they ran on. Hover a step to see the page at that moment, click it to keep it, and switch between the page before and after it. Console output and requests sit collapsed under the step that caused them, and a failed test starts with a summary that leads to the failing step.

Connect a client ​

Follow Laravel setup to install puth/php, configure the server address and run your first $this->browse() test.

Learn the Browser API ​

Once your first test runs, explore:

Moving existing tests? See migrating from Dusk. For individual methods, use the Browser and Context references.