# NixOS image downloads as torrent

**URL:** https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870
**Category:** Infrastructure
**Created:** [November 11, 2024, 12:21pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870 "2024-11-11T12:21:45Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![zimward](https://discourse.nixos.org/user_avatar/discourse.nixos.org/zimward/32/32944_2.png) [@zimward](https://discourse.nixos.org/u/zimward)
#### Post date: [November 11, 2024, 12:21pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/1 "2024-11-11T12:21:45Z")

</div>

Intrigued by a recent post about problems with the Fastly CDN leading to long download times for the ISOs, i started wondering why we don’t have a secondary download option via Torrent like most other distributions have.

This would add a fallback option in case this happens in some regions (and some users, myself included,might prefer using torrent as it doesn’t stress infrastructure one doesn’t pay for) and the hashes prevent tempering concerns (if they are checked by the user after download that is). Although adding a GPG signature file might also be something to consider to prevent some damage if [nixos.org](http://nixos.org) is ever breached.

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [November 11, 2024, 1:45pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/2 "2024-11-11T13:45:38Z")

</div>

I don’t think the arguments work as great as written out.

- Hashes and GPG are basically an orthogonal topic.
- Big ISOs get released roughly every 2 days. So people who download it will be useful seeders for about one day on average, assuming they do keep seeding. ~~-small ISOs are rotated faster, more than one daily normally.~~

I’m not against, to be clear. Someone needs to write the code, and if won’t be expensive, we can then deploy it on the official infra.

---

<div class="post-metadata">

### Author: ![Majiir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/majiir/32/11049_2.png) [@Majiir](https://discourse.nixos.org/u/Majiir)
#### Post date: [November 11, 2024, 2:20pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/3 "2024-11-11T14:20:47Z")

</div>

> [@vcunat](#):
>
> Big ISOs get released roughly every 2 days.

How important is it that we do this? Why not publish an ISO every month or every stable release?

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [November 11, 2024, 2:24pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/4 "2024-11-11T14:24:19Z")

</div>

That’s again an orthogonal issue. IIRC it’s been proposed also on the current ISOs, so that we’d save some place in S3, as we never delete so far and just the ISOs eat gigabytes per day.

---

<div class="post-metadata">

### Author: ![emily](https://discourse.nixos.org/user_avatar/discourse.nixos.org/emily/32/1628_2.png) [@emily](https://discourse.nixos.org/u/emily)
#### Post date: [November 11, 2024, 2:27pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/5 "2024-11-11T14:27:00Z")

</div>

> [@vcunat](#):
>
> -small ISOs are rotated faster, more than one daily normally.

We did [get rid of those](https://github.com/NixOS/nixpkgs/pull/338433), remember 🙂

(But otherwise I agree that the value is likely lower than expected.)

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [November 11, 2024, 2:51pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/6 "2024-11-11T14:51:31Z")

</div>

The biggest setback I see is that ISO only starts you up.

I’m afraid that too many places rely on [cache.nixos.org](http://cache.nixos.org) working reasonably, so that just getting ISO won’t really help that much. You’ll surely need updates sometimes (bothersome to do through ISO), and even for the initial installation, you might want packages that are not present on the ISO.

By the way, the Fastly CDN service is donated to [NixOS.org](http://NixOS.org) free of charge.

---

<div class="post-metadata">

### Author: ![fricklerhandwerk](https://discourse.nixos.org/user_avatar/discourse.nixos.org/fricklerhandwerk/32/2029_2.png) [@fricklerhandwerk](https://discourse.nixos.org/u/fricklerhandwerk)
#### Post date: [November 11, 2024, 3:36pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/7 "2024-11-11T15:36:11Z")

</div>

This may actually be somewhat of a disguised beginner-UX discussion. I’d wager many people coming from traditional Linux will expect an ISO. Jumping right into NixOS is easier with an ISO for that audience, because it doesn’t require installing Nix to build you custom config. But we could argue that’s not the way people _should_ approach the ecosystem and just on principle not provide ISOs but instead tell beginners to start with vanilla Nix and then spiral themselves up via VMs.

And then there’s of course a resource question: What’s cheaper? New people pulling ISOs or new people pulling from the cache after a Nix installation, and then pulling all the dependencies to build their own things to deploy NixOS?

---

<div class="post-metadata">

### Author: ![emily](https://discourse.nixos.org/user_avatar/discourse.nixos.org/emily/32/1628_2.png) [@emily](https://discourse.nixos.org/u/emily)
#### Post date: [November 11, 2024, 3:41pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/8 "2024-11-11T15:41:45Z")

</div>

How do you anticipate people installing NixOS from scratch on fresh non‐cloud systems? Building their own ISOs from an existing Linux system?

(Though even for cloud, the space and bandwidth of the images is comparable to the ISOs.)

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [November 11, 2024, 3:43pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/9 "2024-11-11T15:43:52Z")

</div>

> [@fricklerhandwerk](#):
>
> What’s cheaper?

I believe that avoiding ISO (or using just minimal ISO) would be cheaper. The individual packages “need” to be well cached anyway, as people who just update are getting them either way. And you only download those that you need.

But I wouldn’t think these costs are a significant factor for this topic. The biggest cost part is probably the huge total size of all the historical ISOs, but there it will be most cost-effective to simply delete (most of) old ones, etc.

---

<div class="post-metadata">

### Author: ![Majiir](https://discourse.nixos.org/user_avatar/discourse.nixos.org/majiir/32/11049_2.png) [@Majiir](https://discourse.nixos.org/u/Majiir)
#### Post date: [November 11, 2024, 11:38pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/10 "2024-11-11T23:38:30Z")

</div>

The issue is not necessarily cost, but the download time for a new NixOS user. I’ve experienced long download times for a NixOS ISO piddling along at \<1Mbps on my 1Gbps fiber connection. That’s a common enough experience that we periodically get threads asking - hey, why can’t I do what I’d do for every other distro and use a torrent?

> [@vcunat](#):
>
> That’s again an orthogonal issue.

I’d argue it’s not orthogonal because it seems to be the only good reason we don’t offer a torrent for ISOs.

---

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [November 12, 2024, 12:18am UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/11 "2024-11-12T00:18:33Z")

</div>

I think having the published ISO be up to date is more important than having a torrent. For one, it minimizes the amount that has to be downloaded from [cache.nixos.org](http://cache.nixos.org) when performing the installation, but also updates to the ISO can actually be critically important e.g. for hardware support or security reasons (see: the security [advisories on our calamares repo](https://github.com/NixOS/calamares-nixos-extensions/security/advisories))

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [November 12, 2024, 6:35am UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/12 "2024-11-12T06:35:03Z")

</div>

> [@Majiir](#):
>
> because it seems to be the only good reason we don’t offer a torrent for ISOs.

I believe the main reason is because we don’t have code for it. I just posted why the benefits don’t seem very significant to me.

The CDN is the same, so you’ll probably get \<1Mbps even on updates (which are often like a gigabyte for me).

---

<div class="post-metadata">

### Author: ![Atemu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/atemu/32/10383_2.png) [@Atemu](https://discourse.nixos.org/u/Atemu)
#### Post date: [November 12, 2024, 6:52am UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/13 "2024-11-12T06:52:30Z")

</div>

(Also if you only get \<1Mbps to Fastly, you’ll likely have other issues too.)

---

<div class="post-metadata">

### Author: ![uep](https://discourse.nixos.org/user_avatar/discourse.nixos.org/uep/32/5167_2.png) [@uep](https://discourse.nixos.org/u/uep)
#### Post date: [November 12, 2024, 6:57am UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/14 "2024-11-12T06:57:14Z")

</div>

There is a small difference; whatever caused a single tcp stream from fastly to be so slowly, having started the download using it, the entire download would be in the same stream. That would not be the case for a torrent, effectively masking whatever is the core issue here.

---

<div class="post-metadata">

### Author: ![phanirithvij](https://discourse.nixos.org/user_avatar/discourse.nixos.org/phanirithvij/32/28729_2.png) [@phanirithvij](https://discourse.nixos.org/u/phanirithvij)
#### Post date: [November 14, 2024, 3:29pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/15 "2024-11-14T15:29:07Z")

</div>

> **[GitHub - AnimMouse/NixOS-ISO-Torrents: NixOS ISO Torrents](https://github.com/AnimMouse/NixOS-ISO-Torrents)**
>
> NixOS ISO Torrents. Contribute to AnimMouse/NixOS-ISO-Torrents development by creating an account on GitHub.

> <https://github.com/AnimMouse/NixOS-ISO-Torrents/issues/4>
>
> This is great! The single NixOS ISO download mirror is pretty slow, I got about …2-3MB/s today. If we can get a good number of people seeding these torrents then it stands to improve things for people with fast and slow internet alike.
> 
> Short of writing a multi-stage script to grab the releases atom feed and then grab the downloads for each release and then dump them in my "watched" torrent directory, I don't have a way to automatically grab and seed these. There are probably tools to grab RSS feeds and dump the torrents to a location so maybe providing one of those at a fixed location would be the easiest?

> **[go-torrent-helper](https://tildegit.org/hyperreal/go-torrent-helper)**
>
> Helper program to add and remove torrents from a transmission-daemon instance.

---

<div class="post-metadata">

### Author: ![Atemu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/atemu/32/10383_2.png) [@Atemu](https://discourse.nixos.org/u/Atemu)
#### Post date: [November 14, 2024, 11:03pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/17 "2024-11-14T23:03:18Z")

</div>

> [@sift](#):
>
> unstable ISO with bcachefs, which wasn’t available on the CDN and required a manual download from S3

Niche use-cases of experimental features should not expect first-class support.

> [@sift](#):
>
> using an LTS kernel instead of the latest stable kernel. This seems like an odd default, considering LTS kernels are significantly less popular than the standard kernel among Arch Linux users

We have little regard for what a distro not known for stability does.

Our installer also includes support for ZFS which requires use of an LTS kernel at most times of the year.

> [@sift](#):
>
> even distributions like Ubuntu default to the non-LTS kernel

They used to use some odd version between LTS and the latest to which they then backported security fixes throughout the release cycle (poorly I might add: 2 weeks release cycle, yikes!). I don’t know if they’ll continue doing that now that the upstream kernel marks all bug fixes as CVEs.

Anyhow, I don’t think we will be wasting resources backporting security and other bug fixes to some kernel when Greg does that for us already.

> [@sift](#):
>
> NixOS doesn’t appear to strongly encourage ISO SHA256 verification, which is a concerning security practice.

Putting a hash next to a download on an HTTPS website offers _no security benefit whatsoever_.

---

<div class="post-metadata">

### Author: ![emily](https://discourse.nixos.org/user_avatar/discourse.nixos.org/emily/32/1628_2.png) [@emily](https://discourse.nixos.org/u/emily)
#### Post date: [November 14, 2024, 11:06pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/18 "2024-11-14T23:06:48Z")

</div>

FWIW there has been talk of switching to the latest stable kernels by default, or at least prioritizing latest‐kernel ISOs and having installers default to the same kernel variety that was installed from. Though yes, users of ZFS would need to use the LTS kernels, and it’s a little awkward with the stable release cycle.

---

<div class="post-metadata">

### Author: ![ElvishJerricco](https://discourse.nixos.org/user_avatar/discourse.nixos.org/elvishjerricco/32/984_2.png) [@ElvishJerricco](https://discourse.nixos.org/u/ElvishJerricco)
#### Post date: [November 14, 2024, 11:14pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/19 "2024-11-14T23:14:56Z")

</div>

> [@emily](#):
>
> and it’s a little awkward with the stable release cycle.

Just to make this point clear (and emily, we’ve discussed this with others on matrix before, so this is more a reply for the thread than for you), the issue is that any non-LTS kernel is likely to go EOL before a NixOS stable release does. If stable releases with a non-LTS kernel by default, then it will have to change kernel versions before that stable release goes EOL itself.

In my opinion, this is a dealbreaker. The whole point of NixOS stable releases is that packages only receive bug fix and security updates, not major version changes. Breaking this purpose for the kernel is, IMO, unacceptable.

That said, distributing ISOs with newer kernels in addition to LTS kernels is reasonable to me, and the installer probably ought to autodetect which one you’ve used and generate the `configuration.nix` with `kernelPackages` set accordingly.

---

<div class="post-metadata">

### Author: ![emily](https://discourse.nixos.org/user_avatar/discourse.nixos.org/emily/32/1628_2.png) [@emily](https://discourse.nixos.org/u/emily)
#### Post date: [November 14, 2024, 11:23pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/20 "2024-11-14T23:23:13Z")

</div>

I think it would be reasonable for the default unstable installer to use the latest stable kernel, and the default stable installer to use the LTS. People who use unstable but not ZFS are probably better‐off with the latest kernels.

I also don’t think that upgrading the stable kernel in a release cycle would be _that_ bad – they backport most of the bugs anyway – but I can understand why others would not consider it so. (This is a very weak take, I don’t expect us to actually do this and it is likely that you could convince me that it would be a non‐starter in a few minutes of conversation.)

Also, as mentioned on Matrix I think ideally it would be two kernels in the same ISO, selectable from the boot menu, and we just flip the default depending on the release branch, say.

---

<div class="post-metadata">

### Author: ![Atemu](https://discourse.nixos.org/user_avatar/discourse.nixos.org/atemu/32/10383_2.png) [@Atemu](https://discourse.nixos.org/u/Atemu)
#### Post date: [November 14, 2024, 11:26pm UTC](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870/21 "2024-11-14T23:26:44Z")

</div>

Two kernels in the same ISO sounds like an excellent idea. We should tell the user which one they’d want though. E.g. “LTS kernel (ZFS support)” and “Latest kernel (better support for new hardware)”.

[Next page](https://discourse.nixos.org/t/nixos-image-downloads-as-torrent/55870.md?page=2)
