# HOWTO: Install NixOS on an OVH dedicated server

**URL:** https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089
**Category:** Guides
**Created:** [June 3, 2019, 6:47pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089 "2019-06-03T18:47:32Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [June 3, 2019, 6:47pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/1 "2019-06-03T18:47:32Z")

</div>

Hi,

I’ve spent the last couple of days trying to get NixOS on my OVH dedicated server, bootstrapping it from the OVH rescue mode.

Goal: To get a proper `partitions -> RAID -> LUKS -> LVM -> ext4` setup for the data partition, unencrypted `/` for booting through, but and RAID for everything, including the [EFI System Partition](https://en.wikipedia.org/wiki/EFI_system_partition) (ESP). (I also tried legacy boot, but that only gave me a black screen.)

You can find the script I wrote for it, including detail instructions and explanations, here:

> <https://gist.github.com/nh2/78d1c65e33806e7728622dbe748c2b6a>

Thanks to `clever` on IRC who helped me with much of it.

For my own usage, this is only to bootstrap the server to NixOS; afterwards I’ll manage it with `nixops`.

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [June 3, 2019, 6:49pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/2 "2019-06-03T18:49:04Z")

</div>

Perhaps also useful to know: The script takes 3:45 minutes to run on my `STOR-1` type server.

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [July 8, 2019, 11:01pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/3 "2019-07-08T23:01:01Z")

</div>

I’ve now also made one for Hetzner:

> <https://gist.github.com/nh2/ebc27311731f53ee623ae781ca25103f>

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [April 20, 2020, 1:18am UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/4 "2020-04-20T01:18:09Z")

</div>

And one for Leaseweb:

> <https://gist.github.com/nh2/1d2c533085b514dc1a7719f6ff35640b>

---

<div class="post-metadata">

### Author: ![picnoir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/picnoir/32/4186_2.png) [@picnoir](https://discourse.nixos.org/u/picnoir)
#### Post date: [April 20, 2020, 8:43am UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/5 "2020-04-20T08:43:18Z")

</div>

That’s great! Thanks a lot for tackling this. I failed doing that a few  
months ago:

> [@Nixos on OVH kimsufi: cloning builder process: Operation not permitted](https://discourse.nixos.org/t/nixos-on-ovh-kimsufi-cloning-builder-process-operation-not-permitted/1494):
>
> Hey, I’m having an issue while installing nixos on a kimsufi dedicated server. I’m following this guide: [Installing NixOS on a Kimsufi](https://www.codejam.info/2015/12/installing-nixos-on-a-kimsufi.html) I have a problem when chrooting into the install environment. When executing nix/store/hfa8sap493ip9q4wxpnm88m2wcjbl2si-nixos-system-nixos-18.09.1388.03dc6471c12/init, the chroot process ends up with the following error: unpacking the NixOS/Nixpkgs sources... error: cloning builder process: Operation not permitted error: unable to start build process I don’t…

It’s a shame to see this living in a gist though, we probably could  
share the maintenaince burden of those scripts. Creating a git  
repository hosting these provisionning scripts under the nix community  
org would make a lot of sense IMHO.

---

<div class="post-metadata">

### Author: ![lewo](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lewo/32/4913_2.png) [@lewo](https://discourse.nixos.org/u/lewo)
#### Post date: [April 20, 2020, 9:46am UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/6 "2020-04-20T09:46:23Z")

</div>

I also installed NixOS on a Kimsufi server few months ago and here are my notes: [https://lewo.abesis.fr/posts/2019-12-01-install-nixos-on-kimsufi.html](https://lewo.abesis.fr/posts/2019-12-01-install-nixos-on-kimsufi.html)

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [April 20, 2020, 3:36pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/7 "2020-04-20T15:36:36Z")

</div>

> [@picnoir](#):
>
> It’s a shame to see this living in a gist though, we probably could  
> share the maintenaince burden of those scripts. Creating a git  
> repository hosting these provisionning scripts under the nix community  
> org would make a lot of sense IMHO.

I’m up for that. I started with gists because I did it as a one-off for my own usage and just quickly wanted to code dump the thing into the public in case others have the same problems, but by now I’ve done on various servers, investigated some more details, and this could be ready to move under some repo.

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [May 29, 2020, 10:12pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/8 "2020-05-29T22:12:04Z")

</div>

## Version for Hetzner Cloud:

1. Buy server (OS picked initially does not matter).
2. In the Hetzner web UI (see screenshot): Mount the `NixOS 20.03 (amd64/minimal)` reboot the machine by double-toggling the ON button in the top right.
3. Edit and run script: [Implementation of nh2's pubkey into https://github.com/nix-community/nixos-install-scripts/blob/master/hosters/hetzner-cloud/nixos-install-hetzner-cloud.sh (Script to install NixOS from the Hetzner Cloud NixOS bootable ISO image. Wipes the disk!) · GitHub](https://gist.github.com/nh2/c02612e05d1a0f5dc9fd50dda04b3e48).

 ![image](https://discourse.nixos.org/uploads/default/original/2X/f/f925f36734f6d251e27fad6a63745c11ba9fb44e.png)

> <https://gist.github.com/nh2/c02612e05d1a0f5dc9fd50dda04b3e48>

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [October 10, 2020, 10:05pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/9 "2020-10-10T22:05:52Z")

</div>

After running the script on Hetzner Cloud, don’t forget to unmount the ISO and reboot the server again so that it doesn’t boot into the ISO again.

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [October 10, 2020, 11:18pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/10 "2020-10-10T23:18:29Z")

</div>

> [@picnoir](#):
>
> Creating a git  
> repository hosting these provisionning scripts under the nix community  
> org would make a lot of sense IMHO.

I’m up for doing this now.

Pinging @matthewbauer @zimbatm @grahamc @worldofpeace from [Members · People · nix-community · GitHub](https://github.com/orgs/nix-community/people) on whether you could add me to `nix-community` so that I can create a repo for this?

I’m thinking of `nixos-install-scripts` for the name, any opinions?

---

<div class="post-metadata">

### Author: ![worldofpeace](https://discourse.nixos.org/user_avatar/discourse.nixos.org/worldofpeace/32/245_2.png) [@worldofpeace](https://discourse.nixos.org/u/worldofpeace)
#### Post date: [October 10, 2020, 11:48pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/11 "2020-10-10T23:48:59Z")

</div>

`nixos-install-scripts` sounds good. I can import a repo, so if someone creates it just ping me on freenode (worldofpeace), matrix (worldofpeace), or here 👍

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [October 11, 2020, 2:35pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/12 "2020-10-11T14:35:26Z")

</div>

OK, here’s the repo: [GitHub - nix-community/nixos-install-scripts: collection of one-shot scripts to install NixOS on various server hosters and other hardware. [maintainer=@happysalada]](https://github.com/nh2/nixos-install-scripts)

---

<div class="post-metadata">

### Author: ![zimbatm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/zimbatm/32/4_2.png) [@zimbatm](https://discourse.nixos.org/u/zimbatm)
#### Post date: [October 14, 2020, 1:00pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/13 "2020-10-14T13:00:40Z")

</div>

Sounds good! You have been invited.

---

<div class="post-metadata">

### Author: ![nh2](https://discourse.nixos.org/user_avatar/discourse.nixos.org/nh2/32/631_2.png) [@nh2](https://discourse.nixos.org/u/nh2)
#### Post date: [October 16, 2020, 1:29am UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/14 "2020-10-16T01:29:38Z")

</div>

Great thanks, moved it to [GitHub - nix-community/nixos-install-scripts: collection of one-shot scripts to install NixOS on various server hosters and other hardware. [maintainer=@happysalada]](https://github.com/nix-community/nixos-install-scripts).

I also made a `nixos-install-scripts` team, but I don’t have permission to add the repo to it under [Sign in to GitHub · GitHub](https://github.com/orgs/nix-community/teams/nixos-install-scripts/repositories). Could an admin do it for me?

---

<div class="post-metadata">

### Author: ![zimbatm](https://discourse.nixos.org/user_avatar/discourse.nixos.org/zimbatm/32/4_2.png) [@zimbatm](https://discourse.nixos.org/u/zimbatm)
#### Post date: [October 16, 2020, 5:30pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/15 "2020-10-16T17:30:51Z")

</div>

Fixed. The project looks great!

---

<div class="post-metadata">

### Author: ![sfkvso](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/s/f04885/32.png) [@sfkvso](https://discourse.nixos.org/u/sfkvso)
#### Post date: [February 19, 2024, 1:03pm UTC](https://discourse.nixos.org/t/howto-install-nixos-on-an-ovh-dedicated-server/3089/16 "2024-02-19T13:03:50Z")

</div>

Hey everyone. I talked to someone at OVH who told me that we should upvote [this issue](https://github.com/ovh/public-cloud-roadmap/issues/440) maybe to have more chances to get nixos flavoured VPS’s.
