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
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