Dokploy / Dokploy/dokploy

API tokens in Dokploy are currently instance-wide

Open
#4,502 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
37.4k
Forks
3k
Avg merge
1d 3h
Merged PRs (30d)
73

Description

What problem will this feature address?

Any external tool that integrates with Dokploy via API token must be granted
more privilege than it actually needs. For example, a secret sync tool that
only needs to update environment variables for a single application currently
receives read/write access to every service, every project, and every admin
operation on the instance.

This violates the principle of least privilege and makes it harder to safely
hand out tokens to third-party tools, CI pipelines, or self-hosted integrations
without accepting unnecessary risk.

Describe the solution you'd like

Allow API tokens to be scoped at creation time:

Scope Description
Instance (current) Full access — unchanged for admin use cases
Project Access limited to a specific project and its services
Service Access limited to a specific application or compose service

Optionally, scoped tokens could also be restricted by operation type
(read-only vs read-write) for finer-grained control.

Describe alternatives you've considered

None

Additional context

Why this matters

Without scoped tokens, integrating Dokploy with external tooling always carries
unnecessary blast radius. If a scoped token is leaked or misused, the damage is
contained to the resource it was issued for rather than the entire instance.

This came up while building Infibridge,
a self-hosted webhook bridge that syncs Infisical secrets to Dokploy. Users must
currently provide an instance-wide API token, which is documented as a known
limitation. Scoped tokens would eliminate that concern entirely.

Willingness to contribute

Happy to discuss the API design or contribute if the Dokploy team is open to it.

Will you send a PR to implement it?

Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by locating the current API-token creation and authorization paths, then trace how instance-wide permissions are applied. Done means tokens can be scoped to an instance, project, or service, with the existing instance-wide behavior preserved; read-only versus read-write restrictions are described as optional.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, authentication, authorization, backend, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.