Home · Help · Setting up a Fedora server
Setting up a Fedora server: dnf5, updates and release upgrades
Fedora ships the newest program versions of the major systems. A new release appears every six months, each is maintained for about thirteen months. This guide applies to Fedora 44 on a Fedora server.
What is installed
- dnf5, called as
dnf, with the package sourcesfedoraandupdates. - systemd with journald, plus systemd-networkd for the network. The address is set during setup.
- sudo. OpenSSH for logging in is added when the server is set up.
cron, rsyslog, firewalld and the tool for automatic updates are not installed. These details apply to the container. A vServer with KVM starts from the official cloud image of Fedora and is set up with cloud-init at first boot. The package selection there can be slightly larger.
1. Updating
dnf upgrade --refresh
2. Automatic security updates
The plugin dnf5-plugin-automatic installs updates on a schedule. Copy the template to /etc/dnf/automatic.conf, set apply_updates = yes there and enable the timer:
dnf install dnf5-plugin-automatic
cp /usr/share/dnf5/dnf5-plugins/automatic.conf /etc/dnf/automatic.conf
systemctl enable --now dnf5-automatic.timer
3. Setting up a firewall
dnf install firewalld
systemctl enable --now firewalld
firewall-cmd --permanent --add-service=ssh
firewall-cmd --permanent --add-service=https
firewall-cmd --reload
Allow the SSH port first, then switch the firewall on. If SSH runs on a port other than 22, enter that port. If you still lock yourself out, the console in the customer portal helps.
4. Services, logs and cron
systemctl status nginx
systemctl enable --now nginx
journalctl -u nginx -e
Logs are only in the journal and are read with journalctl. Scheduled jobs run with systemd timers or with cron after dnf install cronie and systemctl enable --now crond.
Releases and upgrades
Upgrading to the next release works with dnf system-upgrade. Create a snapshot in the customer portal first and install all updates. If you prefer a fresh start, reinstall in the customer portal, see Reinstalling a server without losing data.
dnf upgrade --refresh
dnf system-upgrade download --releasever=45
dnf offline reboot
Frequently asked questions
- Fedora or AlmaLinux?
- Fedora brings new program versions and needs a release upgrade about once a year. AlmaLinux stays the same for years and fits if the server should run for a long time without major changes.
See also: First steps on your vServer Setting up an AlmaLinux server Setting up a Rocky Linux server