Use a Dockerfile when you need exact control over the image. Use Nixpacks when you want the build worked out from your code with no extra file. Both produce a container image, so the choice is about who writes the build steps: you, or the tool.

One fact to know before you pick Nixpacks: its maintainers now call it unmaintained. The Nixpacks README says: “This project is currently in maintenance mode and is not under active development. We recommend using Railpack as a replacement.” Details are below.

What is the difference between Nixpacks and a Dockerfile?

A Dockerfile is, in Docker’s words, “a text file containing instructions for building your source code.” You write every step: the base image, the install, the build, the start command.

Nixpacks writes those steps for you. According to its docs, it runs in two stages, Plan and Build. In the plan stage, “language providers are matched against the app source directory and suggest Nix packages, an install command, build command, and start command.” You can override all of them.

Under the hood it isn’t magic. The same page says Nixpacks generates a Dockerfile from what it found and builds it with docker build, and adds that “this may change”. System and language dependencies come from the Nix ecosystem.

DockerfileNixpacks
Who writes the buildYouThe tool, from your files
OutputA container imageAn OCI image (Nixpacks docs)
ConfigThe DockerfileOptional nixpacks.toml or nixpacks.json
ControlTotalOverride per phase
LanguagesAnything you can installThe providers it ships
MaintenanceDocker is actively developedMaintenance mode (see below)

Is Nixpacks still maintained?

No new features are planned. The Nixpacks docs carry the same maintenance-mode banner as the README and point to Railpack. Railway’s build docs now say “Railway uses Railpack to build and deploy your code with zero configuration.” I found no date for when Railway switched.

That doesn’t make Nixpacks stop working. The repository is MIT licensed and builds that work today keep working. It does mean a new language version or framework change may not get a provider update. Treat it as a stable tool in a frozen state, and keep a Dockerfile ready for anything it can’t build.

Railpack describes itself as a “zero-config application builder that analyzes code and builds an image”, built on BuildKit. Railway lists Node, Python, Go, PHP, static HTML, Java, Ruby, Deno, Rust, Elixir and shell scripts as out of the box. That list is shorter than Nixpacks’, which covers more than twenty languages, including Clojure, Crystal, Dart, Haskell, Scala, Swift and Zig.

How do I configure Nixpacks?

Put a nixpacks.toml in the app root. The docs show this shape:

[phases.build]
cmds = ['yarn run server:build']

[start]
cmd = 'yarn run server:start'

Values merge in this order, lowest priority first: the provider’s guess, your file, environment variables, then the CLI. So a file overrides detection, and an environment variable overrides the file.

When should I use a Dockerfile instead?

  • The app needs system packages the provider wouldn’t install, or a pinned base image.
  • You build in more than one stage to keep the image small.
  • Your team already runs the same Dockerfile in CI and wants production to match.
  • Nixpacks has no provider for your stack, or the provider is wrong for it.

When is Nixpacks the better pick?

  • The app is a standard Node, Python, Go, Ruby, PHP or static project and you don’t want to maintain a build file.
  • You want a working deploy in minutes and plan to add a Dockerfile only if you outgrow the defaults.
  • An AI agent is writing the project. The agent can leave the build to the tool and skip another file to review.

What does CloudPloy do?

CloudPloy picks for you by looking at the repo. If it finds a Dockerfile, it builds with that. If not, it builds with Nixpacks. Laravel and PHP apps use CloudPloy’s own PHP image, and WordPress and Laravel have presets. You can see which builder it chose before you deploy: the agent’s detect_app tool returns it, along with the detected framework and port.

So the practical rule on CloudPloy is simple. Add a Dockerfile when you need control. Leave it out and CloudPloy uses Nixpacks. Because CloudPloy checks for the file first, adding one later changes the build without any other setting.

To let your agent run the whole thing, connect it over MCP. The Claude Code guide and the Cursor guide show how. For other tools your agent can call, see which MCP servers deploy apps.

Does Nixpacks work for Laravel?

Nixpacks lists PHP among its providers, so it can build a PHP project. For Laravel on CloudPloy you don’t need to think about it, since Laravel uses the PHP image and a preset. For a full walkthrough on your own server, see deploy Laravel to Hetzner.

What does it cost?

Both builders cost nothing to use. On CloudPloy there is a Free plan for one server and one app, with a hard cap of 2 vCPU and 2 GB RAM, and paid plans from $9.99 to $39 a month. See pricing.

FAQ

Is Nixpacks better than Docker?

They aren’t rivals. Nixpacks makes a container image, and it builds it with Docker’s tooling. It is easier when your stack is common. A hand-written Dockerfile is better when you need a specific base image, extra system packages or a multi-stage build.

Does Nixpacks create a Dockerfile?

Yes. Its docs say it generates a Dockerfile from the information it finds and then builds that with docker build. The docs add that this may change.

Is Nixpacks deprecated?

Not removed, but in maintenance mode. The README says it isn’t under active development and recommends Railpack.

What replaced Nixpacks?

Railpack. Railway says it now uses Railpack to build and deploy code. CloudPloy still builds non-Dockerfile repos with Nixpacks today.

Can I use both on one project?

You pick one per build. On CloudPloy a Dockerfile in the repo wins, and without one the app builds with Nixpacks.

How do I know which builder CloudPloy will use?

Ask your agent to detect the app. The detection result names the builder, dockerfile or nixpacks, before you deploy.

See how CloudPloy deploys from your agent