Ask HN: What's on your home server?
519 pointsIt's been years (over a decade?) since I've had a server at home but I'm setting one up for media and I got to thinking: what else should I do with this box? So I was wondering what cool/nerdy/weird stuff you all are using home servers for. DNS and file sharing seem like obvious applications I could set up. I already run email and web on a VPS so that's taken care of. What are you doing with your home server?
Comments (456) 205 threads
Show all comments
Showing thread 3 of 205
Mirrors of various package repositories I use.
I'm currently mirroring npm, crates, Arch packages, clojars, maven and some other things, then all my machines (desktop, servers and laptops) point to the mirror rather than directly to upstream. Some of them are mirroring dynamically (basically a cache at that point, do this for npm for example) while others I fetch the entire repository and keep on disk, cleaning out old packages when needed (I do this for Arch packages for example).
Best benefit is that downloading stuff and updating my machines takes seconds now, even if there is multi-GB updates to do, and a secondary effect is that I'm not impacted by any downtime from npm et al. Saved my bacon more than once.
Also curious if anyone has taken this a step further and MITM Squid proxied their whole home to cache all responses >100mb or something like that.
Npm registry is using verdaccio, arch packages is using https://gitlab.archlinux.org/archlinux/infrastructure/-/blob... + what is outlined at https://wiki.archlinux.org/title/DeveloperWiki:NewMirrors, clojars is just reading the list of packages and downloading them one by one each day.
Not a unified or nicely done setup by any means, just thrown together to solve the problem at hand.
[0] https://archiva.apache.org/
I would like to point all my systems at my server. And if I `pip install pandas` and its not on my server the server grabs it and passes it through and syncs that package locally from then on. Same with yum, npm, docker, or whatever.
And I just realized I could use Artifactory as a caching proxy and at least save some time there. However, that doesn't mirror the package it just caches that specific version. I would be very interested in something where the system sees that I use `pandas` now and will mirror it. Or give it a requirements.txt and it flags all those packages and dependencies for mirroring.
But for npm, there is Verdaccio which does exactly what you want, and is what I'm using.
https://devpi.net/docs/devpi/devpi/stable/%2Bd/index.html https://blog.jcharistech.com/2022/08/13/how-to-run-a-pypi-mi...
another option is https://pypi.org/project/python-pypi-mirror/
Essentially want something like DevPi but add the package to the bandersnatch allow list and mirror it from then on. With some extra large packages in the deny list.
Probably possible to wire that all up reasonably well, but probably just using a caching proxy is 90%+ of the improvement anyways. So may just stick with that.
> Some of them are mirroring dynamically (basically a cache at that point, do this for npm for example)
But as another commentator said, I'm only caching packages that already been fetched now, as I have no need for everything in the registry (most of it is junk to be honest).