Prerequisites
First, follow the regular steps in our quick start guide to begin.Automatic integration (recommended)
Laravel Cloud offers built-in support for Nightwatch. Get set up in minutes:Install Nightwatch package
Install the Laravel Nightwatch package in your application locally using Composer:
Run
composer require laravel/nightwatch on your local machine to update your composer.json and composer.lock files before deploying.Enabling Nightwatch will automatically run the agent across all the App
compute and Worker clusters in the environment. You can
setup Nightwatch manually if you want the
agent to run on specific instances.
Manual integration
You can also manually integrate Nightwatch with Laravel Cloud by adding a background process to each App compute and Worker cluster.Add your environment variables
Before running the agent, you’ll need to add environment variables to your Cloud environment. Follow Laravel Cloud’s guide on managing environment variables to get started.Running the agent
To run the agent in your Cloud application cluster, follow these simple steps: Steps- Select your application cluster
- Click New background process
- Choose Custom worker
- Enter
php artisan nightwatch:agentas the command - Save your changes and redeploy
Visual guide



