Live data from Hacker News

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

cprimozic.net

181–190 of 285 posts

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

#181
post #164

I’m using the same server type from OVH in Hillsboro and it’s great. They frequently do sales. Highly recommend anyone interested to go for the nvme upgrade. I rent three now total, one for production sites, one as a development machine strictly for vscode and another for development / staging / misc. waaaaaay overkill but it’s been a huge quality of life improvement. For containers I just use a couple docker compose…

Where do you go to monitor these Hillsboro OVH sales?

They send out emails but also just around major holidays and just randomly. They use this page most of the time from what I can tell https://us.ovhcloud.com/deals

Sometimes though they'll send targeted email offers that are not on the site and are good for older hardware but at a really cheap price.

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

#182
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…

Take a look at cloudron.io. It's not open source but sadly sandstorm.io apps have gotten out of date.

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

#183

Earlier quoted context omitted.

But how can we trust the DIY stuff meet compliance and hold the right security bar? It’s much easier to do with AWS. Or maybe as a startup, to-C website you don’t really care

I think the complexity can lead to its own set of security risks, as people just keep opening permissions wider until things connect.

That's actually a really good point. Out of the box, it's hard to screw up because things are pretty locked down. It's really in attempting to open things up that the security risk comes in if people aren't explicitly aware of exactly what they're opening.

EDIT: and this isn't necessarily difficult to grok. A lot of what you'll use from the network side is security groups, and they are straightforward. /EDIT

There are also actually some bad patterns in the AWS Console UI that don't help here. For instance, despite all the warnings they place on S3 buckets about making things public, they still allow you to appear to change subobjects to private. In a traditional hierarchical directory structure, the more granular subobject settings would override, but not so with S3. If you didn't know that, then you've just shot yourself in the foot.

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

#184
post #18

Instead of recording the “docker run“ commands, you might want to have a look at docker-compose

I had started out the same way, especially if it was a new app and I wasn't familiar with how I really wanted to run it. Some containers expect a fair number of environment variables and multiple mounts. Once I got everything working, I would create a script /svcs with the corresponding docker run command. There's even a cool tool called "runlike" which can create a well formatted command for any running container.

https://github.com/lavie/runlike/

But I've got those migrated to docker-compose files these days and I try to start with the docker-compose file instead of going directly into testing out docker run commands.

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

#185

Traefik Proxy[0] was a game changer for my self-hosted setup of Docker containers. Traefik can read labels applied to Docker containers (easily done with docker-compose) and setup the proxy for you as containers come and go. Even maintains the Lets Encrypt certificates seamlessly. [0] https://traefik.io/traefik/

Traefik is great, but their documentation is awful IMO. I moved to Caddy which I prefer currently.

To be fair, Caddy's docs aren't great either. Last time I tried to deploy it to give SSL to something that didn't have it, took me 2 hrs to figure out the docs enough to get it working.

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

#186

Traefik Proxy[0] was a game changer for my self-hosted setup of Docker containers. Traefik can read labels applied to Docker containers (easily done with docker-compose) and setup the proxy for you as containers come and go. Even maintains the Lets Encrypt certificates seamlessly. [0] https://traefik.io/traefik/

Traefik is great, but their documentation is awful IMO. I moved to Caddy which I prefer currently.

I love & use caddy for proxying to Docker containers + other services running outside Docker.

I wish there were an easier way to bind docker ports to Caddy automatically (without using dokku et al.), but for now I maintain a Caddyfile. Which, thinking of it, doesn't even require setting up a janky script for the rare times when I need to host a new service & modify the config.

I guess there's no reason to make things harder for myself 6 months in the future.

Related: https://xkcd.com/1205/

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

#187

Traefik Proxy[0] was a game changer for my self-hosted setup of Docker containers. Traefik can read labels applied to Docker containers (easily done with docker-compose) and setup the proxy for you as containers come and go. Even maintains the Lets Encrypt certificates seamlessly. [0] https://traefik.io/traefik/

Traefik is great, but their documentation is awful IMO. I moved to Caddy which I prefer currently.

Definitely for people getting started with self hosting I would recommend Caddy.

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

#188

Earlier quoted context omitted.

But how can we trust the DIY stuff meet compliance and hold the right security bar? It’s much easier to do with AWS. Or maybe as a startup, to-C website you don’t really care

I think the complexity can lead to its own set of security risks, as people just keep opening permissions wider until things connect.

Great and interesting point. I believe the solution is to have “security by default” Infra-as-code construct and some static analyzer

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

#189
post #185

Earlier quoted context omitted.

Traefik is great, but their documentation is awful IMO. I moved to Caddy which I prefer currently.

To be fair, Caddy's docs aren't great either. Last time I tried to deploy it to give SSL to something that didn't have it, took me 2 hrs to figure out the docs enough to get it working.

Caddy 1 docs felt handcrafted for each use case it supports, whereas Caddy 2 documentation feels generated, except for a couple of pages, which is enough to cover 99% of my needs.

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

#190
post #143

Thanks for this article, it's great to see people caring for their server (does it have a name?) and not defaulting to the serverless craze. Here's a few thoughts :) > there is some small downtime when I deploy new versions of things since I don't have any load balancing or rolling deployments It's entirely possible to achieve, depending on your stack. `nginx -s reload` will reload the entire config without killing e…

> there is some small downtime when I deploy new versions of things Some time ago I was looking for an easier way to fix this. It seemed to me that a good way would be to have the reverse proxy (e.g. nginx or similar) hold the requests into the app restarts. Fit the user, this would mean a ~10s hiccup rather than 504 errors. I didn't find an easy way to do it with nginx though and was sort of disappointed. Maybe othe…

This would be a cool feature for reverse proxies to have.
Post reply on HN