openSUSE Leap
Package management, updates, users, and firewall setup on an openSUSE Leap VPS.
Our openSUSE Leap image is the official openSUSE Leap cloud image, provisioned with cloud-init. Leap is built from the same sources as SUSE Linux Enterprise, so it’s a good fit if you’re already familiar with the SUSE ecosystem. For help deciding whether openSUSE Leap is right for you, see Choosing a Linux distribution.
What’s in the image
- Packages: a minimal openSUSE Leap install with
zypper, OpenSSH, andcloud-init. - Networking: configured by
cloud-initat boot. See VPS networking for how your addresses are assigned.
To check which Leap release you’re running:
cat /etc/os-releaseTo check whether a firewall is active:
sudo systemctl status firewalldInstall packages
openSUSE uses zypper to install packages:
sudo zypper install htopTo search for a package:
zypper search htopUpdate your system
To install the latest updates:
sudo zypper refresh
sudo zypper updateReboot if the update installed a new kernel. zypper ps -s lists running programs that still use old, now-replaced files that should be restarted.
Upgrade to a new Leap release
Each Leap release is supported for about two years. To move to a newer release, follow openSUSE’s system upgrade guide. Take a backup before upgrading, and only upgrade one release at a time.
Add a non-root user
Create your user, set its password, and add it to the wheel group, replacing stackuser with your preferred username:
sudo useradd -m -G wheel stackuser
sudo passwd stackuserAllow members of wheel to use sudo by creating a sudoers drop-in file:
sudo visudo -f /etc/sudoers.d/wheelAdd this line, then save the file:
%wheel ALL=(ALL:ALL) ALLThen follow the SSH key steps in our non-root user guide to let your new user log in.
Set up a firewall
openSUSE uses firewalld. Install and enable it, then allow SSH and any services you run:
sudo zypper install firewalld
sudo systemctl enable --now firewalld
sudo firewall-cmd --permanent --add-service=ssh
sudo firewall-cmd --permanent --add-service=https # Example service
sudo firewall-cmd --reload
sudo firewall-cmd --list-allSee our hardening guide for more on SSH, firewalls, and fail2ban. The firewalld commands in the Fedora sections work the same way on openSUSE.