this post was submitted on 14 Jun 2023
2 points (62.5% liked)

Self Hosted - Self-hosting your services.

11401 readers
2 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules

Important

Beginning of January 1st 2024 this rule WILL be enforced. Posts that are not tagged will be warned and if not fixed within 24h then removed!

Cross-posting

If you see a rule-breaker please DM the mods!

founded 3 years ago
MODERATORS
 

I can't help but feel overwhelmed by the sheer complexity of self-hosting modern web applications (if you look under the surface!)

Most modern web applications are designed to basically run standalone on a server. Integration into an existing environment a real challenge if not impossible. They often come with their own set of requirements and dependencies that don't easily align with an established infrastructure.

“So you have an already running and fully configured web server? Too bad for you, bind me to port 443 or GTFO. Reverse-proxying by subdomain? Never heard of that. I won’t work. Deal with it. Oh, and your TLS certificates? Screw them, I ship my own!”

Attempting to merge everything together requires meticulous planning, extensive configuration, and often annoying development work and finding workarounds.

Modern web applications, with their elusive promises of flexibility and power, have instead become a source of maddening frustration when not being the only application that is served.

My frustration about this is real. Self-hosting modern web applications is an uphill battle, not only in terms of technology but also when it comes to setting up the hosting environment.

I just want to drop some PHP files into a directory and call it a day. A PHP interpreter and a simple HTTP server – that’s all I want to need for hosting my applications.

all 11 comments
sorted by: hot top controversial new old
[–] [email protected] 2 points 1 year ago (1 children)

The thing that boils my blood is secret sqlite databases. I just want to store my volumes on an NAS using NFS, and run the stacks on a server built for it. Having a container randomly blows up because an undocumented sqlite database failed to get a lock sucks ass.

[–] [email protected] 1 points 1 year ago

secret sqlite databases

The thing is: "secret". SQLite databases in general are awesome. Basically no need to configuration. They just work and don't even need an own server and in 99% of all cases they're absolutely enough for what they used for. I'd always chose a SQLite database over anything else - but it should made clear that such a database is used.

[–] [email protected] 1 points 1 year ago

Containers really shine in the selfhosting world in modern times. Complete userspace isolation, basically no worries about dependencies or conflicts since it's all internally shipped and pre-configured, easy port mapping, immutable "system" files and volume mounting for persistent data... And much more. If built properly, container images solve almost all problems you're grappling with.

I can't imagine ever building another application myself without containerization ever again. I can't remember the last time I installed any kind of server-side software directly on a host without containerization, with the exception of packages required by the host that are unavoidable to support containers or to increase security posture.

I'm my (admittedly strong) opinion, it's absolute madness, and dare I say, reckless and incomprehensible, why anybody would ever create a brand new product that doesn't ship via container images in this day and age, if you have the required knowledge to make it happen, or the capacity to get up to speed to learn how to make it happen (properly and following best practices of course) in time to meet a deadline.

I'm sure some would disagree or have special use-cases they could cite where containers wouldn't be a good fit for a product or solution, but I'm pretty confident that those would be really niche cases that would apply to barely anyone.

[–] [email protected] 1 points 1 year ago

While php is still cool... join the dark side and start using containers 😏

[–] [email protected] 1 points 1 year ago

Docker containers do pretty much solve that, drop a docker-compose.yml file in place, maybe tweak a few lines, and that's all.

[–] [email protected] 1 points 1 year ago

retvrn to cgi-bin

[–] [email protected] 0 points 1 year ago* (last edited 1 year ago)

And that's why my rule is: if it doesn't container it doesn't go on my server. If I can't get the application crammed into my docker compose stack I look for an alternative. Hell I run PiHole and Octoprint inside container

[–] [email protected] -1 points 1 year ago

Not sure what's the problem though. Pull up a reverse proxy, and give all the crappy shit a private ip and whatever port they want, and access it through the proxy, and everyone can be on 443. 127.42.1.123:443, whatever. Maybe use real containers, or that crappy docker shit, both offer you independent namespaces with all the port and whatnot.