DEV.co
Open-Source DevOps · DBCDK

morph

Morph is a Go-based NixOS deployment tool that orchestrates multi-host configuration updates via Nix expressions. It wraps low-level tools (nix-build, nix-copy, scp, ssh) to enable safe, health-check-driven deployments across fleets.

Source: GitHub — github.com/DBCDK/morph
1k
GitHub stars
66
Forks
Go
Primary language
MIT
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
RepositoryDBCDK/morph
OwnerDBCDK
Primary languageGo
LicenseMIT — OSI-approved
Stars1k
Forks66
Open issues56
Latest releasev1.8.0 (2024-10-23)
Last updated2025-11-24
Sourcehttps://github.com/DBCDK/morph

What morph is

Morph evaluates declarative host configurations written in Nix, builds them locally, transfers artifacts via nix-copy/scp, and activates them remotely using nixos-rebuild semantics. It provides stateless orchestration with host filtering, health checks (HTTP/command-based), secret management, and pre-deploy validation.

Quickstart

Get the morph source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/DBCDK/morph.gitcd morph# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Multi-host NixOS fleet management

Deploy configuration changes consistently across dozens or hundreds of NixOS machines with single-command orchestration, tag-based host selection, and deterministic ordering.

Safe progressive rollouts

Use health checks and pre-deploy checks to validate each host before advancing to the next, with support for dry-activate/test/switch/boot semantics matching nixos-rebuild.

Infrastructure-as-code CI/CD pipelines

Integrate Nix-based configuration into version-controlled deployment workflows; morph's scriptable output and stateless design fit naturally into GitOps and declarative infrastructure patterns.

Implementation considerations

  • Nix v2+ and SSH/scp must be on $PATH of the deployment host; verify toolchain availability before adoption.
  • Health checks are long-polling by default (configurable period); design check logic to avoid false positives and excessive timeout tuples in large fleets.
  • Host ordering is deterministic but cannot be manually reordered; rely on tagging and --order-by-tags for deployment sequencing logic.
  • Secrets are uploaded separately via scp (not in nix store); ensure SSH key material and scp paths are secured; Morph creates parent directories with mode 755 if mkDirs is enabled.
  • Pre-deploy checks are experimental and subject to change; avoid deep production dependencies on this feature until stabilized.

When to avoid it — and what to weigh

  • Non-NixOS target systems — Morph is purpose-built for NixOS hosts. While the README states it 'should work on any modern Linux distribution,' only NixOS is tested; other distributions are unsupported and untested.
  • No pre-built binaries or package repositories — Distribution via Nix overlay only; requires building from source or managing Nix-based supply chain. Organizations without Nix expertise or those requiring audited pre-built releases may face friction.
  • Complex cross-datacenter orchestration — Morph is a wrapper around SSH/scp; it lacks native support for DNS failover, service discovery, or orchestration across regions. Better suited to co-located or homogeneous environments.
  • Stateful application deployments — Morph is stateless by design and focused on OS/service configuration. Applications requiring persistent state management, database migrations, or volume orchestration need complementary tooling.

License & commercial use

MIT License (OSI-permissive). Allows commercial use, modification, and distribution with attribution and no warranty.

MIT is a permissive OSI-approved license. Commercial use is permitted; no additional license review is required for the license itself. However, verify that all Nix dependencies and transitive closures comply with your commercial policies.

DEV.co evaluation signals

Editorial assessment — not user reviews. Directional, with an explicit confidence level.

SignalAssessment
MaintenanceActive
DocumentationAdequate
License clarityClear
Deployment complexityModerate
DEV.co fitGood
Assessment confidenceHigh
Security considerations

SSH-based transport; security posture depends on SSH key management, host key verification (can be disabled via SSH_SKIP_HOST_KEY_CHECK—use cautiously), and network isolation. Secrets uploaded via scp, not embedded in nix store (good practice). No built-in encryption, audit logging, or RBAC; rely on OS-level access controls and SSH audit logs. Pre-deploy checks run arbitrary commands; validate check expressions to prevent injection.

Alternatives to consider

NixOps (nixops)

Official Nix-based orchestration tool with cloud provider plugins (AWS, GCP, Azure). More mature but stateful and higher complexity; good if you need cloud provider abstractions.

Colmena

Rust-based NixOS deployment tool with flake support and parallel evaluation. Newer, actively maintained, similar scope but different design. Consider if you prefer flakes and Rust ecosystem.

Ansible + Nix

General-purpose configuration management with NixOS modules. More flexible for mixed environments and legacy systems; steeper learning curve but broader ecosystem.

Software development agency

Build on morph with DEV.co software developers

Morph enables safe, multi-host NixOS updates with health checks and declarative configuration. Start with the examples directory or review the source on GitHub.

Talk to DEV.co

Related open-source tools

Surfaced by semantic similarity across the DEV.co open-source index.

Related on DEV.co

Explore the category and the services that help you build with it.

morph FAQ

Do I need to run Morph on a NixOS host?
No. Morph runs on any Linux distribution with nix, ssh, and scp available. Only target hosts must be NixOS (as of v1.8.0).
Can Morph deploy to Windows or macOS?
Not as target hosts. Windows and macOS do not support nixos-rebuild. Morph can run on macOS/Linux to deploy NixOS targets.
How does Morph handle rollback?
Morph itself does not manage rollback; rely on nixos-rebuild boot or manual system.activationScripts. Pre-deploy checks and health checks help catch failures before activation.
Is there RBAC or multi-tenancy support?
No. Morph is single-user; use OS-level SSH key controls, sudo, and network isolation to restrict access per deployment.

Software development & web development with DEV.co

DEV.co is a software development agency delivering custom software development services to companies building on open source. Our software developers and web developers design, integrate, and ship production systems — spanning web development, APIs, AI, data, and cloud. If morph is part of your open-source devops roadmap, our team can implement, customize, migrate, and maintain it.

Ready to scale NixOS deployments?

Morph enables safe, multi-host NixOS updates with health checks and declarative configuration. Start with the examples directory or review the source on GitHub.