Skip to content

[Feature Request / Compatibility] Support Docker Swarm API POST /services/create (Required for Dokploy) #603

Open

Description

@showayebDev

What you're trying to do

Description

When deploying an application using Dokploy (a self-hosted PaaS) backed by Kiri's Docker runtime daemon, the deployment fails immediately after pulling the image. Dokploy attempts to provision the service via the Docker Swarm Engine API (POST /services/create), but Kiri returns a 404 Not Found stating that the endpoint is not supported yet.

Self-hosted PaaS platforms like Dokploy rely on Docker Swarm's service management even in single-node environments for rolling updates, zero-downtime deployments, and replicas. Adding support (or a compatible single-node emulation) for the /services/* API would allow Kiri to be used seamlessly with Dokploy and similar orchestration platforms.


Steps to Reproduce

  1. Start the Kiri daemon on Windows.
  2. Run Dokploy configured to use Kiri as the Docker runtime.
  3. In the Dokploy dashboard, create a new service/application pointing to a Docker image (e.g. ghcr.io/showayebdev/demo:latest).
  4. Trigger a deployment.

Observed Behavior / Logs

The image pulls successfully, but the service creation fails with (HTTP code 404) unexpected - Kiri does not support POST /services/create yet.

(Paste your screenshot here via Ctrl+V or drag & drop)

info Initializing deployment
info Pulling ghcr.io/showayebdev/demo:latest
latest: Pulling from showayebdev/demo
87aaee1f6667: Pulling fs layer
881fc932939e: Already exists
9d74ae3b2102: Already exists
e868d1035e50: Already exists
07f9adbf216a: Already exists
b8c2c5870c7e: Already exists
177fffbd7f51: Already exists
555ae2b64d69: Already exists
87aaee1f6667: Pull complete
Digest: sha256:4858a31582783cb8de1d58a456da96aa7df0b205f9cf1a07952ee249c9ab8ddd
Status: Downloaded newer image for ghcr.io/showayebdev/demo:latest
ghcr.io/showayebdev/demo:latest
Pulling image completed.
debug (HTTP code 404) unexpected - Kiri does not support POST /services/create yet
error Error occurred ❌, check the logs for details.

Expected Behavior

Either:

  • Kiri supports Docker Swarm single-node mode / /services/create endpoint.
  • Or Kiri provides a single-node fallback/compatibility layer that spawns the container similar to docker run when /services/create is requested by orchestration tools.

Motivation & Use Case

Dokploy, Portainer, and other self-hosted deployment tools use Docker Swarm's API (/services/create, /services/{id}, etc.) natively. Since Kiri is significantly faster and more lightweight than standard Docker Desktop, having compatibility for /services/create would make Kiri an ideal local and server runtime for self-hosted PaaS workflows.


Environment

  • OS: Windows
  • Kiri Version: 0.2.2
  • Dokploy: Latest
Screenshot 2026-11-19 223341

What you'd like Kiri to do

Please add support (or single-node emulation) for the Docker Swarm API endpoint POST /services/create (and basic /services/* lifecycle endpoints).

How standard Docker does this:

In the official Docker Engine (and Docker Desktop), Swarm mode allows clients to manage services via the Engine API:

  • POST /services/create creates a service (the programmatic equivalent of docker service create).
  • It manages service tasks, networks, replicas, and rolling updates.

What Kiri could do:

Self-hosted PaaS tools like Dokploy, Portainer, and Coolify rely on POST /services/create even on single-node setups.

It would be amazing if Kiri could either:

  1. Support basic single-node Swarm service management, or
  2. Provide a compatibility/fallback layer that intercepts POST /services/create and spins up the container (similar to docker run) so deployments from Dokploy can succeed instead of failing with 404 Not Found.

Would you like to build it?

No, just suggesting it

Activity

  1. added
    enhancement
    on Nov 20, 2026
  2. masihmoloodian commented on Nov 22, 2026

    @masihmoloodian
    Contributor

    I've opened #731 for this. With it, Kiri acts as a swarm of one node: docker swarm init, docker service, docker stack deploy, secrets, configs and overlay networks.

    I ran Dokploy's install.sh steps against it, then deployed two apps through Dokploy: one from an image, and one built from a Git repository's Dockerfile. Both run as services and answer through Dokploy's Traefik, and redeploy, stop and start work. To deploy from Git, Dokploy's service needs DOCKER_BUILDKIT=0 for now; the PR explains why.

    The PR also lists what it doesn't cover yet: more than one node, job services, and a virtual IP per service.

  3. masihmoloodian commented on Nov 28, 2026

    @masihmoloodian
    Contributor

    @libracoder could we agree on the approach for this? CONTRIBUTING.md asks for that before a change this size, and I'd rather adjust #731 than have it sit.

    #731 is rebased on the current main, as one commit: Kiri as a swarm of one node, enough for Dokploy's install and deploys. In short:

    • Services, tasks, stacks, secrets and configs live in the daemon (daemon/swarm.rs), and each task is an ordinary container, named and labelled as Docker does, so the engine runs it like any other.
    • One node only: no swarm join, no Raft, no job services, and no virtual IP per service (names resolve to the tasks, as with --endpoint-mode dnsrr).
    • Overlay networks are bridge networks on that node.

    If you'd rather it go another way, for example behind a setting, in smaller pieces, or only the parts Dokploy needs, say which and I'll change it.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions