Skip to content

feat(networks): add encryption option for Docker overlay networks - #6094

Open
SyncWithRaj wants to merge 2 commits into
Dokploy:canaryfrom
SyncWithRaj:feat/overlay-network-encryption
Open

SyncWithRaj wants to merge 2 commits into
Dokploy:canaryfrom
SyncWithRaj:feat/overlay-network-encryption

Conversation

@SyncWithRaj

@SyncWithRaj SyncWithRaj commented Nov 21, 2026 •

Copy link
Copy Markdown

What is this PR about?

Adds support for creating encrypted Docker overlay networks (--opt encrypted / Options: { encrypted: "true" }) from the Networks UI.

  • Database & Schema (packages/server/src/db/schema/network.ts + Drizzle migration): Added an encrypted boolean column (default false) to the network table and included encrypted in createSchema / apiCreateNetwork.
  • Server Service (packages/server/src/services/network.ts): Added buildNetworkCreateOptions to set Options.encrypted = "true" only when driver === "overlay" and encrypted is enabled (preserving existing MTU options), plus isNetworkEncrypted to detect both "true" and "" from Docker inspect responses.
  • UI (handle-network.tsx, show-networks.tsx): Added an overlay-only Encrypted toggle in the Add Network modal (disabled and auto-reset when switching away from overlay, matching Attachable), along with an Encrypted badge and table column in the Networks list.
  • Tests (apps/dokploy/__test__/services/network-options.test.ts): Added 9 unit tests covering overlay encryption, MTU preservation, ignoring encryption on bridge networks, isNetworkEncrypted detection, and Zod validation.

Verified locally:

  • Tested live in local Dokploy instance (created secure-overlay with encryption enabled and verified in Docker/UI).
  • pnpm --filter=dokploy test __test__/services/network-options.test.ts — 9 passed (9)
  • pnpm biome check on all modified files — 0 issues
  • pnpm --filter=@dokploy/server typecheck && pnpm --filter=dokploy typecheck — 0 errors

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 #6088

Screenshots (if applicable)

Screenshot-20261121-170115 Screenshot-20261121-170326

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; the previous finding is fixed and no new actionable issues were found.

Summary

Adds an overlay-only encryption option, saves it with each network, and shows it in the Networks UI.

  • Network creation can turn on encryption for overlay networks.
  • Network sync and lists show encryption state from Docker.

Reviews (2) · Last reviewed commit: "fix(networks): sync stale encrypted flag..." · Reviewed by Greptile

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.

Add encryption option to network tab

1 participant