Fedora Server
Package management, updates, release upgrades, and firewall setup on a Fedora VPS.
Our Fedora image is the official Fedora Cloud Base image, provisioned with cloud-init. It’s a minimal install, so you’ll add the software you need yourself. For help deciding whether Fedora is right for you, see Choosing a Linux distribution.
What’s in the image
- Packages: a minimal Fedora install with
dnf, OpenSSH, andcloud-init. - Networking: configured by
cloud-initat boot. See VPS networking for how your addresses are assigned. - Firewall: the cloud image doesn’t ship with an active firewall. See Set up a firewall.
- SELinux: enabled and enforcing. Some changes, like moving SSH to a different port, need an SELinux policy update as well.
To check which Fedora release you’re running:
cat /etc/fedora-releaseInstall packages
Fedora uses dnf to install packages:
sudo dnf install htopTo search for a package:
dnf search htopUpdate your system
To install the latest updates:
sudo dnf upgrade --refreshReboot if the update installed a new kernel.
Automatic updates
To install updates automatically, install the dnf5-plugin-automatic package:
sudo dnf install dnf5-plugin-automaticCreate /etc/dnf/automatic.conf with the following content so updates are applied, not just downloaded:
[commands]
apply_updates = yesThen enable the timer:
sudo systemctl enable --now dnf5-automatic.timerUpgrade to a new Fedora release
A new Fedora release comes out about every six months, and each release is supported for about 13 months. Upgrade at least once a year to stay on a supported release.
First, fully update your current release and reboot. Then download the new release, replacing 45 with the release you’re upgrading to:
sudo dnf system-upgrade download --releasever=45When the download finishes, reboot into the upgrade:
sudo dnf offline rebootThe upgrade can take several minutes. Only upgrade one or two releases at a time.
Set up a firewall
Fedora uses firewalld. Our hardening guide walks through installing and configuring it.