dokploy
dokploy copied to clipboard
Default environment selection & improved environment switching UX
What problem will this feature address?
Currently, when opening a project, no environment is auto-selected—even when a project contains deployments in a specific environment such as production. This leads to confusion because:
- Users expect the environment that contains deployments (e.g., production) to be selected by default.
- The autogenerated production environment cannot be changed, yet it is not auto-selected.
- When working with multiple environments (e.g., develop, staging, etc.), users always need to open a dropdown to switch, which adds friction and requires multiple clicks.
- It’s not immediately visible which environment is currently active.
This slows down workflows and makes navigation less intuitive.
Describe the solution you'd like
Introduce a default environment that Dokploy auto-selects when opening a project.
- If a project has deployments in one environment (e.g., production), auto-select that environment.
- Otherwise allow users to set their own default, such as develop, which many users start with.
- Make the active environment more visible without requiring a dropdown.
- Reduce the number of clicks needed to switch environments, e.g.:
- Tabs for environments,
- or a sidebar list,
- or persistent environment buttons
Describe alternatives you've considered
Manually selecting the correct environment from the dropdown every time (current behavior). Naming environments differently, but this does not solve the UX issue.
Additional context
No response
Will you send a PR to implement it?
Maybe, need help
part of #2792
I have update my env by updating in DB using :
docker exec -it dokploy-postgres*
psql -U$POSTGRES_USER -d$POSTGRES_DB
# select all env for visualization
select * from environment;
# update your default env with it's id
update environment set "isDefault" = 't' where "environmentId" = '<envId>' ;
> # if you'd like you can keep production as default as well, it will work just fine