Skip to content

feat(panel): add toggle functionality for panel port with recovery co… - #5833

Open
Siumauricio wants to merge 1 commit into
canaryfrom
feat/toggle-panel-port
Open

Siumauricio wants to merge 1 commit into
canaryfrom
feat/toggle-panel-port

Conversation

@Siumauricio

@Siumauricio Siumauricio commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

…mmand

What is this PR about?

Please describe in a short paragraph what this PR is about.

Checklist

Before submitting this PR, please make sure that:

  • You created a dedicated branch based on the canary branch.
  • You have read the suggestions in the CONTRIBUTING.md file https://github.com/Dokploy/dokploy/blob/canary/CONTRIBUTING.md#pull-request
  • You have tested this PR in your local instance. If you have not tested it yet, please do so before submitting. This helps avoid wasting maintainers' time reviewing code that has not been verified by you.

Issues related (if applicable)

closes #123

Screenshots (if applicable)

RetriggerView in GreptileConfidence Score: 3/5

Fix both ways admins can lose panel access before merging.

Summary

Adds a panel-port toggle to the server actions menu.

  • Admins can turn the Dokploy panel’s port 3000 on or off.
  • The backups query returns a generic error when a read fails.

Reviews (1) · Last reviewed commit: "feat(panel): add toggle functionality fo..." · Reviewed by Greptile

Comment on lines +433 to +434
const hostname = requestHost.replace(/:\d+$/, "").toLowerCase();
return hostname === panelHost.trim().toLowerCase();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Direct access passes domain check

isRequestFromPanelHost removes the port before comparing hosts, so an admin visiting http://panel.example.com:3000 passes the check without going through Traefik. If the domain route is broken, disabling port 3000 removes their only working connection and leaves them needing the recovery command. Reject direct-port requests before allowing the port to be disabled.

});
}
}
await togglePanelPort(input.enable);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Clearing the domain removes access

After an admin disables port 3000, clearing the domain removes the panel's last working route. WebDomain allows an empty domain, and assignDomainServer passes it to updateServerTraefik, which deletes the route without restoring port 3000. Make domain removal reject this change or safely restore direct access when the port is disabled.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant