Prerequisites

First, follow the regular steps in our quick start guide to begin.

Laravel Forge offers built-in support for Nightwatch. Get setup in minutes:

  1. Navigate to a site that has laravel/nightwatch installed.
  2. Add your environment token.
  3. Click Monitor with Nightwatch.
Nightwatch integration

Enable the Laravel Nightwatch integration


Nightwatch environment token

Add your Nightwatch environment token and click 'Monitor with Nightwatch'


Manual Integration

To ensure the agent runs as a continual process on your Forge server, we strongly recommend running the Nightwatch agent as a daemon.

Steps

  1. Select your server from the server list
  2. Navigate to Daemons
  3. Add the nightwatch:agent artisan command (see below example)

Example Daemon Configuration

SettingValue
Commandphp8.1 artisan nightwatch:agent (use your PHP version)
Directory/home/forge/example.com (your site path)
Number of Processes1
Start Seconds1
Stop Seconds10
Nightwatch Daemon Configuration

Configure the Nightwatch daemon