Guides
Instances
Give staging, a client, or a demo its own running copy.
Deploy a staging copy
From your app's project folder:
hub deploy --instance stagingHub creates a separate instance and prints its URL. Production stays unchanged.
To set variables before its first deployment, create an empty instance of an existing app with hub app my-app instance create staging, then set its environment using my-app/staging. Deploy to it with hub deploy --name my-app --instance staging. The separate create command is optional when deploying directly.
Work with staging
List the app's instances:
hub app my-app instance listUse app/instance in app commands:
hub app my-app/staging open
hub app my-app/staging logsEach instance has its own releases, variables, access settings, and volumes. Staging does not copy production data. An app invitation grants access across the app's instances.
An app name alone targets prod for operations such as logs and status. Deletion is different: hub app my-app rm deletes the app and every instance; hub app my-app/staging rm deletes only staging.
Deleting and recreating an instance with the same name gives it separate volumes. It never adopts retained data from the deleted instance, and the CLI and dashboard do not offer a restore operation. See storage and deletion.
Check your allowance before adding an instance.
Remove an instance
hub app my-app instance remove stagingThis removes only staging. In an interactive terminal, Hub asks you to confirm removal, then asks separately whether to delete its data volumes.
To remove it without prompts and retain its volumes:
hub app my-app instance remove staging --yesTo delete its volumes too, use --delete-data. This flag also skips both confirmation prompts:
hub app my-app instance remove staging --delete-dataDeleting volumes permanently removes the instance's stored data. Check the instance name and back up data you need before confirming.