Pre-Deployment Reality Check

Before you even download that ISO, let's talk about what actually breaks in production. I've deployed hundreds of Ubuntu servers and the same shit goes wrong every time.

Hardware Compatibility Hell

First stupid mistake: not checking hardware compatibility. The Ubuntu certified hardware list exists for a reason. Your fancy new server might boot fine but good luck getting the RAID controller working without proprietary drivers.

Check this shit before you buy:

I learned this after spending 6 hours debugging why a Dell server's network kept dropping packets. Turns out the Broadcom NIC needed firmware that Ubuntu doesn't ship. Check the linux-firmware package before deployment.

Installation Method - Stop Using Desktop ISOs

Download Ubuntu Server 22.04.5 LTS from the official releases page. Not the desktop version. Not some random derivative. The server ISO is 2GB smaller and doesn't have the GUI bullshit that breaks headless deployments. Verify the SHA256 checksums before installation.

For automated deployments, use cloud-init and autoinstall. This saves your sanity when you need to deploy 50 servers that are configured identically.

Autoinstall YAML template that actually works:

#cloud-config
autoinstall:
  version: 1
  locale: en_US
  keyboard:
    layout: us
  network:
    network:
      version: 2
      ethernets:
        eno1:
          dhcp4: false
          addresses: [192.168.1.100/24]
          gateway4: 192.168.1.1
          nameservers:
            addresses: [8.8.8.8, 1.1.1.1]
  storage:
    layout:
      name: lvm
  identity:
    hostname: production-server
    username: sysadmin
    password: '$6$rounds=4096$saltsalt$hash'
  ssh:
    install-server: true
    authorized-keys:
      - ssh-rsa YOUR_SSH_KEY_HERE
  packages:
    - openssh-server
    - fail2ban
    - ufw
    - htop
    - rsync

Partitioning That Won't Screw You

The default installer partitioning is garbage for servers. Here's what actually works:

  • Root (/): 50GB minimum - Ubuntu fills up fast with logs and cache
  • Swap: Match your RAM up to 32GB, then cap it
  • Everything else: Separate /var, /tmp, and /home if you can
  • Use LVM: You'll thank me when you need to resize partitions

The Ubuntu Server installer provides a text-based interface that guides you through partitioning, network configuration, and package selection.

The installer defaults to 10GB for root which fills up in 3 months. /var/log alone will eat 5GB if you don't configure log rotation properly.

Network Configuration - systemd-resolved Will Betray You

Ubuntu 22.04 uses systemd-resolved for DNS which breaks in creative ways. Disable it if you need reliable DNS:

systemctl disable systemd-resolved
systemctl stop systemd-resolved
rm /etc/resolv.conf
echo \"nameserver 8.8.8.8\" > /etc/resolv.conf

Static network config goes in /etc/netplan/01-network-manager-all.yaml:

network:
  version: 2
  ethernets:
    ens3:
      dhcp4: false
      addresses:
        - 192.168.1.100/24
      gateway4: 192.168.1.1
      nameservers:
        addresses: [8.8.8.8, 1.1.1.1]

Apply with netplan apply and pray it doesn't break SSH. Always test network changes with a console connection.

Deployment FAQ - The Shit Nobody Tells You

Q

Why does Ubuntu take 5 minutes to boot on my server?

A

systemd is waiting for network interfaces that don't exist. Check systemctl list-jobs during boot. Disable unused network services:bashsystemctl disable NetworkManager-wait-online.servicesystemctl disable systemd-networkd-wait-online.serviceSaves 2 minutes on every boot. You're welcome.

Q

My server randomly loses network after a few days - what gives?

A

systemd-resolved DNS cache corruption. Happens when you have shitty network equipment. Fix:bashecho 'Cache=no' >> /etc/systemd/resolved.confsystemctl restart systemd-resolvedOr just disable resolved entirely like a normal person.

Q

Why can't I SSH in after installation?

A

**Three common fuckups:**1. SSH keys not in the right place - check /home/user/.ssh/authorized_keys2. Wrong permissions - chmod 600 ~/.ssh/authorized_keys3. Firewall blocking port 22 - ufw allow ssh

tail -f /var/log/auth.log shows what's actually happening.

Q

The installer hangs at "Configuring apt" forever

A

Mirror is slow or broken. Hit Ctrl+Alt+T for terminal, then:bashkill -9 $(pgrep apt)nano /etc/apt/sources.list# Change to us.archive.ubuntu.com or your local mirror

Q

My RAID array isn't showing up

A

Ubuntu doesn't include proprietary RAID drivers. For Dell PERC controllers:bash# Check Dell support site for your specific PERC model# Download the .deb package for Ubuntu 22.04# Search Dell Linux repository for current driversdpkg -i megaraid-sas-*.debupdate-initramfs -uOr switch to software RAID with mdadm like everyone should. Check Dell Linux repository for current drivers.

Q

How do I stop snap from eating my disk space?

A

Snap keeps old versions of everything. Clean it up:bashsnap list --all | awk '/disabled/{print $1, $3}' | while read snapname revision; do snap remove "$snapname" --revision="$revision"; doneSet retention to 2 versions: snap set system refresh.retain=2

Q

Cloud-init keeps failing with "datasource not found"

A

Cloud-init expects cloud metadata. For bare metal:bashecho 'datasource_list: [ NoCloud, None ]' | sudo tee /etc/cloud/cloud.cfg.d/90_dpkg.cfgcloud-init clean

Q

Why is my server using swap when I have 64GB RAM?

A

Ubuntu's default swappiness is 60. For servers, set it to 10:bashecho 'vm.swappiness=10' >> /etc/sysctl.confsysctl -p

Q

My logs are filling up the entire disk

A

rsyslog default config is garbage. Edit /etc/logrotate.d/rsyslog:/var/log/syslog { daily rotate 7 compress delaycompress missingok notifempty create 640 syslog adm}Run logrotate -f /etc/logrotate.conf to force cleanup.

Q

How long should a server installation take?

A

20 minutes on decent hardware, 45 on spinning disks. If it takes longer, something's wrong:

  • Bad RAM (run memtest86+)
  • Dying disk (check dmesg | grep -i error)
  • Network issues during package downloads
Q

Can I upgrade from Ubuntu 20.04 without breaking everything?

A

No. Seriously, just install fresh. In-place upgrades break 30% of the time and when they break, they break hard. Your SSH config, custom packages, and half your services will need fixing.

Q

What's the minimum RAM for a Ubuntu server?

A

2GB for basic services, 4GB if you want it to not suck. The installer lies about 1GB being enough. systemd alone uses 500MB.

Security Hardening - Don't Get Owned

Security isn't optional on production servers. These are the basics that prevent script kiddies from turning your server into a Bitcoin miner. Follow the Ubuntu Security Guide and CIS Ubuntu 22.04 benchmarks.

SSH Configuration That Doesn't Suck

Edit /etc/ssh/sshd_config before you forget. Reference the SSH hardening guide and OpenSSH security best practices:

Port 2222
PermitRootLogin no
PasswordAuthentication no
MaxAuthTries 3
ClientAliveInterval 300
ClientAliveCountMax 2
AllowUsers sysadmin deployer

Change the default port from 22. Yes, it's security through obscurity. No, it doesn't stop determined attackers. Yes, it stops 99% of the automated shit trying to brute force your server. Check SSH attack statistics.

Install fail2ban: apt install fail2ban. Default config is fine for SSH but check /var/log/fail2ban.log occasionally. Configure with the fail2ban documentation.

Firewall - UFW Because iptables is a Pain

ufw default deny incoming
ufw default allow outgoing
ufw allow 2222/tcp  # SSH on custom port
ufw allow 80/tcp    # HTTP
ufw allow 443/tcp   # HTTPS  
ufw enable

Don't enable UFW without allowing SSH first unless you enjoy walking to the datacenter. Read the UFW documentation and iptables primer to understand what you're doing.

Package Management - Stop Installing Random Shit

Remove packages you don't need. Check the Ubuntu package removal guide and system hardening checklist:

apt remove --purge snapd                    # If you hate snap
apt remove --purge popularity-contest       # Stops Ubuntu from spying
apt remove --purge landscape-client         # Canonical's management tool
apt autoremove --purge

Enable automatic security updates per Ubuntu's security update guide and unattended-upgrades documentation:

apt install unattended-upgrades
dpkg-reconfigure -plow unattended-upgrades

Edit /etc/apt/apt.conf.d/50unattended-upgrades to only install security updates:

Unattended-Upgrade::Allowed-Origins {
    "${distro_id}:${distro_codename}-security";
};

User Account Management

Never use the root account directly. Create a proper admin user:

adduser sysadmin
usermod -aG sudo sysadmin

Lock unused accounts:

usermod -L games
usermod -L news
usermod -L uucp

Check for accounts with empty passwords: awk -F: '($2==""){print $1}' /etc/shadow

File System Permissions

Mount /tmp with noexec to prevent script execution:

Add to /etc/fstab:

tmpfs /tmp tmpfs defaults,noexec,nosuid,nodev,size=2G 0 0

Set proper umask for security: Add umask 027 to /etc/profile

Monitoring and Logging

Install basic monitoring tools:

apt install htop iotop nethogs rsyslog-gnutls

Configure rsyslog to not fill your disk:

Edit /etc/rsyslog.conf:

## Stop logging every fucking thing to syslog
*.*;mail.none;news.none;cron.none /var/log/syslog

Set up log rotation properly:

cat > /etc/logrotate.d/custom << EOF
/var/log/auth.log /var/log/syslog {
    daily
    rotate 14
    compress
    delaycompress
    missingok
    notifempty
}
EOF

Time Synchronization

Ubuntu uses systemd-timesyncd which is fine for basic setups:

timedatectl set-ntp true
timedatectl status

For critical systems, install chrony: apt install chrony

Kernel Parameters for Servers

Add to /etc/sysctl.conf:

## Prevent IP spoofing
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

## Disable ICMP redirect acceptance
net.ipv4.conf.all.accept_redirects=0
net.ipv6.conf.all.accept_redirects=0

## Disable source routing
net.ipv4.conf.all.accept_source_route=0
net.ipv6.conf.all.accept_source_route=0

## Log suspicious packets
net.ipv4.conf.all.log_martians=1

## Reduce swap usage
vm.swappiness=10

## Increase file descriptor limits
fs.file-max=2097152

Apply with sysctl -p.

Final Security Checklist

Before calling it done:

  • SSH key authentication working
  • Root login disabled
  • Firewall configured and enabled
  • Automatic security updates configured
  • Unnecessary services disabled
  • Log rotation configured
  • Time synchronization working
  • fail2ban monitoring SSH attempts

Test everything from a different machine before you walk away. I've locked myself out of servers by forgetting to test SSH keys with password auth disabled.

The UFW (Uncomplicated Firewall) status display shows active rules and listening ports, helping verify your security configuration.

Deployment Methods Comparison

Method

Time to Deploy

Automation Level

Skill Required

When to Use

Manual Installation

45-60 minutes

None

Basic

Learning, one-off servers

Autoinstall + cloud-init

15-25 minutes

Full

Intermediate

Production deployments

Prebuilt Cloud Images

2-5 minutes

Full

Basic

Cloud deployments

PXE Network Boot

10-20 minutes

Full

Advanced

Datacenter deployments

Docker/Container

30 seconds

Full

Intermediate

Application deployment only

Essential Ubuntu Server Deployment Resources

Related Tools & Recommendations

tool
Similar content

Ubuntu 22.04 LTS Developer Workstation Setup & Troubleshooting

Ubuntu 22.04 LTS desktop environment with developer tools, terminal access, and customizable workspace for coding productivity.

Ubuntu 22.04 LTS
/tool/ubuntu-22-04-lts/developer-workstation-setup
100%
tool
Similar content

Ubuntu 22.04 LTS: Long-Term Support & Enterprise Features

Explore Ubuntu 22.04 LTS, the Long Term Support release. Discover its key features, enterprise capabilities, commercial support options, and FAQs for a stable,

Ubuntu 22.04 LTS
/tool/ubuntu-22-04-lts/overview
85%
tool
Similar content

APT: Debian & Ubuntu Software Installation Guide & Best Practices

Master APT (Advanced Package Tool) for Debian & Ubuntu. Learn effective software installation, best practices, and troubleshoot common issues like 'Unable to lo

APT (Advanced Package Tool)
/tool/apt/overview
62%
troubleshoot
Similar content

Fix Docker Permission Denied Error: Ubuntu Daemon Socket Guide

That fucking "Got permission denied while trying to connect to the Docker daemon socket" error again? Here's how to actually fix it.

Docker Engine
/troubleshoot/docker-permission-denied-ubuntu/permission-denied-fixes
49%
integration
Recommended

OpenTelemetry + Jaeger + Grafana on Kubernetes - The Stack That Actually Works

Stop flying blind in production microservices

OpenTelemetry
/integration/opentelemetry-jaeger-grafana-kubernetes/complete-observability-stack
49%
troubleshoot
Recommended

Fix Kubernetes ImagePullBackOff Error - The Complete Battle-Tested Guide

From "Pod stuck in ImagePullBackOff" to "Problem solved in 90 seconds"

Kubernetes
/troubleshoot/kubernetes-imagepullbackoff/comprehensive-troubleshooting-guide
49%
howto
Recommended

Lock Down Your K8s Cluster Before It Costs You $50k

Stop getting paged at 3am because someone turned your cluster into a bitcoin miner

Kubernetes
/howto/setup-kubernetes-production-security/hardening-production-clusters
49%
troubleshoot
Recommended

Docker Desktop Won't Install? Welcome to Hell

When the "simple" installer turns your weekend into a debugging nightmare

Docker Desktop
/troubleshoot/docker-cve-2025-9074/installation-startup-failures
49%
howto
Recommended

Complete Guide to Setting Up Microservices with Docker and Kubernetes (2025)

Split Your Monolith Into Services That Will Break in New and Exciting Ways

Docker
/howto/setup-microservices-docker-kubernetes/complete-setup-guide
49%
troubleshoot
Recommended

Fix Docker Daemon Connection Failures

When Docker decides to fuck you over at 2 AM

Docker Engine
/troubleshoot/docker-error-during-connect-daemon-not-running/daemon-connection-failures
49%
tool
Recommended

containerd - The Container Runtime That Actually Just Works

The boring container runtime that Kubernetes uses instead of Docker (and you probably don't need to care about it)

containerd
/tool/containerd/overview
44%
howto
Popular choice

Migrate JavaScript to TypeScript Without Losing Your Mind

A battle-tested guide for teams migrating production JavaScript codebases to TypeScript

JavaScript
/howto/migrate-javascript-project-typescript/complete-migration-guide
42%
tool
Popular choice

jQuery Migration Troubleshooting - When Upgrades Go to Hell

Solve common jQuery migration errors like '$ is not defined' and plugin conflicts. This guide provides a debugging playbook for smooth jQuery upgrades and fixes

jQuery
/tool/jquery/migration-troubleshooting
40%
tool
Popular choice

jQuery - The Library That Won't Die

Explore jQuery's enduring legacy, its impact on web development, and the key changes in jQuery 4.0. Understand its relevance for new projects in 2025.

jQuery
/tool/jquery/overview
39%
tool
Popular choice

GitHub Copilot - AI Pair Programming That Actually Works

Stop copy-pasting from ChatGPT like a caveman - this thing lives inside your editor

GitHub Copilot
/tool/github-copilot/overview
37%
tool
Popular choice

OpenAI Browser Implementation Challenges

Every developer question about actually using this thing in production

OpenAI Browser
/tool/openai-browser/implementation-challenges
35%
tool
Recommended

Change Data Capture - Stream Database Changes So Your Data Isn't 6 Hours Behind

depends on Change Data Capture (CDC)

Change Data Capture (CDC)
/tool/change-data-capture/overview
33%
tool
Recommended

Building CDC Expertise: Skills, Career Development & Team Building

The missing piece in your CDC implementation isn't technical - it's finding people who can actually build and maintain these systems in production without losin

Debezium
/tool/change-data-capture/cdc-skills-career-development
33%
tool
Recommended

CDC Implementation Without The Bullshit

I've implemented CDC at 3 companies. Here's what actually works vs what the vendors promise.

Change Data Capture (CDC)
/tool/change-data-capture/enterprise-implementation-guide
33%
tool
Popular choice

Storybook - Build Components Without Your App's Bullshit

The tool most frontend teams end up using for building components in isolation

Storybook
/tool/storybook/overview
33%

Recommendations combine user behavior, content similarity, research intelligence, and SEO optimization