Remix.run Logo
embedding-shape 9 hours ago

I've been on a somewhat binge to move a bunch of stuff to self-hosting at home. Yesterday I finally completed my self-hosted Forgejo instance at home, together with Linux, Windows (via VM) and macOS (via Mac Mini) runners/workers for CI/CD, so everything finally lives in-house (literally), instead of all source code + Actions being on GitHub but the infrastructure actually living locally.

This is probably the first time I felt vindicated with my self-hosting move literally the day after I finished the migration, very pleasant feeling. Usually it takes a month or two before I get here.

koyote 4 hours ago | parent | next [-]

And once you start self-hosting, you realise how slow the 'modern' web actually is.

I host forgejo on a single NUC with a bunch of other stuff in Proxmox, the page loads in 6ms! Immich is not quite as fast but still a ton faster than Google photos.

cedws 9 hours ago | parent | prev | next [-]

The idea of a homelab is appealing to me, but then I actually start building one and get tired of it quickly. When I’ve been fixing broken systems at work all day I don’t really want to have to be my own sysadmin too.

I’ve got a nice and powerful Minisforum on my desk that I bought at Christmas not even switched on.

embedding-shape 8 hours ago | parent | next [-]

I've tried for 15 years to have my homelab, but always get lost in the complexity after a year or so, in the past. About 3 years ago I gave NixOS a try instead for managing everything, which suddenly made everything easier (counter-intuitively perhaps) as now I can come back after months and still understand where everything is and how it works after just reading.

Setting up Forgejo + runners declaratively is probably ~100 lines in total, and doesn't matter I forget how it works, just have to spend five minutes reading to catch up after I come back in 6 months to change/fix something.

I think the trick to avoid getting tired of it is trying to just make it as simple as humanly possible. The less stuff you have, the easier it gets, at least that's intuitive :)

Cyph0n 5 hours ago | parent | next [-]

Just to echo what others are saying: NixOS and Proxmox are the answer.

I run both right now, but I am in the process of just running NixOS on everything.

NixOS really is that good, particularly for homelabs. The module system and ability to share them across machines is really a superpower. You end up having a base config that all machines extend essentially. Same idea applies to users and groups.

One of the other big benefits, particularly for homelabs, is that your config is effectively self-documenting. Every quirk you discover is persisted in a source controlled file. Upgrades are self-documenting too: upstream module maintainers are pretty good about guiding you towards the new way to do things via option and module deprecation.

WestCoader 4 hours ago | parent [-]

I mean this in a good way, but I'm slightly chuckling to myself that it reads like people are just discovering IaC...on HN. That's all Nix configs are, at the end of the day.

No matter the tool, manage your environment in code, your life becomes much easier. People start and then get addicted to the ClickOps for the initial hit and then end up in a packed closet with a one way ticket to Narnia.

This happens in large environments too, so not at all just a home lab thing.

Cyph0n 3 hours ago | parent [-]

I and many other NixOS users know what IaC is :)

A NixOS config is a bit different because it’s lower level and is configuring the OS through a first-party interface. It is more like extending the distro itself as opposed to configuring an existing distro after the fact.

The other big difference is that it is purely declarative vs. a simulation of a declarative config a la Ansible and other tools. Again, because the distro is config aware at all levels, starting from early boot.

The last difference is atomicity. You can (in theory) rely on an all or nothing config switch as well as the ability to rollback at any time (even at boot).

On top of all this are the niceties enabled by Nix and nixpkgs. Shared binary caches, run a config on a VM, bake a live ISO or cloud VM image from a config (Packer style), the NixOS test framework, etc.

0cf8612b2e1e 7 hours ago | parent | prev | next [-]

Unless you actually need hardware (local LLM host, massive data transformation jobs), it is also easy to get into the many machines trap. A single old laptop, N97, optiplex, etc sitting in a corner is actually a huge amount of computer power that will rival most cloud offerings. Single machine can do so much.

httpsterio 5 hours ago | parent [-]

Yeah true. I have an old Asus X550L from 2014, a very budget / mid basic home laptop with the battery removed running as my server. I do some dev on it with VSCode remoting into it and Claude Code, run Jellyfin, Audiobookshelf, Teamspeak, IRC and TS bots, nginx, SyncThing and some static websites.

I'm still usually under 10% cpu usage and at 25% ram usage unless I'm streaming and transcoding with Jellyfin.

It's been fun and super useful. Almost any old laptop from the past 15 years could run and solve several home computing needs with little difficulty.

dml2135 8 hours ago | parent | prev | next [-]

Yup this is what I've got up and running recently and it's been awesome.

My setup is roughly the following.

- Dell optiplex mini running Proxmox for compute. Unraid NAS for storage.

- Debian VM on the Proxmox machine running Forgejo and Komodo for container management.

- Monorepo in Forgejo for the homelab infrastructure. This lets me give Claude access to just the monorepo on my local machine to help me build stuff out, without needing to give it direct access to any of my actual servers.

- Claude helps me build out deployment pipeline for VMs/containers in Forgejo actions, which looks like:

  - Forgejo runner creates NixOS builds => Deploy VMs via Proxmox API => Deploy containers via Komodo API
- I've got separate VMs for

  - gateway for reverse-proxy & authentication

  - monitoring with prometheus/loki/grafana stack

  - general use applications
Since storage is external with NFS shares, I can tear down and rebuild the VMs whenever I need to redeploy something.

All of my docker compose files and nix configs live in the monorepo on Forgejo, so I can use Renovate to keep everything up to date.

Plan files, kanban board, and general documentation live adjacent to Nix and Docker configs in the monorepo, so Claude has all the context it needs to get things done.

I did this because I got tired of using Docker templates on Unraid. They were a great way to get started, but it's hard to pin container versions and still keep them up-to-date (Unraid relies heavily on the `latest` tag). Moving stuff over to this setup bit-by-bit and I've been really enjoying it so far.

cedws 8 hours ago | parent | prev | next [-]

Thanks. Yeah, I've probably been overcomplicating it before. I was running Kubernetes on Talos thinking that at least it would be familiar. Such power tools for running simple workloads on a single node is inviting headaches.

skydhash 4 hours ago | parent | prev [-]

Maybe my needs are simpler. But I just made do with systemd services and apt (debian). I've also setup Incus for the occasional software testing and playing around. After using OpenBSD as a daily driver, I'm more keen with creating a native package for the OS/Distro than wrangling docker compose files.

ryandrake 3 hours ago | parent [-]

Yea, it's always weird to see people say "I'm simplifying my life and reducing my cloud dependencies by running a homelab and self-hosting!" and then they list the dozens of alphabet soup software they're running on it that they're now relying/depending on. "Oh I run 20 VMs and containers and Docker orchestration and Nextcloud and Syncthing and Jellyfin and Plex and Forgejo and Komodo and Home Assistant and Immich and Trilium and Audiobookshelf and another Nextcloud and This Stack and That Pipeline" and oh my god haven't you really just made your computing even worse?

My "homelab" is basically Linux + NFS, with standard development tools.

VerTiGo_Etrex 5 hours ago | parent | prev | next [-]

> When I’ve been fixing broken systems at work all day I don’t really want to have to be my own sysadmin too.

There’s only one solution to this.

Quit your job.

kivle 6 hours ago | parent | prev | next [-]

With the help of coding agents it's easier than ever. Just get Claude/Codex to create Helm Charts / Docker Compose files for you. Struggle with some command line juggling to fix some obscure error? An agent can mostly help you in no-time.

prmoustache 5 hours ago | parent | prev [-]

There isn't much work or maintenance to do really. When you are the sole user everything is over sized and if it is only accessible at home you can be lazy with updates and security anyway.

snailmailman 2 hours ago | parent | prev | next [-]

I've been running my own private forgejo instance for a while now. I host all my own private side projects and stuff there. Its a much more pleasant experience than github, if only because it has higher than 90% uptime. The UI is mostly identical otherwise.

The number of consistent issues i've had with anything github-related lately is crazy. Even just browsing their site is difficult sometimes with slow loads that often just hang entirely.

johnmaguire 8 hours ago | parent | prev | next [-]

I recently did this as well and one of the things that has struck me is just how fast Actions are compared to Github!

That said, I've got Linux and macOS setup with a Mac Mini (using a Claude-generated Ansible task file), but configuring a Windows VM seemed a bit painful. You didn't happen to find anything to simplify the deployment process here, did you?

embedding-shape 5 hours ago | parent [-]

> You didn't happen to find anything to simplify the deployment process here, did you?

No, unfortunately not, the Windows VM setup + Forgejo Windows runner was the most painful thing for me to setup, no doubt. It's just such a hassle to reliably set things up, even getting logs out of it was trouble... To be fair, my Mac Mini was manually setup at first, then I have Nix on top of it, while Windows I've 100% automated it, so not entirely fair comparison, automating the Mac Mini setup would be similarly harsh I think. But it's a mix-match of Nix for configuring the VM and booting it, XML files for "autounattend" setup, ps1 bootstrapping scripts and .cmd script for finalizing, a big mess.

dietr1ch 7 hours ago | parent | prev | next [-]

My Raspberries (and OrangePi) have better availability than github, and if were to be down I'd be out of power/internet and wouldn't be able to work much anyway.

lisplist 9 hours ago | parent | prev | next [-]

The only problem I've found with Forgejo is a lack of fine grained permissions and also the lack of an API for pulling action invocations. The actions log api endpoints are present in gitea from what I can tell.

mfenniak 8 hours ago | parent [-]

Forgejo 15 was just released last week with repo-specific access tokens. More to come in the future.

yakattak 9 hours ago | parent | prev | next [-]

I moved my forge to my home, outside of a little stress getting all the containers wrangled it was pretty effortless to setup Forgejo.

I do need a good backup solution though, that’s one thing I’m missing.

TranquilMarmot 12 minutes ago | parent [-]

I use https://github.com/garethgeorge/backrest to manage nightly encrypted backups of my Forgejo instance to a Hetzner Storage Box. <$4/mo for 500GB of storage. It's also where I back up my Immich library to.

Immich automatically dumps its DB every day, for Forgejo I have a little script that runs as part of the Backrest backup that does a pgdumb of the database before doing the backup.

It works great, I even had to do disaster recovery on it once and it went smooth.

neilv 8 hours ago | parent | prev | next [-]

I self-host Forgejo for personal and indie-startup purposes, and like it well enough.

The downside with that is it misses one of the key purposes of GitHub: posturing for job-hunting/hopping. It's another performative checkbox, like memorizing Leetcode and practicing delivery for brogrammer interviews.

If you don't appear active on GitHub specifically (not even Codeberg, GitLab, nor something else), you're going to get dismissed from a lot of job applications, with "do you even lift, bro" style dissing, from people who have very simple conceptions of what software engineers do, and why.

johnmaguire 8 hours ago | parent | next [-]

There is a fairly straightforward feature in Forgejo to sync your repos to Github, if that's what you want to do. It's not perfect, of course, but should help to advertise your projects and keep your activity heatmap green.

I mostly use Forgejo for my private repos, which are free at Github, but with many limitations. One month I burned all my private CI tokens on the 1st due to a hung Mac runner. Love not having to worry about this now!

nextaccountic 6 hours ago | parent [-]

or you can just have two remotes and push to both sites and enjoy git's distributed nature

TranquilMarmot 11 minutes ago | parent [-]

I do this, but beware if you have LFS files. You can easily get into weird states with LFS pushing up to two different remotes and it's really not fun to fix.

8cvor6j844qw_d6 8 hours ago | parent | prev | next [-]

> If you don't appear active on GitHub specifically... you're going to get dismissed from a lot of job applications

Sometimes wonder if my coursemates back in the days, who automated commits to private repos just to keep the green box packed, actually got any mileage out of it.

gill-bates 8 hours ago | parent | prev | next [-]

I get that. To counter it I usually try to have at least one public repo on my Forgejo instance and link to that on my resume/LinkedIn. It helps that I'm angling for security/infra positions so the self-hosting aspect actually helps but even without that I would imagine it signals something. Maybe not ideal for the most mainstream jobs (whatever that even means...), but I suspect some people will be intrigued by the initiative.

Edit: to the "do you even lift bro", the response becomes "yeah man, I've built my own gym - oh, you go to Planet Fitness? Good luck."

bmitc 2 hours ago | parent | prev [-]

Fine with me. Not the type of jobs I want anyway.

rvz 8 hours ago | parent | prev | next [-]

Self hosting was the correct solution.

6 years early [0] and you have better uptime than GitHub.

[0] https://news.ycombinator.com/item?id=22867803

colechristensen 8 hours ago | parent | prev | next [-]

Instability aside I found several things about GitHub awkward, annoying, or missing features so I spent a month building my own. I think we're going to be seeing a lot more of this.

shevy-java 9 hours ago | parent | prev [-]

Interesting. I speculated not long ago that Microsoft is really taking a dive here, and other companies may look to provide better alternatives to GitHub, as one idea. Today I read your comment about self-hosting here; while that is not quite what I compared or had in mind, it is interesting to read about it, of people who go that route. Microsoft is really putting themselves into trouble in the last year or two. Some things no longer work, so much is clear here.