After 9 months it's time to setup new server for my personal use. I already know what do I need, so it'll be much easier to pick good software for certain jobs.
First of all we need to host static websites, for me and my friend with tiny traffic. We need to handle SSL encryption on every site. It's not a big deal. In addition we need to serve some precompiled software attached to my Blog. Nothing complicated. Next thing we gonna need is Django webapp with some good database engine, maybe some caching in the future. Again there's no big traffic there, so caching is not needed. Later we need to get TeamSpeak 3 server up and running for me and my friends. We use it daily, so it's pretty important too. And last but not least - IRC client. Also it would be great to install better shell to make server configuration easier.
Hosting service is one of the most important things. We need cheap,
high-available service with quite good performance, as we want to pack
relatively big amount of software here. My choice is Digital Ocean.
They offer VPS'es with SSD drives and 1Gbps network connection,
in few locations around the world. We also get free DNS, firewall and
monitoring tools with user predefined alerts, cool huh? My OS of choice
is Ubuntu 16.04 LTS. There's no special reason for this. I'm just very
comfortable with this distro and it have systemd on board, which is useful.
If you want some good VPS server on Digital Ocean you can use my referral
link. It will give you $10 to spent, so it's definitely worth it.
Finally we can pick software that'll suit my needs.
Starting from webserver - let's go with Nginx. Simple, lightweight,
fast. Capable of using Let's Encrypt SSL, caching and handling Django
apps when paired with WSGI server.
Nginx
For Django application we'll make a pair of Gunicorn WSGI server and
PostgreSQL. Last time I've used uWSGI instead of Gunicorn, but using
Gunicorn we can make things like reloading when source code changes
easier. It also seems to be faster and more configurable than uWSGI.
Regarding to PostgreSQL it's lightweight and it has some more advanced
queries that Django can make use of.
Gunicorn
PostgreSQL
We need IRC client and better shell to go. Last time I tried Weechat
and I absolutely fall in love with it. Easily configurable, lot of plugins
and cool features - everything you need. For system shell I'll go with
Oh My ZSH. We use ton of helpful functions, helpers, plugins and themes.
Everyone that tried it in a past will know what I'm talking about.
Weechat
OhMyZSH
After few hours of configuration my webserver achieves A+ mark on ssl tests at ssllabs.com. we're running fully operational Django app, TeamSpeak server and offer cool IRC client. So we achieved quite good functionality but what about system resources? We have a lot of free space to do crazy things. VPS memory usage is only 172MB/512MB. Also there's a little 512MB swapfile with swappiness set to 1 in case of fire. Also we've used up only ~3GB of SSD space. So there's 17GB of fast storage to spend on archiving funny memes...
Hope you enjoyed my VPS tour. I plan some cool stuff around VPSes like ScreenCloud integration or git continuous delivery done easily, so stay tuned!