KDE Vaults: Lock Away Sensitive Files on Linux
In this article
KDE Vaults lets you create an encrypted, password-protected folder on your Linux desktop. When the vault is locked, its contents are completely inaccessible—even to someone with physical access to your machine. To use it, you need a Plasma desktop (KDE's environment) with the Vaults feature enabled, which is standard on most Plasma installations. If you don't see it, install the plasma-vault package from your distribution's repositories.
What You'll Need
- A Linux system running KDE Plasma (version 5.14 or later recommended)
- The
plasma-vaultpackage installed (usually pre-installed) - An encryption tool like
cryptsetup(for LUKS) orencfs/gocryptfs(for FUSE-based vaults)—Plasma will prompt you to install these if missing - Administrative (sudo) privileges to install packages if needed
Step-by-Step
- Open the Vaults settings. Click the Plasma application launcher (usually bottom-left), type "Vaults" and open the "Vaults" settings page. Alternatively, go to System Settings > Vaults.
- Create a new vault. Click the "Create New Vault" button (or the plus icon). You'll see a dialog asking for a name and encryption method.
- Choose an encryption type. Select either "Encrypted folder (encfs)" or "LUKS encrypted file container." For most users, the LUKS option is more secure and reliable. If you choose LUKS, you'll specify a file size (e.g., 100 MB) that will hold your data. For encfs, you'll just pick a folder.
- Set a strong password. Enter and confirm a password. This password protects your vault. Make it long and unique—if you forget it, there is no recovery.
- Finish creation. Click "Create" and wait for the vault to initialize. This may take a moment, especially for LUKS containers.
- Unlock the vault. In the Vaults settings page, you'll see your vault listed. Click the unlock icon (usually a lock) and enter your password. The vault will be mounted as a folder, typically at
~/Vaults/YourVaultName. - Add sensitive files. Open the mounted folder in Dolphin (file manager) and copy or move files into it. Anything you place here is encrypted on disk.
- Lock the vault when done. Right-click the vault in the system tray (if you have the Vaults plasmoid) or go back to Vaults settings and click the lock icon. The folder will unmount, and the contents become inaccessible until you unlock again.
Common Mistakes
- Forgetting the password. There is no "forgot password" option. If you lose it, your data is gone forever. Always use a password manager.
- Choosing a tiny size for LUKS. If you set a 100 MB container and later need 200 MB, you'll have to create a new vault. Plan ahead or use encfs if you need dynamic growth.
- Leaving the vault unlocked. If you walk away from your computer while the vault is open, anyone can access your files. Lock it whenever you leave.
- Copying instead of moving. If you copy a sensitive file to the vault and don't delete the original, the original remains on disk. Use "Cut" and "Paste" or delete the original securely.
- Using a weak password. A short password can be brute-forced. Use at least 12 characters with a mix of letters, numbers, and symbols.
Tips
- Add the Vaults widget to your panel. Right-click your taskbar, select "Add Widgets," search for "Vaults," and add it. This gives you one-click lock/unlock from the system tray.
- Set up auto-lock. In Vaults settings, you can enable "Lock on screen lock" or "Lock after inactivity." This ensures your vault closes when you lock the screen.
- Use a separate vault for different projects. For example, one for work documents and another for personal financial records. This limits exposure if one password is compromised.
- Back up the vault's configuration. For LUKS, the vault is a single file. Copy that file to an external drive (when locked) to back up your data. For encfs, back up the encrypted folder and the config file.
- Test with a small file first. Create a test vault with a tiny size and a sample file to ensure you understand the workflow before committing real data.
Troubleshooting
Vault won't unlock.
- Check that you're entering the correct password. Caps Lock is a common culprit.
- Verify that the vault is not already mounted (look for the folder in
~/Vaults). If it is, lock it first. - For LUKS, ensure the vault file hasn't been corrupted. If you backed it up, try restoring from backup.
Vault creation fails.
- Make sure you have the necessary packages installed. For LUKS, you need
cryptsetup. For encfs, you needencfs. Install them via your package manager. - Check that you have write permissions to the location where the vault is being created (e.g., your home directory).
- If using LUKS, ensure you have enough free disk space for the container file.
Vault is not visible in Dolphin.
- After unlocking, the vault should appear under "Places" in Dolphin. If not, navigate to
~/Vaultsmanually. - Try restarting Dolphin (killall dolphin and reopen) to refresh the view.
Can't find Vaults in System Settings.
- Your Plasma version might be older or the
plasma-vaultpackage isn't installed. Install it from your distribution's package manager (e.g.,sudo apt install plasma-vaulton Debian/Ubuntu). - Log out and back in to ensure the module loads.
Frequently Asked Questions
What happens if I forget my vault password?
There is no recovery mechanism. The data is encrypted with your password, and without it, the vault cannot be unlocked. You would lose all files inside. Always keep a backup of the vault file and store your password in a password manager.
Can I share a vault between multiple users?
Yes, but it's not straightforward. For LUKS, you can mount the container manually with a shared password, but Plasma's Vaults interface is designed for a single user. For encfs, you could share the encrypted folder and password, but concurrent access may cause issues. It's safer to use separate vaults per user.
Does the vault encrypt files while I'm working on them?
No. When the vault is unlocked, the files are decrypted and accessible. They are only encrypted when the vault is locked. So lock it whenever you step away.
Can I use a vault on a USB drive?
Yes. You can create a vault on an external drive by choosing that location during creation. For LUKS, the container file can be stored on the USB drive. Just make sure the drive is mounted when you try to unlock it.
Is KDE Vaults as secure as full-disk encryption?
It's different. Full-disk encryption protects everything on your disk at boot time. Vaults protect only the files inside them, but they add an extra layer of protection if your system is already running. For sensitive files, vaults are a good complement to full-disk encryption.
Can I change the password of an existing vault?
Yes. In Vaults settings, select your vault and click the "Change Password" button. You'll need to enter the current password and then a new one. This works for both encfs and LUKS vaults.