Back to projects
one-vps-to-rule-them-all

One VPS to Rule Them All

For the past three years, Iā€™ve been on quite the adventure with my trusty $5/month VPS. Itā€™s like the Swiss Army knife of servers, juggling everything from static websites to a Nextcloud server and even an email server. Letā€™s take a look at my setup and some of the measures Iā€™ve taken to build a spaceship with a toaster.

NOTE: A spaceship unless you want to run docker. You canā€™t fit a fuging whale šŸ³ inside a toaster toaster_q.gif

TOC

Main features

Hosting Static Websites

Thereā€™s no much mystery to this. I simply serve all my static sites with nginx. I also have them setup so that http always redirects to https.

Nextcloud Server

Nextcloud is my digital filing cabinetā€”perfect for file synchronization and sharing. Arguably the only ā€œbloatedā€ part of my setup, but also pretty powerful. Hosting it on my VPS gives me control over my data while accessing it from anywhere. The installation was a breeze, also because I had nginx setup prior to this.

Email Server

Setting up an email server can be daunting, but with the right tools, itā€™s achievable. I configured my server using the emailwiz script, which simplifies the installation of Postfix, Dovecot, SpamAssassin, and OpenDKIM. This ensures secure and private communication. I managed to set it up so that it admits multiple domains. Took me some time but it was worth it!

Security Measures

HTTPS Redirection

To enhance security, all my Nginx-hosted websites automatically redirect HTTP traffic to HTTPS. This ensures that all data transmitted between users and the server is encrypted, protecting against potential eavesdropping.

SSH Key Authentication

I set up my server to allow only SSH key-based authentication. Goodbye, brute-force attacks! I also have a backup plan with two-factor authentication (2FA) through my VPS providerā€”because God forbid I lose access to my keysā€¦

Automatic Certificate Renewal

I use Certbot for automatic SSL certificate renewal, which means I donā€™t have to stress about certificates expiring. The renewal process is managed by cron jobs, keeping everything seamless. Itā€™s like having a personal assistant who never takes a coffee break!

Auto Package Updates

To ensure my server is always up to date with the latest security patches and features, I set up automatic package updates. This minimizes vulnerabilities and keeps my services running smoothly.

Conclusion

This three-year journey has been a wild ride into the world of VPS hosting. With a simple setup, Iā€™m able to host multiple services securely and efficiently. Whether you want to run static websites, a cloud server, or manage your email with multi-domain support, a single VPS can truly do it allā€”especially at the price of a fancy coffee!

NOTE (AGAIN): Unless you want to run docker. You canā€™t fit a fuging whale šŸ³ inside a toaster toaster_q.gif

Back to projects