Debian Server Configuration
Disclaimer: This is a highly opinionated configuration on setting up a Debian server.
Up until recently, I've been a Ubuntu finatic. Ubuntu is what I've been using for at least 10 years now on almost all my production servers. Ubuntu has served me well, however, recent versions have been pushing me further and further away with what feels like annoying changes and bloatware. Call me old school, but there's some very simple ways of doing things that I love to stick too.
Recently, I've given debian a trial run, and find myself with almost entirely debian based servers on my production machines. One of my favorite parts of Debian is how simple and clean the install is. It comes with the bare minimum ready for whatever you want to throw at it. In fact, I can't think of a single reason of when I would use Ubuntu over Debian.
My tips and tricks live in my set-up scripts. Inside my set-up script lives at ./debian-setup/debian-setup.sh. (Do not run this until you know what it does and make some changes.)
This script has the ability to do a lot depending on what you want to do. This script is very much a living script as I am slowly adding pieces to help with the various things I use servers for these days. Currently, it's designed to set-up a single user system. It assums a user codydaig, without this user you will lockyour self out of the machine. To change this, inside the debian-setup/files/etc/passwd file, towards the bottom either replace codydaig with your username or delete that line and ensure your user has sudo access after running the script prior to logging out. The script does limit root login directly.
Some features I like about my set-up:
- Single user system, logging in as codydaig actually logs you in as root.
- Cleans up the last of packages that I do not need.
- Copies config files the way I like them (small changes).
- Install utils and packages that I use frequently. (git, ifconfig, etc...)
- Install dependencies for various other software (after selecting Y on those questions)
This script is very much basic and set-up for my needs but works great for now. I have plans to make this script more robust so feel free to contirbute with a PR and make this better.