News for hackers. Stuff that matters.
Re:A guide for getting started with Self Hosting by superkuh on Monday October 24, 2022 @11:03AM (#33317625)
Containers and deployment and all that jazz. This is the exact kind of cargo cult nonsense that drives people away from self hosting due to the apparent complexity. NONE of that is needed to self host a website.

Just install nginx from your repos and <html><head><title>My first website</title></head><body><H1>Wow! Hi.</H1></body></html> into a index.html and put in in your www directory. Done. And done in a far more secure, far longer lasting, far less fragile way than anything involving containers or "deployment".

Re:A guide for getting started with Self Hosting by dotnet00 on Monday October 24, 2022 @11:42AM (#33318163)
Unfortunately a lot of self-hosted services seem to be heading in the absurd direction of being entirely docker based, often not even having a means of installing the thing normally. It's extremely annoying.
Re:A guide for getting started with Self Hosting by Beltalowda on Monday October 24, 2022 @12:00PM (#33318434)
I think the problem is essentially one of scaling. When folks talk about scaling they usually talk about "being able to do more"; but this often comes at the expense of more simple use cases. Most business software I worked at would be horrible to self-host: maybe 3 or 4 services, if not more, requires PostgreSQL, ElasticSearch, Redis, maybe some queue system, etc. In short: "scaling up" often comes at the expensive of "scaling down".

The current model for a lot of self-hosted software is "make money with a SaaS offering", which is a fine model IMO, but now you have to cater to two different scales: the small "downscale" of the self-hosted user, and the larger "upscale" one of your SaaS offering.

I actually work on one of those "open source with SaaS offering" things, and it's a real challenge to unify these two use cases because the involved tools are quite different, and I don't want to implement everything twice.

Docker can offer a solution to abstract the complexities that are required, although I agree it's not a good solution to 100% rely on it (which is why I don't do it).

Re:A guide for getting started with Self Hosting by dotnet00 on Monday October 24, 2022 @12:39PM (#33318979)
Yes, I understand that there are tradeoffs there, especially for a lot of federated services, which even without SaaS have to be able to scale well.

My complaints mainly stem from how docker is often kind of finnicky, eg in a previous setup of my server, I had to put everything through a VPN, but Docker didn't play well with a VPN running on the main system, so I had to limit myself to things I could install without Docker until I had to migrate to a new install.

Another issue I ran into with migrating servers was restoring a Postgres db dump to docker, which similarly didn't have much documentation, so for that I had to resort to a traditional setup. Which made me pretty happy that they at least support traditional setups, even if they lean more towards Docker.

Re:A guide for getting started with Self Hosting by superkuh on Monday October 24, 2022 @01:38PM (#33319780)
I know this is HN, but we're talking about self-hosting. We aren't talking about bringing work home to show we can do it to potential employers so we can get hired somewhere using those tools makes sense. Scaling is simply not a problem at all in this context.
Re:A guide for getting started with Self Hosting by monkmartinez on Monday October 24, 2022 @12:48PM (#33319100)
If I want to run a bunch services like apprise, n8n, strapi, jupyter notebooks, nocodb, appflowy and more... why wouldn't I run these in containers? Using Docker and the tooling around it makes it super easy. I don't spend weeks configuring every tiny detail just to get the darn things installed.

What you find annoying is empowering tons of people like me to run lot of software. I can try lots of software I wouldn't have bothered with due to ease of setup. I don't bork my host machine when I make mistakes. I just start delete the container and start over, with a few adjusted settings before build or compose steps.

1337 hackers can run circles around me for sure, but I have a freaking datacenter in 3 computers at my house. All of them are internet facing with Cloudflare tunnels pointed at the services I want to share or use away from home. It has never been this good.

Re:A guide for getting started with Self Hosting by horsawlarway on Monday October 24, 2022 @02:03PM (#33320141)
I agree with this take 100 fucking percent.

I want to be able to consume and run code provided by other people on hardware/networks that I own.

In which case - Docker/Containers/K8s(or my preference, MicroK8s) are a fucking godsend compared to 10 years ago.

I host about 25 services, I have all the config in a single repo, and can rebuild the whole fucking thing in about 10 minutes.

Adding a new machine to take load is as easy as installing ubuntu server, adding microK8s, and running a SINGLE freaking line on the cli. Boom - done. I do this basically each time we get a new machine... the old one goes to live in the server farm.

All the backups? Easy, since the storage is my NAS, mounted in microK8s, and I can just run scheduled backups there for literally every new service, without any additional config as I add them.

It's incredible. I have done the whole "SSH into each machine and tediously configure it to run a specific application, configure my router, make sure the config files are in the right place, configure backups, worry about HDD lifespan, etc" bullshit for long enough to know that I don't EVER want to go back to that.

The people that keep talking shit about containers are still incredibly focused on the use-case of "I host my own blog" like that's all that self-hosting is. But it's not - I self host open source applications as a complete replacement for shitty, ad-driven, recurring subscription fee based SaaS companies.

Meal planning (mealie),

Calorie tracking (calorietracker),

Video streaming (jellyfin),

Google Docs/Notion/etc (bookstack/nextcloud),

Authentication (keycloak),

File sharing/storage (seafile),

Digital Library (calibre),

Home automation (openhab),

Asset tracking (snipeit),

todo lists (Taiga),

scheduling (cal)

etc...

Containers aren't there to help you host your blog. They're there to let me host your application. Configured quickly and simply.

If there's company making money through a recurring subscription based website... There is someone who has made a decent clone that I can self-host.

And these tools make that process much easier than it used to be.

Re:A guide for getting started with Self Hosting by 35mm on Monday October 24, 2022 @03:42PM (#33321516)
How do you manage the databases?
Re:A guide for getting started with Self Hosting by horsawlarway on Tuesday October 25, 2022 @10:21AM (#33330808)
Container images that have access to an NFS mount from my NAS.

You need to be careful with your mount options here, since soft mounts can cause corruption in some cases and performance is not fantastic (although nfs v4.1 is better than nfs v3) - but overall it works and keeps backups strategies simple since everything is on the NAS.

Sadly - it's fairly slow (sqlite in particular is painfully slow when under lots of load and needs care to ensure only one machine is writing to it at a time) but right now I'm avoiding more complex setups since it's not normally a problem with just me+family using things.

Long term - I've been considering moving to iSCSI, or something more robust, but it just hasn't been worth the trouble yet.

Did make me like sqlite a whole lot less though - I opt for mariaDB/Postgres on any service that supports a remote db - they seems to do just fine. 3 years in on this setup and no corruption outside of sqlite on a soft mount (which was solved by reverting to my last backups).

Re:A guide for getting started with Self Hosting by superkuh on Friday October 28, 2022 @10:56AM (#33372138)
Meal planning? Text file. Calorie tracking? Text file. Video streaming? Share video file with static webserver. Google Docs? Share documents with static webserver. Authentication? I don't understand what this is or why it is needed. File sharing/storage? Share with a static webserver. Digital library? Files and folders, if you want to share, share with static webserver. Home automation? I don't know what this is. Todo lists? Text file. Scheduling? Text file.

You'd be surprised what you can do with simple files and a single static webserver.

Re:A guide for getting started with Self Hosting by dotnet00 on Monday October 24, 2022 @02:22PM (#33320377)
As I mentioned in another comment, docker containers are fine until you have even a slightly non-standard setup or use case, like the not-so-uncommon setup of having the machine connected to a VPN, in which case docker will proceed to not work at all.

What makes running these things easy isn't the container but that the software is packaged at all and would have the same effect if it were done through a conventional package manager. So of course docker seems like an upgrade when the only other thing they're offering is a loose distribution of files you have to manually copy in and configure.

Re:A guide for getting started with Self Hosting by mrmlz on Tuesday October 25, 2022 @03:20AM (#33327247)
What do you mean "connected to a VPN in which case docker will proceed to not work at all".

... i have a vpn and my docker containers work just fine?

Re:A guide for getting started with Self Hosting by bobdvb on Tuesday October 25, 2022 @10:57AM (#33331382)
As a relative beginner to Docker at home, the biggest issue I've had is that there is a presumption that everything is HTTP. I wanted to run two apps in two Docker containers that both wanted UDP on the same port and couldn't do it. Docker lets you use multiple IPs but apparently you can only use a single port for any app on a single host.

Tedious.

Re:A guide for getting started with Self Hosting by Handytinge on Sunday October 30, 2022 @05:29AM (#33392730)
> What you find annoying is empowering tons of people like me to run lot of software.

In what way does _only_ having a docker install option empower you?

GP wasn't stating that docker is bad, but docker _only_ options are bad.

There are many use cases that are not yours that docker doesn't suit.

Re:A guide for getting started with Self Hosting by jonwest on Tuesday October 25, 2022 @01:15AM (#33326514)
Read the Dockerfile. It is literally a set of instructions to configure a machine to run the software.
Re:A guide for getting started with Self Hosting by r1ch on Monday October 24, 2022 @11:23AM (#33317906)
Yup. I remember messing around with Redhat when I was 13. I installed Apache, edited the default index.html in htdocs then went to another computer, put in my IP and it worked! I was amazed, here I was running my own website.

25+ years later and the same steps are still possible to get the same result. I very much doubt k8s and Docker and whatever fancy new technology of the month is being pushed will have the same longevity. Simple technology rules.

Re:A guide for getting started with Self Hosting by PubliusMI on Monday October 24, 2022 @12:29PM (#33318838)
Calling containerization paradigm another "flavor of the month"?

OK Boomer

Re:A guide for getting started with Self Hosting by 533474 on Monday October 24, 2022 @01:41PM (#33319822)
He is entitled to his opinion and you may be breaking the rules of HN by starting a flame war. Our technology is built upon the foundations from our predecessors. I am younger too but I do not promote ageism that is so rampant in our industry
Re:A guide for getting started with Self Hosting by horsawlarway on Monday October 24, 2022 @02:23PM (#33320390)
His opinion is misinformed and ignorant of the reality of hosting open source applications.

If you want to host your own blog... sure, run a local copy of nginx or apache.

That's not what this conversation is about. We're not hosting our own websites - we're replacing crappy ad driven/subscription SaaS companies with open source applications, running on our own hardware/networks.

The use case there for containers is both obvious and compelling, and his comment shows that he has zero understanding of the space. So he's making an uninformed rant while talking about the "good ol' days" when everything was SO simple.

Will Docker, specifically, be around in 20 years? Who gives a shit.

Will the concept of an isolated & preconfigured runtime environment (containers)? Fuck yes it will.

Re:A guide for getting started with Self Hosting by r1ch on Monday October 24, 2022 @10:06PM (#33325301)
You're making a lot of assumptions here. Of course containers will be a thing, I'm not arguing against that and I run plenty myself. My point was that for simple tasks, you don't need to immediately jump into a technology you might not necessarily understand or won't be around in the future. Start with the basics and understand the core concepts.
Re:A guide for getting started with Self Hosting by Handytinge on Sunday October 30, 2022 @05:26AM (#33392712)
> The use case there for containers is both obvious and compelling, and his comment shows that he has zero understanding of the space.

I think this is more reflective of you, than him.

The technologies he's discussing drive (often in a poor, bloated way) most containers, and are the underlying components. Learning to self host with containers is fine until you want to customise beyond the ENV variables, or fix a bug and not have to wait on the maintainer, etc, etc.

Containerisation _is_ a recent tech, and it sticking around in the future _is_ debatable. I'm old enough to recall Red Hat (not EL)/Fedora kickstart being the thing that will never be replaced.

The thing that likely won't go away is the underlying infrastructure (nginx, apache, etc) that are worth knowing if you self host.

Re:A guide for getting started with Self Hosting by jokabrink on Monday October 24, 2022 @12:06PM (#33318516)
I disagree: Using docker makes it incredibly easy to tinker without real consequences or hassle. Want to try out - say - Heimdall? Create a docker-compose.yml file, an nginx reverse proxy config, and spin up the container. Don't like it? Remove said files and container. Thought about using a wiki for a project? Same thing.

For me, containers are just abstractions similar to packages, or OOP objects, or even apps. And as long as a service fits into this view, I think docker provides a great way. But, sure, you can overdo it and end up with more complexity than less (e.g. Nginx Proxy Manager).

Re:A guide for getting started with Self Hosting by monkmartinez on Monday October 24, 2022 @12:54PM (#33319191)
I completely agree with you and will take it even further.

I don't even futz with nginx anymore. You don't need to do that with tunnels. This assumes you have created a tunnel with required domain name. Very, very easy to setup.

1. Create container 2. Open Cloudflare ZeroTrust 3. Create a hostname for the new service or app; heim.example.com -> http://localhost:port 4. Save it. 5. Done. -> access the service from http://heim.example.com from anywhere in the world 5. For extra security, register the app in zerotrust with an email verification policy with emails you trust or use a token, or what ever auth you like.

Re:A guide for getting started with Self Hosting by Handytinge on Sunday October 30, 2022 @05:15AM (#33392657)
I just opened up the product page for "Cloudflar Zero Trust", which is full of CxE fuzz speak. It seems to be a hosted VPN?

So your solution for self hosting is to use a VPN not self hosted?

Re:A guide for getting started with Self Hosting by para_parolu on Monday October 24, 2022 @12:28PM (#33318823)
Docker and especially docker compose finally made it easy for me to start hosting many service on my local synology. I want to write some yaml, run command and get result. The last thing I want is to fight different versions of python, js or OS differences.
Re:A guide for getting started with Self Hosting by smoldesu on Monday October 24, 2022 @12:33PM (#33318893)
If your OS fails to package nginx properly, it's probably time to find a new package manager/OS.

On a more serious note though, both technologies have their uses. Docker can be nice for ad-hoc hardware provisioning without needing to think about much, but I think the GP's comment is still relevant. For a lot of users who are completely unfamiliar with bash/Linux, Docker will be impossible to grok. For the average HN engineer sitting at their Mac, it makes a lot more sense to get nginx/apache from Brew and tinker with it natively.

Re:A guide for getting started with Self Hosting by monkmartinez on Monday October 24, 2022 @01:01PM (#33319268)
Why bother with nginx at all tho? Why take the chance of borking your ENTIRE system with software you aren't intimately familiar with? Dockerize that shit and move on. If you want to get into the weeds with some bare metal installs, have at it. There just isn't enough time for me to learn every sub-system in the entire software stack to be productive. I say, pick your poison and get after it!
Re:A guide for getting started with Self Hosting by smoldesu on Monday October 24, 2022 @01:16PM (#33319469)
For one, because Docker is a horrible experience for anyone that isn't running Linux. Bare metal installs are much better for tinkering and "getting started" than Docker is.
Re:A guide for getting started with Self Hosting by horsawlarway on Monday October 24, 2022 @02:14PM (#33320261)
You clearly don't understand what the poster is saying.

I'm not fucking interested in "tinkering" with nginx/apache to host my own software, I'm interested in herding dozens of open source applications that replace paid/shitty ad driven SaaS companies.

The contract with docker is incredibly simple - you give me the path you're saving data to, a couple of ports to point at, and some ENV vars to provide config - I do the rest.

Boom - suddenly I can easily host literally hundreds of dollars per month worth of recurring subscription SaaS products using my own hardware and networks. All without having to see ads, or risk external data breaches, or deal with user tracking.

Re:A guide for getting started with Self Hosting by smoldesu on Monday October 24, 2022 @02:27PM (#33320460)
You clearly don't understand what I'm saying. I like Docker, and use it every day. However, it's not the tool you use to learn how self-hosting works (or how your containerized software functions). Running the Dockerized version of a program turns it into a pushbutton component, which is both convenient and abstracts over anything interesting or worth learning. Docker is a compositional layer that only works effectively when you understand what it's doing inside the container.
Re:A guide for getting started with Self Hosting by horsawlarway on Monday October 24, 2022 @02:58PM (#33320835)
> Running the Dockerized version of a program turns it into a pushbutton component

Which is the point, when the goal is to self-host someone else's application.

If you're just interested in learning how networks work, or what http is, or how to write software - then sure, go tinker with apache or nginx.

If you're trying to self host, containers are great. They do exactly what you've said - applications become (mostly) pushbutton components where the contract is simple and clear (data/ports/env).

And yes - there certainly is a bit of a learning curve for containers, but I'd much rather learn containers once than have to learn the ins & outs of the 25 apps I self host. For the most part, I neither want nor care to learn how they were put together. There simply isn't enough time, and the value is low.

Again - the goal here is NOT to host a blog/website I've made. It's to self-host applications other folks have put together, and that seems to be where this reference can be valuable.

Re:A guide for getting started with Self Hosting by 40four on Monday October 24, 2022 @01:39PM (#33319789)
You're not wrong per say, but that's not really what this guide is about. It's more about self hosting open source applications and services, not simple web pages. So I don't see how Just make an index.html and put it where your web server can serve it makes much sense here.

As someone who enjoys self hosting my own applications like Nextcloud, Ghost, Matrix/ Element and others, I think using Docker containers does actually makes sense here. I'm also a big fan of the KISS approach, as you are saying. However if you are trying to orchestrate multiple apps on a small home server or SBC, the installation and maintenance can become a huge headache very quickly. Especially if some of those apps have conflicting dependencies.

Re:A guide for getting started with Self Hosting by superkuh on Monday October 24, 2022 @02:41PM (#33320637)
I'd still disagree. Want to share an image? Put it in ~/www/. Want to share a video? Put it in ~/www. Want to share some music? Put the .mp3 in ~/www. This core idea, that you can share files simply by using a file system, makes many of these extremely complex tools that require containerization due to their rapidly changing deps... overkill. Cargo cult. An impediment to the actual goal of just showing people things. There's almost nothing simpler than using your mouse to drag a file into a folder or $ cp etc etc.

As for hosting your own Matrix homeserver, sure, that's such a heavy and over-complex protocol that changes rapidly and uses libs that change even faster. You'd want to containizer that.... and probably give it it's own computer instead of your desktop or an SBC since it's going to take a lot of system resources.

Re:A guide for getting started with Self Hosting by 40four on Friday October 28, 2022 @12:37PM (#33373769)
All fair points! Maybe I should reevaluate :)