Top
Best
New

Posted by todsacerdoti 1 day ago

Using FreeBSD to make self-hosting fun again(jsteuernagel.de)
387 points | 160 commentspage 2
tiltowait 1 day ago|
Just two weeks ago, I spun up a FreeBSD server on OVH and migrated a service to it from Railway. Playing with jails, pf, ZFS, and some other goodies has been a lot of fun. Since I (massively) over-provisioned, I also spun up Gitea, Woodpecker CI (and agent; blazing fast CICD is so nice), and a personal blog. Been a great learning project.

[] It's not my first time with FreeBSD. I first ran it in ~2004. But it's been over 10 years since I last ran it, and I'd forgotten a decent bit. The last time I ran it, I just set up a couple of jails for NAS and Plex and proceeded to not touch it until I moved.

dorian-graph 1 day ago|
How's the UX for jails these days? I remember trying to use it barebones and also some of the wrappers.
tiltowait 1 day ago|||
Bastille is very nice to use. You can spin up a jail with a simple `doas bastille create myjail 10.0.0.1` or whatever. Bastillefiles stand in as Dockerfile analogs, if you want to go that route (you have to create the jail, then apply the template, rather than doing it in a single command).

One nice thing is cloning a jail (which can be done live if using ZFS) to spin up a dev/test environment on a different IP. Or setting up a jail to try some different configurations and not having to worry about resetting things on your main host.

I've set up a storage jail with no network access, then a couple of service jails that dip into it at various mount points/permissions. It's total overkill for what I'm doing, but the point is to learn, tinker, and have fun.

dorian-graph 22 hours ago||
Appreciated, thank you!
dddddaviddddd 1 day ago|||
I've started using Bastille recently, it allows using Dockerfile-like 'templates' to provision jails. I like this because I can destroy and recreate the jails easily, particularly to move to a new release (without having to do in-place upgrades synced to the host version, which is how I used to do it).
itchingsphynx 1 day ago||
I know the feeling, having recently migrated a solid TrueNAS 13.3 to a hand-built FreeBSD 13.5. The main reason was to get OpenZFS 2.3 RAIDZ expansion as storage was getting tight. It turns out to be quite similar using Webmin for GUI and BastilleBSD for jails.

There were a few hiccups, such as learning about bootloader versions, but after a few Saturdays tinkering it has been running solid and I’m very pleased.

AndrewDavis 1 day ago||
That's similar to me, I started using FreeNAS back in the 9.x days.

At the time the FreeNAS documentation recommend installing to a usb drive. This proved unreliable, but dedicating a drive to it was silly given it couldn't be used for anything else. I had all the things I needed but I wanted to peel back the layers and this seemed like a good excuse

So I threw in a drive and installed freebsd 10 and spent a few days familiarising myself with everything, learned how to configure samba myself, learned how to setup jails with iocage (the old shell version), and finally imported my pool.

Years later very little has changed.

lproven 17 hours ago||
Have you looked at zVault at all?

https://zvault.io/

sehugg 1 day ago||
I used FreeBSD as my daily desktop for a while in the 2000s. IIRC, the package manager had to compile each package from source, but that wasn't a huge deal. Things just worked in a non-overly-clever fashion.
elcritch 1 day ago|
They added binary packages.
Gud 21 hours ago||
Binary packages were there in the 2000s also.
aborsy 1 day ago||
How is the situation with applications in BSD?

I never see an app released for FreeBSD. There are usually Deb and rpm files.

I suppose FreeBSD adapts and releases some them in their ports. But how is the coverage?

Another issue is the hardware support. Does it have drivers for things like recent WiFi chips?

bluGill 18 hours ago||
The deb and rpm files are not from the application either. Someone outside the application took the application and built the deb/rpm for the distro. FreeBSD just calls their packages "ports", but the concept is otherwise the same, just download the package. FreeBSD is better that most distros as is works to rebuild some middle library yourself with non-default options and then have a leaf application binary depend on it (assuming of course that they are compatible, if your non-default option breaks the application it won't work)
0mp 1 day ago|||
According to repology.org, FreeBSD is the 4th largest package repository in the open-source world.
righthand 1 day ago||
Which type of applications? What I have found to be finicky is the desktop environments, however BSDs are pretty much tuned for web servers/applications. Bastille is designed for deploying web applications in jails securely and built on top of FreeBSD which is a pretty good default OS that gets out of your way already.

Normally you don't release an app for BSD specifically unless you want to offer a port. In which case software is usually built and if you need containerization you can put it in a jail.

It seems you would do well to install a FreeBSD vm/usb and give it a run. Their documentation is pretty good and their forums are helpful.

aborsy 1 day ago||
Desktop apps: PDF viewer, office applications, playing video and audio, IDEs or editors at least, …

If they support flatpaks, it might be good enough.

Gud 22 hours ago|||
https://www.freshports.org/
righthand 19 hours ago|||
They have all of that. Flatpack is not a thing in Unix and you wouldn’t want it. If you want the terribleness of Flatpack stay on Linux. This post is about self-hosting not Desktop software.
aborsy 17 hours ago||
Flatpaks, from the source if available, are excellent: you get the latest versions of the app from the official source, with permissions set for a pretty locked-down sandbox.

What’s not to like, I’m curious?

The storage is cheap these days, if you consider downloads are large. Core apps are robust.

SuperSandro2000 19 hours ago||
NIXOS! NIXOS!! NIXOS!!!
darshanime 23 hours ago||
Having never used anything beyond Linux, Windows and Mac, what would be a good starting point? Can I expect gnu/coreutils to work as is (ls, cd, pwd, et al.). Can I expect to not get bitten by arbitrary issues? What if one of the emacs packages that I am accustomed to using doesn't work there due to a dependency on something that is Linux only? How likely/possible is that?
f1shy 22 hours ago||
All the utilities are not GNU, but BSD, so there are differences. But typically not a problem, as long as you move inside POSIX. Most GNU utilities (all?) can be installed if you prefer them. For example, make is typically gmake, and you really need it. I haven't used BSD for the last 10 years but used it from 1999 to 2015. I had never major issues.
lproven 17 hours ago|||
> Having never used anything beyond Linux, Windows and Mac, what would be a good starting point?

GhostBSD.

https://ghostbsd.org/

assimpleaspossi 22 hours ago||
Without looking or knowing all your requirements, it's likely everything you need works the same. (I don't know anything about gnu/coreutils.)
drnick1 1 day ago||
Is *BSD routing performance still lagging behind Linux? On Debian 12, I can saturate my 25Gbps link between PCs (the router has a 9600X), and can push north of 4Gbps through Wireguard.
Melatonic 13 hours ago|
I was under the impression this was one of the main use of *BSD (lot of networking hardware is based on it). Where did you see it was lagging behind ?
drnick1 13 hours ago||
I haven't personally tested, but have seen reports that BSD-based opnSense struggles to push 2.5G on modern low-end hardware (mini-PCs). I find that surprising considering I can fully saturate my 25G link on a Ryzen 5 running Linux. The Ryzen is considerably faster than an N100, but not 10x faster.
fennec-posix 1 day ago||
I find myself using BSDs at home too, I got a bunch of very old systems that only NetBSD supports these days. Very old SPARC, HP 9000s and the likes. Everything else is Linux, but maybe I'll try one of the BSDs on something more modern...
ireflect 1 day ago||
> it deviates a bit from what might be the most common setup, but it's undoubtedly me

This is delightful. Personal projects are a great place to buck the technical monoculture and try something unique. I really enjoyed reading this.

sohrob 1 day ago|
I run OPNsense (based on FreeBSD) for my home router/firewall and it's amazing what it can do compared to the typical home router.
More comments...