- My goal: For App 'ABC' I'd like to limit the environment for that app to 'development' during the development of the app so that it doesn't affect our current main app and production db.
- Issue: Not able to restrict an application to a certain environment
- Additional info: (Cloud or Self-hosted, Screenshots): Cloud
Hi @jeevenugo,
In Retool Cloud, there is currently no built-in way to restrict an individual app to a specific environment (like development or production). However, you can achieve similar behavior with the following workarounds:
-
Use Environment-based Resource Switching
In each Retool environment (Development
,Staging
,Production
), you can configure your resources (e.g., your Postgres database, APIs) to point to different targets.
Then, within your app reference the resource by name (e.g.,main_db
), and Retool will automatically use the version configured for the current environment. This ensures your app runs against the development DB when in the "Development" environment, even if it's the same app. -
Duplicate the App for Isolation
- Duplicate your app and name it something like
ABC [DEV]
. - Use the development environment for that version only.
- Only publish the "main" version to
Production
.
This avoids risk of someone accidentally using the app in Production during development.
-
Restrict Access with Permissions
You can set app-level permissions so only developers can access the development version of the app.
Go to Apps → [Your App] → Settings → Permissions
Limit visibility to your internal team until it's ready. -
Aside form just the db and depending on how you have setup the main app, you can add a page, have the new page only visible to the dev team until it is ready. To take it a step further, you could build the app in a module and place the module in this page. I like to do this as it gives you the added version control over the module or your new app.
Thanks, @Shawn_Optipath!
For folks running into this, I just want to add that we also have environment-level permissions, but this feature is only available for Enterprise. If you're on an Enterprise account, you can set permissions so that all off the app builders only have access to x environment (admins, of course, would have access to all environments still)
That would be an amazing feature to have for Business too.
Agreed I don't think that is on the roadmap, but I'll follow up here if that changes