Hacker News new | ask | show | jobs
by vlod 980 days ago
Probably an unpopular opinion with everyone preferring to hand over money for convenience, but the advantage of learning to be able to do this yourself with nginx will bring a lifetime of self reliance/money saving.

Yes it will take time to learn it, but the ability to spin up a super cheap digital-ocean/linode/hetzner node is a valuable skill to have in your back pocket.

2 comments

Great choice. Setting up https from scratch using nginx is something you should definitely do ONCE in your life but then use automated tools such as nginx-proxy/acme-companion.
Or you could use caddy from the get go
The Apache stuff I learned like 20 years ago still works - especially for not-huge sites (<600RPS). Point being, once you get this sys-admin task done it's super repeatable (regardless of server). And from one, moving between isn't that hard either. Dozens of personal services can run on a $5/mo VPS. One I have now is nginx to SSL terminate to 8 backend docker-things
Still running apache for my side projects too, it's very convenient and easy to deal.
Good pun +1 for that.

I recommend nginx or Apache for the learning exercise. Then go with whatever best suits your use case. My rule is choose that which fits the objective and which doesn't overburden with cognitive load. So I don't use Apache for anything and sometimes just use python's built in. suitability for purpose and usability is what counts for me.

idk it costs me like 6 dollars to run a docker container on aws's container service with .5 core. one server by hand isn't to bad, once you want to scale horizontally its going to be tedious, the tools start getting annoyingly complex. locking down everything is a headache, and theres always a nagging feeling that you didn't do it right and one well timed script from getting taken over. you also need to deal with code deploys. just dumping the python code in a docker container and uploading it is easy. updating a hand set up server, again is tedious and error prone.
Sure it's not for everyone. I learnt a lot doing cash strapped startups where there wasn't a devops person. AWS can get expensive, especially when you start using more and more services (lambda,dynamodb,rds,elasticache etc) although it can be easily scaled.

Note, you probably shouldn't do it by hand (setting up your own servers). You'd use Ansible/Terraform.

For those that are interested but not quite ready, here's a great article [0].

[0] https://github.com/fpereiro/backendlore.