Introduction
Nhost uses a single configuration file to configure both cloud projects and the local development environment, ensuring a near-identical replica of the production environment. This approach also simplifies connecting a repository to multiple projects, keeping them in sync with minimal effort. However, in cases where minor differences need to be accommodated, Nhost offers overlays - files containing operations to modify the configuration file:- Disable email verification
- Set the correct client URL for the staging environment
- Add the environment variable
ENVIRONMENT=staging
Overlays are based on RFC6902.
Creating Overlays
You can create overlays with the CLI commandnhost config edit [--subdomain $SUBDOMAIN]
:

If you need to create an overlay for your local development environment remember to use
local
as subdomain$SUBDOMAIN
:


nhost/overlays/$SUBDOMAIN.json

Viewing Configuration
To verify that your final configuration is correct, you can use the commandnhost config show [--subdomain $SUBDOMAIN]
. This command will apply the specified overlay (if it exists) and render the configuration using the local secrets.

Validating Configuration
Finally, you can validate your configuration overlay with the commandnhost config validate [--subdomain $SUBDOMAIN]
