랭킹으로 돌아가기

nix-community/nixos-anywhere

Shellnix-community.github.io/nixos-anywhere/

Install NixOS everywhere via SSH [maintainers=@Mic92 @Lassulus @phaer @Enzime @a-kenji]

deploymentnixnixosbuild-with-buildbot
스타 성장
스타
3.3k
포크
209
주간 성장
이슈
79
1k2k3k
2022년 11월2024년 1월2025년 4월2026년 7월
README

nixos-anywhere

Install NixOS everywhere via ssh

Documentation Index

README

Setting up a new machine is time-consuming, and becomes complicated when it needs to be done remotely. If you're installing NixOS, the nixos-anywhere tool allows you to pre-configure the whole process including:

  • Disk partitioning and formatting
  • Configuring and installing NixOS
  • Installing additional files and software

You can then initiate an unattended installation with a single CLI command. Since nixos-anywhere can access the new machine using SSH, it's ideal for remote installations.

Once you have initiated the command, there is no need to 'babysit' the installation. It all happens automatically.

You can use the stored configuration to repeat the same installation if you need to.

Overview

If you have machines on a mix of platforms, you'll need a common installation solution that works anywhere. nixos-anywhere is ideal in this situation.

nixos-anywhere can be used equally well for cloud servers, bare metal servers such as Hetzner, and local servers accessible via a LAN. You can create standard configurations, and use the same configuration to create identical servers anywhere.

You first create Nix configurations to specify partitioning, formatting and NixOS configurations. Further options can be controlled by a flake and by run-time switches.

Once the configuration has been created, a single command will:

  • Connect to the remote server via SSH
  • Detect whether a NixOS installer is present; if not, it will use the Linux kexec tool to boot into a Nixos installer.
  • Use the disko tool to partition and format the hard drive
  • Install NixOS
  • Optionally install any Nix packages and other software required.
  • Optionally copy additional files to the new machine

It's also possible to use nixos-anywhere to simplify the installation on a machine that has no current operating system, first booting from a NixOS installer image. This feature is described in the how-to guide. It's useful because you can pre-configure your required software and preferences, and build the new machine with a single command.

Important Note: Never use a production server as the target. It will be completely overwritten and all data lost. This tool should only be used for commissioning a new computer or repurposing an old machine once all important data has been migrated.

Prerequisites

  • Source Machine:

    • Can be any machine with Nix installed, e.g. a NixOS machine.
  • Target Machine:

    • Unless you're using the option to boot from a NixOS installer image, or providing your own kexec image, it must be running x86-64 Linux with kexec support. Most x86_64 Linux systems do have kexec support. By providing your own image you can also perform kexec for other architectures eg aarch64
    • The machine must be reachable over the public internet or local network. Nixos-anywhere does not support wifi networks. If a VPN is needed, define a custom installer via the --kexec flag which connects to your VPN.
    • When kexec is used the target must have at least 1 GB of RAM, excluding swap.

How to use nixos-anywhere

The Quickstart Guide gives more information on how to run nixos-anywhere in its simplest form. For more specific instructions to suit individual requirements, see the How To Guide.

nixos-anywhere makes use of the disko tool to handle the partitioning and formatting of the disks.

Contact

For questions, come join us in the nixos-anywhere matrix room.

Licensing and Contribution details

This software is provided free under the MIT License.


This project is supported by Numtide. Untitledpng

We are a team of independent freelancers that love open source.  We help our customers make their project lifecycles more efficient by:

  • Providing and supporting useful tools such as this one
  • Building and deploying infrastructure, and offering dedicated DevOps support
  • Building their in-house Nix skills, and integrating Nix with their workflows
  • Developing additional features and tools
  • Carrying out custom research and development.

Contact us if you have a project in mind, or if you need help with any of our supported tools, including this one. We'd love to hear from you.

관련 저장소
coollabsio/coolify

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 280+ one-click services on your own servers.

PHPPackagistApache License 2.0nodejsmysql
coolify.io
59.2k5.1k
ray-project/ray

Ray is an AI compute engine. Ray consists of a core distributed runtime and a set of AI Libraries for accelerating ML workloads.

PythonPyPIApache License 2.0raydistributed
ray.io
43.3k7.8k
fastlane/fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps

RubyRubyGemsMIT Licensefastlaneautomation
fastlane.tools
41.9k6k
Dokploy/dokploy

Open Source Alternative to Vercel, Netlify and Heroku.

TypeScriptnpmOtherdeploymentself-hosted
dokploy.com
36k2.8k
NirDiamant/agents-towards-production

End-to-end, code-first tutorials for building production-grade GenAI agents. From prototype to enterprise deployment.

Jupyter NotebookOtheragentagent-framework
diamant-ai.com
21.1k2.8k
caprover/caprover

Scalable PaaS (automated Docker+nginx) - aka Heroku on Steroids

TypeScriptnpmOtherwebserverdocker
caprover.com
15.1k984
DataTalksClub/machine-learning-zoomcamp

Learn ML engineering for free in 4 months! Register here 👇🏼

Jupyter Notebookcoursedeployment
airtable.com/shryxwLd0COOEaqXo
13.7k3.1k
capistrano/capistrano

A deployment automation tool built on Ruby, Rake, and SSH.

RubyRubyGemsMIT Licensedeploymentssh
capistranorb.com
13k1.7k
deployphp/deployer

The PHP deployment tool with support for popular frameworks out of the box

PHPPackagistMIT Licensephpdeployment
deployer.org
11.1k1.5k
xorbitsai/inference

Swap GPT for any LLM by changing a single line of code. Xinference lets you run open-source, speech, and multimodal models on cloud, on-prem, or your laptop — all through one unified, production-ready inference API.

PythonPyPIApache License 2.0ggmlpytorch
inference.readthedocs.io
9.4k847
AppImage/AppImageKit

Package desktop applications as AppImages that run on common Linux-based operating systems, such as RHEL, CentOS, openSUSE, SLED, Ubuntu, Fedora, debian and derivatives. Join #AppImage on irc.libera.chat

COtherappimageapplications
appimage.org
9.4k588
apex/up

Deploy infinitely scalable serverless apps, apis, and sites in seconds to AWS.

GoGo ModulesMIT Licensedeploymentaws
up.docs.apex.sh
8.8k385