Few necessary things You need to do after buying VPS server

Buying your first own VPS server is a big step in your self-development. Many new difficulties that You will face, many new things and technologies that You will learn.

But where to start? What is important and what isn’t?
Look at the below checklist to kickstart the VPS journey!

Security

The first thing that you should do is securing a fresh server. There are easy and more advanced ways. Most common ones You can find below:

  1. Change your SSH port (22) on something unusual like 6789.
  2. Turn off password authorization for SSH (or use some crazy one for emergency purposes) and switch to key-based authentication.
  3. Turn on a firewall or write your own script that will use iptables.
  4. Install Fail2Ban, a utility that will block someone who is brute-forcing your password.
  5. Do not leave default ports for new applications e.g. databases, chats, application servers e.t.c.
  6. Use SFTP instead of FTP (You don’t need FTP server, that’s a fact).
  7. Turn off your webserver error info, version, default page, and similar options.

Basic configuration

For basic VPS configuration, You only need two components listed below. It’s that simple! Everything above that is learning and experimenting.

  1. Web server, start from something very simple like Apache and complicate it on the go. You can change MPM (Multi-Processing Module) on Event, enable PHP-FPM, and tweak many other settings. There is a lot to learn and a lot of setting combinations to experiment with.
  2. Database, the most popular one is MySQL, but for me better optimized and fully compliant with MySQL is an open-source alternative called MariaDB.

Utilities

There are many useful utilities that can help with server monitoring and administration. On my list, You could find only the basic one for beginners.

  1. Backup your files, configurations, and databases regularly. One of the fun solutions is writing a bash script and uploading backup to Scaleway (50GB free cloud S3 storage).
  2. Uptimerobot – monitor your web pages and get instant notifications when something is wrong.
  3. Server status – check your server status without using the terminal:
    – Server Status wrote by Adam
    https://gitlab.com/adam-zielonka-pro/server-status
    – eZ Server Monitor (make sure You protect access to it with .htpasswd file)
    https://www.ezservermonitor.com/

Useful things and tips

  1. Docker – create containers with things You wanna test or easily upgrade without any hesitation.
  2. pm2 – clever production process manager for Node.js
  3. Next Cloud (your own storage) with Redis as an in-memory cache (look here for instruction).
  4. Speed up your website with Apache and Cloudflare (link to article)

Maybe have some fun?

You bought VPS to gain some knowledge, right? Try some hard or fascinating things. Install new software to test it out. Create scripts that will automatize your most time-consuming tasks.

  1. Cloudflare – so many settings and possibilities that You will get lost for a few days playing with all switches.
  2. Python and web scraping. Get e-mail notifications, present data on your own web page, and many more. Make something useful.
  3. Bash scripts automating things – renewing SSL certificates, clearing some old backup files, or cache.
  4. Install web server that is not Apache -> Nginx or Lighttpd
  5. Use MariaDB instead of MySQL or maybe You can find another alternative.
  6. Create your own VPN using your VPS.
  7. Make your home page or portfolio with links to your social media accounts.
  8. Optimize everything that could be optimized :D
  9. Configure your own private git repository with GitLab or something lighter like Gogs.
  10. Host your own password managerhttps://bitwarden.com/
  11. Heard of Heroku? Try out Dokku, selfhosted mini-Heroku – https://github.com/dokku/dokku

For me buying my first VPS server was a game-changing step. One of my friends convinced me to buy a little one on OVH. After basic configuration, I got craze to optimizing everything, literally everything. Starting from web server, database, PHP-FPM ending on websites, and digging deeply into Cloudflare. After a few years, I gained a ton of new knowledge and unusual experience that make a difference in many companies.

I hope that You will have a similar learning experience and intensive curiosity like me! Let me know about some great stuff that should be added to the above lists.

Join my Newsletter! 👨‍💻

Subscribe to get my latest content by email 🦾

Also read...

The best entries...