Learn how to develop against a cloud project using the Nhost CLI
Nhost’s cloud development workflow allows you to develop against a cloud-hosted project while maintaining a minimal local environment. This approach combines the benefits of cloud infrastructure with local development tools, enabling seamless collaboration and deployment workflows.
Cloud development with Nhost offers several key advantages:
First, let’s set up a new project in the Nhost Cloud Console.
Create a new project in the Nhost Cloud Console
Note your project details from the overview page:
Enable database public access:
Configure database password:
Your final PostgreSQL URL will be the connection string with [YOUR-PASSWORD]
replaced by the password you just set.
Now let’s connect your local development environment to the cloud project.
This command will:
With your repository initialized, you can now start the local development environment connected to your cloud project.
Replace the placeholder values with:
your-project-subdomain
: The subdomain noted in step 2your-complete-postgres-url
: The connection string with your password from step 4This command starts a local development environment that connects to your cloud infrastructure while providing local access to the Nhost dashboard and console.
With your local development environment running, always use the local interfaces to make changes to your project.
Access your local development tools at:
When you make changes through the local interfaces:
nhost.toml
or via the local dashboard can be synchronized with your cloud projectTo sync local configuration changes with your cloud project:
If you have database seeds that you want to apply to your cloud project:
Always make changes through the local console or dashboard. Changes made directly in the cloud console will not be tracked locally and may be lost.
Once you’ve developed and tested your changes locally against your cloud project:
This workflow ensures that all your database schema changes and configuration updates are properly versioned and can be reliably deployed across environments.
The nhost up cloud
command always re-applies your complete project state, including:
nhost.toml
--apply-seeds
)This behavior enables you to create multiple cloud development environments as needed:
SUBDOMAIN
and POSTGRES_URL
variablesEach time you run the command, your target cloud project will be synchronized to match your local development state, making it easy to spin up fresh environments for testing, feature branches, or team collaboration.