1. Pre-Installation Checklist
Before you begin, make sure the following prerequisites are met:
- The server hardware or virtual machine meets minimum requirements: e.g., 2 GB+ RAM recommended, dual-core processor, ~20 GB disk space or more.
- You have a reliable internet connection (for network install or updating).
- You have a bootable USB or CD-ROM containing Debian 12 netinstall or full ISO.
- You have decided on a hostname, domain name (if any), static IP address (if applicable).
- You have backups of any existing data (if installing on a system with existing data).
- You have physical or console access to the server (for BIOS/UEFI boot selection).
2. Download and Prepare Installation Media
- Go to the official Debian site and download the appropriate ISO image (for example: the netinstall image for 64-bit AMD64 architecture).
- Write the ISO to a USB flash drive or burn it to CD/DVD. On Windows you can use a tool like Rufus; on Linux you can use ddorcpto a USB.
- Insert/install the USB/installation media into your server and boot from it (you may need to adjust BIOS/UEFI settings to boot from USB/CD first).
3. Begin Installation
Once you boot from the installation media:
- Choose Install or Graphical Install depending on your preference.
- Select your language, location (country/territory) and keyboard layout.
- The installer will detect hardware and configure networking (likely via DHCP if networked).
- When prompted, enter your hostname (for example server1) and domain name (for exampleexample.com) if applicable.
- Set a password for the root account and create a normal user account (with full name, username and password).
4. Disk Partitioning
Important decisions here — especially for a server environment. In the installer:
- You’ll be prompted for partitioning method. You can choose:- Guided – use entire disk (simplest)
- Guided – use entire disk and set up LVM (good for future flexibility)
- Guided – use entire disk and set up encrypted LVM (if you require disk encryption)
- Manual (if you want custom partition layout)
 
- Choose which disk to use.
- Choose a partition scheme (e.g., “All files in one partition” for simplicity) or separate partitions (/,/home,/var, etc.). For many servers, you might want a separate/varif heavy logs or databases.
- Confirm writing changes to disk (the installer will warn that data will be lost).
- The base system will then be installed.
6. First Boot and Login
Once installation completes:
- Remove the installation media and reboot the system.
- Upon booting you should see the GRUB screen (if multiple OSes) and then the login prompt.
- Log in as your created user or as root (depending on what you chose).
- At this point you have a minimal Debian 12 server installation.
7. Post-Installation Steps — Making Your Server Production-Ready
After installation, there are several important steps for hardening, updating, and configuring your server. Here’s a recommended checklist for servers:
7.1 Configure Software Repositories & Update
Edit /etc/apt/sources.list and ensure it includes the main, contrib, non-free, and -firmware components. E.g.:
Then update and upgrade packages:
7.2 Create a Normal User & Configure sudo
If you only have root, you may install sudo and create a non‐root user:
Log in as that user and verify with sudo -v.
7.3 Secure SSH
Edit /etc/ssh/sshd_config and make recommended changes:
Restart SSH:
7.4 Set Up Firewall
Install ufw (Uncomplicated Firewall) and enable basic rules:
7.5 Time Synchronisation
Ensure your server’s time is synced:
Or install ntp if preferred:
7.6 Enable Automatic Security Updates
Install unattended-upgrades and configure it:
7.7 Install Essential Packages
You might install commonly used tools like:
7.8 Additional Hardening (Optional but Recommended)
- Disable unused services.
- Use key‐based SSH only.
- Install intrusion detection tools like fail2banor similar.
- Consider disk encryption, SELinux/ AppArmor policies, etc.
- Regularly review logs and monitoring.
- Backup your server and configuration.
8. Setting Up a Static IP (If Required)
If your server requires a static IP address rather than DHCP, you will edit /etc/network/interfaces (or network configuration via netplan depending on your system setup). Example for /etc/network/interfaces:
auto lo
iface lo inet loopback
auto ens33
iface ens33 inet static
address 192.168.0.100
netmask 255.255.255.0
gateway 192.168.0.1
Then edit /etc/hosts and /etc/hostname to reflect your hostname and domain.
9. Final Checks and Reboot
- Verify network connectivity: ping google.comor another known host.
- Confirm hostname / domain are set correctly:
Ensure time is synced: timedatectl.
Check that SSH allows login for your user only, and root login is disabled.
Reboot the system to ensure all services start cleanly.
10. Summary and What’s Next
You should now have a functioning, minimal Debian 12 server installation that’s up-to‐date, secured with SSH and firewall, and ready for you to install the services you need (web server, database, file server, container platform, etc.).
From here you might:
- Install the specific application stack your project needs (Apache/Nginx, MySQL/PostgreSQL, Docker/Podman, etc.).
- Hardening further for production (audit logs, intrusion detection, backups).
- Document your configuration for maintenance and troubleshooting.

