# Green/carbon neutral NixOS hosting

**URL:** https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187
**Category:** Help
**Created:** [October 19, 2018, 4:57pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187 "2018-10-19T16:57:08Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![turion](https://discourse.nixos.org/user_avatar/discourse.nixos.org/turion/32/583_2.png) [@turion](https://discourse.nixos.org/u/turion)
#### Post date: [October 19, 2018, 4:57pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/1 "2018-10-19T16:57:08Z")

</div>

I’m looking for VPS hosters that

- Accept NixOS ISOs or even have a NixOps interface.
- Run 100% on renewable energy.

Additional perks:

- Elastic storage space, or plans for higher storage (\>50 GB) with low other resources
- Within 30€/month
- Europe

I’ve found very little in that regard.

- AWS has elastic everything and claims to have some carbon-neutral regions (e.g. Frankfurt), but as most things AWS this is hard to check for me.
- There is greengeeks, but they are expensive (if you go for a lot of storage).
- There is [Shared Website Hosting — Green Website Hosting | Viridio](http://www.aiso.net/hosting/solar-cloud-vps-hosting-plans), but it’s still surprisingly expensive as compared to, say, Hetzner Cloud.

Does anyone have other recommendations? Or can someone assure that AISO is as cheap as it gets?

---

<div class="post-metadata">

### Author: ![rkoe](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rkoe/32/107_2.png) [@rkoe](https://discourse.nixos.org/u/rkoe)
#### Post date: [October 19, 2018, 5:41pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/2 "2018-10-19T17:41:19Z")

</div>

By the way, Hetzner also uses renewable energy ([Hetzner - Wikipedia](https://en.wikipedia.org/wiki/Hetzner#Energy_usage)) and can run NixOS. I’m running a small VPS with NixOS there.

---

<div class="post-metadata">

### Author: ![turion](https://discourse.nixos.org/user_avatar/discourse.nixos.org/turion/32/583_2.png) [@turion](https://discourse.nixos.org/u/turion)
#### Post date: [October 19, 2018, 5:43pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/3 "2018-10-19T17:43:40Z")

</div>

Update: Greengeeks doesn’t offer custom ISOs.

---

<div class="post-metadata">

### Author: ![turion](https://discourse.nixos.org/user_avatar/discourse.nixos.org/turion/32/583_2.png) [@turion](https://discourse.nixos.org/u/turion)
#### Post date: [October 19, 2018, 5:47pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/4 "2018-10-19T17:47:11Z")

</div>

Wow! I wonder why they don’t make more publicity from that, and how they can still afford to be so cheap in comparison to Greengeeks and others.

---

<div class="post-metadata">

### Author: ![rkoe](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rkoe/32/107_2.png) [@rkoe](https://discourse.nixos.org/u/rkoe)
#### Post date: [October 19, 2018, 6:06pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/5 "2018-10-19T18:06:10Z")

</div>

I think it’s because their primary focus is on hosting, not on energy ;).  
But you can find the information on their website: [Umweltschutz](https://www.hetzner.de/unternehmen/umweltschutz/)

---

<div class="post-metadata">

### Author: ![turion](https://discourse.nixos.org/user_avatar/discourse.nixos.org/turion/32/583_2.png) [@turion](https://discourse.nixos.org/u/turion)
#### Post date: [October 19, 2018, 8:26pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/6 "2018-10-19T20:26:03Z")

</div>

If you speak German, this is looking good: [https://www.manitu.de/](https://www.manitu.de/)  
Good dedicated servers running on renewable energy for surprisingly little money.

---

<div class="post-metadata">

### Author: ![danbst](https://discourse.nixos.org/user_avatar/discourse.nixos.org/danbst/32/83_2.png) [@danbst](https://discourse.nixos.org/u/danbst)
#### Post date: [October 19, 2018, 9:15pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/7 "2018-10-19T21:15:26Z")

</div>

> Accept NixOS ISOs or even have a NixOps interface.

why is that a requirement?

Just use [https://github.com/elitak/nixos-infect](https://github.com/elitak/nixos-infect) on any hosted OS. In my experiments it takes \< 5min to infect machine and reboot into NixOS.

I’ve used this for Hetzner and our local cloud hosting (and people say it works for Digital Ocean and OVH)

---

<div class="post-metadata">

### Author: ![turion](https://discourse.nixos.org/user_avatar/discourse.nixos.org/turion/32/583_2.png) [@turion](https://discourse.nixos.org/u/turion)
#### Post date: [October 19, 2018, 9:17pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/8 "2018-10-19T21:17:30Z")

</div>

I have no experience with nixos-infect. Some people say it doesn’t work well. If it does, then it’s maybe no requirement.

---

<div class="post-metadata">

### Author: ![ckampka](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/c/c6cbf5/32.png) [@ckampka](https://discourse.nixos.org/u/ckampka)
#### Post date: [October 20, 2018, 6:44am UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/9 "2018-10-20T06:44:12Z")

</div>

> Accept NixOS ISOs or even have a NixOps interface

Just FYI, nixops does not connect securely to several non-cloud-native backends like hetzner and physical machines, allowing potential hackers to intercept eg. deployment.keys sent to a machine.

See [StrictHostKeyChecking=no is insecure · Issue #696 · NixOS/nixops · GitHub](https://github.com/NixOS/nixops/issues/696) for details.

---

<div class="post-metadata">

### Author: ![aszlig](https://discourse.nixos.org/user_avatar/discourse.nixos.org/aszlig/32/78_2.png) [@aszlig](https://discourse.nixos.org/u/aszlig)
#### Post date: [October 20, 2018, 4:10pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/10 "2018-10-20T16:10:16Z")

</div>

> [@ckampka](#):
>
> Just FYI, nixops does not connect securely to several non-cloud-native backends like hetzner and physical machines

Note that this has to do with `StrictHostKeyChecking`, which ~~does **not** imply~~ implies (see below) that host keys aren’t checked _at all_ (eg. an attacker MITMing your already deployed host won’t succed). The main problem for the Hetzner target is that we can’t do a lot about it, because the rescue system (which is what is used for initial deployment) already comes with a newly generated host key every time and if you’re being MITMed during initial deployment, you’re already doomed at that point. That said, there is however a race in between the robot and the initial deployment, so if you’re rebooting from the rescue system into the newly deployed system the host key is added initially after the reboot. As mentioned in comments of that issue, this gap could be closed by generating the host key via nixops and sending it to the host during the first deployment.

Doing that however, still doesn’t solve the issue in the first place and we’d need a way to securely verify whether we’re in the _real_ rescue system rather than a MITM host, so I’m going to ask Hetzner whether they could implement something like this (preferrably by getting the host key via [Robot API](https://robot.your-server.de/doc/webservice/en.html)).

Another attack vector is when you export the deployment without `known_hosts` and you get MITMed during the next connection after importing somewhere else.

So in summary: The situation (at least for the Hetzner backend) is not worse than it is even without NixOps (except maybe the export/import point mentioned before). If something like this is a concern to you, you probably shouldn’t use a hoster that regenerates SSH host keys in rescue, except of course if you have a way to verify that it’s indeed the real target system.

Nevertheless, that issue is on my todo list already, but it needs a lot of testing (and for the Hetzner backend a change of their API) so it might take a while 😒

* * *

**Edit:** Actually, I was wrong on `StrictHostKeyChecking`… it really just adds the host key even on mismatch. While you do get big fat warning, this still will connect to the target anyway. OpenSSH 7.5 has the `accept-new` option, which I added in [#1023](https://github.com/NixOS/nixops/pull/1023). With this pull request merged, what I wrote above is the case (even with the goofs, this is not a full fix).

* * *

**Edit 2:** Hetzner _does_ seem to have a way to get the host key of the rescue system: [Robot Webservice](https://robot.your-server.de/doc/webservice/en.html#get-boot-server-ip-rescue-last)

---

<div class="post-metadata">

### Author: ![florianjacob](https://discourse.nixos.org/user_avatar/discourse.nixos.org/florianjacob/32/35_2.png) [@florianjacob](https://discourse.nixos.org/u/florianjacob)
#### Post date: [October 23, 2018, 2:10pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/12 "2018-10-23T14:10:00Z")

</div>

netcup [runs on green energy](https://www.netcup.eu/ueber-netcup/oekostrom.php), is available [in english](https://www.netcup.eu/) and [in german](https://www.netcup.de/), and allows you to upload your own iso file. I regularily build my own isos preloaded with my ssh keys etc.

It’s listed in the NixOS wiki’s [NixOS friendly hosters](https://nixos.wiki/wiki/NixOS_friendly_hosters#Support_NixOS_via_custom_ISO) page, together with more detailed installation instructions.

---

<div class="post-metadata">

### Author: ![turion](https://discourse.nixos.org/user_avatar/discourse.nixos.org/turion/32/583_2.png) [@turion](https://discourse.nixos.org/u/turion)
#### Post date: [October 23, 2018, 2:21pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/13 "2018-10-23T14:21:48Z")

</div>

Thanks, that’s helpful! How do you create an ISO?

---

<div class="post-metadata">

### Author: ![florianjacob](https://discourse.nixos.org/user_avatar/discourse.nixos.org/florianjacob/32/35_2.png) [@florianjacob](https://discourse.nixos.org/u/florianjacob)
#### Post date: [October 23, 2018, 2:38pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/14 "2018-10-23T14:38:38Z")

</div>

You’re welcome: [Creating a NixOS live CD - NixOS Wiki](https://nixos.wiki/wiki/Creating_a_NixOS_live_CD) :nix_parrot:

---

<div class="post-metadata">

### Author: ![Mapybara](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/m/8dc957/32.png) [@Mapybara](https://discourse.nixos.org/u/Mapybara)
#### Post date: [November 14, 2019, 1:11pm UTC](https://discourse.nixos.org/t/green-carbon-neutral-nixos-hosting/1187/16 "2019-11-14T13:11:08Z")

</div>

I use Hetzner too. They give you a choice of hydro power or wind power. And I like their control panel interface and backup options, and they’re very cheap.
