Live data from Hacker News

Self-Hosting Dozens of Web Applications and Services on a Single Server

cprimozic.net

111–120 of 285 posts

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#111
I can remember back in the dotcom boom I had Windows small biz server, Exchange, our phone system and hosting about 3 dozen websites on a single server in our breakroom. We ran like that for about 2 years with really no issues other than the occasional bandwidth issue...

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#112

Earlier quoted context omitted.

What's the "risk profile" and why is it too great? Kubernetes requires dedicated knowledge and can fail in surprising ways. Using a simple server with some established technology can be surprisingly/boringly reliable. Some hosts can reach incredible scale with a just few beefy dedicated machines, given the right software architecture.

The fact that it's a dedicated physical host means that any of a dozen components could fail and bring the box down permanently. The hosting company would have to reassign or build a new server for the customer, which could take from an hour to a week (or more in a pandemic with scarce parts). It depends on their excess capacity and on the machine's specifications. If it was one virtual machine I'd say, sure, just us…

> any of a dozen components could fail and bring the box down permanently

The same is true with VPS and "cloud" setups. As the OVH fire last year showed, offsite backups are not a luxury. The chances of that, though, are ridiculously low. Higher-end dedicated hosts have very low failure rates due to using higher-grade hardware and rotating the hardware every few years; they also usually have very competent and available technicians on site which are paid by your monthly bill.

> If it was one virtual machine I'd say, sure, just use one box, you can bring up a new one automated in 10 minutes.

The same is true with dedicated servers. If you house them yourself then sure bringing up hardware replacement is going to take longer. But if you use a managed dedicated hosting solution (as was mentioned in the article) the provisioning times are sensibly similar to that of a VPS (a few minutes).

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#113

Earlier quoted context omitted.

What's the "risk profile" and why is it too great? Kubernetes requires dedicated knowledge and can fail in surprising ways. Using a simple server with some established technology can be surprisingly/boringly reliable. Some hosts can reach incredible scale with a just few beefy dedicated machines, given the right software architecture.

The fact that it's a dedicated physical host means that any of a dozen components could fail and bring the box down permanently. The hosting company would have to reassign or build a new server for the customer, which could take from an hour to a week (or more in a pandemic with scarce parts). It depends on their excess capacity and on the machine's specifications. If it was one virtual machine I'd say, sure, just us…

It's true that it could fail in 10 weeks, but it's pretty likely that it lasts the whole 10 years. Computer hardware is pretty good like that. Especially if you've got power conditioning and a UPS so it never even reboots (except when you want it to).

At home I'm running an old desktop PC with Linux for my router. It's running on >10 year old hardware. I've got several other old PCs running, too, that's just the oldest, so not completely a fluke.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#114
post #84
post #13

Easy setup with: - traefik (nginx proxy with auto letscencrypt) - portainer (docker container management) - fail2ban (basic security) - logwatch (server / security stats by mail) - munin (server stats) - restic (cloud backup) - unattended-upgrades (auto install security updates) - apticron (weekly info) - n8n (automatisation for e.g. quick info via telegram, if something not work) Run every app that you want in your…

A few months ago, I made an offer of $100 in one of the freelancing websites, for someone to set-up something like your configuration on one of my Digital Ocean instances. I asked for a few more apps to be installed (git, svn, etc). There were no takers :-) I think a web site/service which lets you choose "apps" and spawns a VPS instance would be very useful and profitable (Think "ninite for VPS"). I started to work…

I believe there were no takers because 100$ for such a setup is completely out of market.

I wouldn't be surprised if a freelancer would charge 100$ per hour to do this kind of work spanning multiple work days.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#115
post #66

Three independent, but somewhat related thoughts on this topic: 1). On HOWTO articles about infra (1/2): I'd like to see more articles that lead with requirements, rather than setups that then justify the setup with requirements. Like, congrats, you managed to host a bunch of web applications via containers on a dedicated server. It's really nice for a super personal project and I'm sure it helped OP gain a lot of op…

The problem with AWS is that you can’t really do anything without understanding 1. IAM, and 2. VPCs/networking. And these are probably the two most complicated parts. For DIY you’re probably best off avoiding AWS

This 1000%. It was amazing how much more comfortable I was with my suite of VPS's when I moved them from AWS to Digital Ocean! I always describe on-boarding with AWS as "drinking from a firehouse". There is so much to understand and it is hard to tell what you should actually care about. DO, on the other hand, has a much simpler set of services that seem much more applicable to 'non-enterprise' usage. (Plus the documentation for DO is great!)

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#116
I do something similar:

- GCP VM with “Google Container OS”.

- “Cloud init” config set on the VM metadata (can easily recreate the VM; no snowflake config via SSH mutations).

- My service runs in a docker container, reads/writes to a SQLite file on the host disk.

- GCP incrementally snapshots the disk every hour or so, and makes copies to different region. Any disk writes are copied instantly to another zone.

- Lets encrypt cert is read from the host disk and the docker container serves HTTPS directly (no proxy). Certificate is renewed with the LE CLI.

- The service logs to standard out, this is collected by the Google logs daemon which I can view with the web UI.

- Google have their own HTTP uptime monitoring and alerting which sends you an SMS.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#117

Great write up! Tip I learned this week when I migrated my VPS [1]: when dumping MySQL/MariaDB databases for disaster recovery, dump the grants (aka database user rights) with the pt-show-grants tool. You don't want to import the mysql table itself on a fresh MySQL/MariaDB installation, it's a headache. So dump all your tables to SQL (raw data) and dump your user grants/rights with pt-show-grants (which in itself cre…

If you don't have access to (or don't want to use) the Percona toolkit, you can get all of the grants directly from the `sql_grants` table by installing `common_schema`.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#118
post #66

Three independent, but somewhat related thoughts on this topic: 1). On HOWTO articles about infra (1/2): I'd like to see more articles that lead with requirements, rather than setups that then justify the setup with requirements. Like, congrats, you managed to host a bunch of web applications via containers on a dedicated server. It's really nice for a super personal project and I'm sure it helped OP gain a lot of op…

The problem with AWS is that you can’t really do anything without understanding 1. IAM, and 2. VPCs/networking. And these are probably the two most complicated parts. For DIY you’re probably best off avoiding AWS

Sounds about right based on my experience with AWS for past 8 years. Does anyone (besides AWS/TF/Pulumi, for whom it’s not their core product) attempt to solve the networking and IAM? These two areas, esp AWS networking, despite being fundamental building blocks, just never get coverage.

I know I’m being a beggar and beggars can’t be choosers, however, I believe that there are folks here who could solve this problem and make a nice living off of it. Hope someone reads this comment and builds something to address this.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#119
post #21

I wonder what the environmental impact of a 24/7 running system with such high-end specs is. Desktops are worse with a graphics card (just yesterday I noticed my system's power consumption doubles when the GPU turns on: 20W with 100% CPU on all cores and WiFi stressed; 37W with additionally primusrun glxgears running), but desktops only run on demand. Dedicated non-mobile hardware doesn't scale to demand that well an…

I briefly ran a home server on desktop grade hardware. Ryzen 5 with 2 hard drives. The thing was pulling a constant 70w while basically idle. Insanely inefficient compared to adding an extra user to an existing app/service.

if you use a NUC you can get less than 30W easily.

Re: Self-Hosting Dozens of Web Applications and Services on a Single Server

#120
post #84

Earlier quoted context omitted.

A few months ago, I made an offer of $100 in one of the freelancing websites, for someone to set-up something like your configuration on one of my Digital Ocean instances. I asked for a few more apps to be installed (git, svn, etc). There were no takers :-) I think a web site/service which lets you choose "apps" and spawns a VPS instance would be very useful and profitable (Think "ninite for VPS"). I started to work…

Seems like https://sandstorm.io/ could be what you are looking for.

Probably not, sandstorm is abandoned, most softwares are broken and unmaintained, gitlab version is from 2016 and full of vulnerabilities, same for WordPress version from 2018. Project is dead. I think the guy behind the project was hired by Cloudflare few years ago
Post reply on HN