This script will automatize the initial customization of Debian Server minimal Installations. For more details, please consult the following articles:
Tested on:
- Debian 11 (Bullseye)
- Debian 12 (Bookworm)
The script is suited for Debain version 11 (Bullseye) or greater. It will not work on older versions of Debian systems.
This scritp is intended to run on minimal installations of the Debian server systems. Usually those systems are as bare as they can be, and since git is a requirement to even get this script, it will need to be installed first. You can install it following the steps below:
- Set the variable which will extract the correct codename of your Debian server:
OS_CODENAME=$(grep VERSION_CODENAME /etc/os-release | awk -F '=' '{print $2}')
- Add the main repository source to /etc/apt/sources.list file:
echo -e "deb http://deb.debian.org/debian $OS_CODENAME main" > /etc/apt/sources.list
- Update APT and install git:
apt update
apt install -y --no-install-recommends git ca-certificates
You can clone this repository anywhere on VPS, i.e.:
cd /tmp && git clone https://github.com/zjagust/debian-server-initial-customization.git
Once repository is cloned, execute the following commands:
cd /tmp/debian-server-initial-customization
. debian-server-initial-customization.sh
Let the script do its work!