Documentation

DocumentationTroubleshooting"Password Management Error" on Linux

"Password Management Error" on Linux

On Linux, Mailspring encrypts your email passwords and OAuth tokens before saving them in its config.json file. The encryption key comes from your desktop's secret service — GNOME Keyring, KWallet, or another Secret Service provider — so that service has to be installed, running, and unlocked when Mailspring starts. If it isn't, you'll see a Password Management Error or the message "Mailspring could not store your password securely because encryption is not available on this system."

Why am I getting a Password Management Error?

If you are getting a Password Management Error, it’s because something went wrong when we tried to access your computer’s keyring. This could mean that you don’t have a keyring installed on your computer, or you are using Mailspring from a user account that doesn’t have permission to access the keyring. Make sure that you aren’t on a “guest” user account or any user account without a password.

I’m on Linux (and NOT a Guest Account)

If you are getting this error on Linux, and aren’t on a guest account, it’s likely that you don’t have a proper connection to your operating system keyring. Depending on your Linux flavour, there are different possible solutions:

Gnome Desktop Environment

Install gnome-keyring and/or libsecret from your package manager and try running Mailspring again.

KDE 6

On KDE 6 you might need to force Mailspring to use the kwallet5 instead of kwallet6. Try running Mailspring from the terminal while forcing Mailspring to encrypt your passwords using the kwallet5 backend:

mailspring --password-store="kwallet5"

If Mailspring is now able to store your credentials, manually add this flag to the /usr/share/applications/Mailspring.desktop file, so that the Exec line looks as follows:

Exec=mailspring --password-store="kwallet5" %U

Other Desktop Environments

When using a desktop enviroment that is not Gnome or KDE based such as LXDE, ensure that you followed the steps for the Gnome Desktop Environment. Then, try running Mailspring from the terminal while forcing Mailspring to encrypt your passwords using the gnome-libsecret backend:

mailspring --password-store="gnome-libsecret"

If Mailspring is now able to store your credentials, manually add this flag to the /usr/share/applications/Mailspring.desktop file, so that the Exec line looks as follows:

Exec=mailspring --password-store="gnome-libsecret" %U

The keyring isn't running (tiling window managers, minimal installs)

Many desktop environments start the keyring daemon automatically; window managers like i3, sway, or Xmonad usually don't. Start it yourself and launch Mailspring from the same session:

gnome-keyring-daemon --start --components=secrets
mailspring --password-store="gnome-libsecret"

Once it works, add the daemon to your session autostart and the --password-store flag to the Exec= line of your .desktop launcher as described above. If you use KDE, make sure KWallet is enabled and use --password-store="kwallet5" instead.

Snap and Flatpak

The snap declares the password-manager-service interface, but on some systems it isn't connected automatically. If Mailspring works on first launch but asks you to sign in to everything again after a restart, run:

sudo snap connect mailspring:password-manager-service

Then quit Mailspring completely (including the tray icon) and start it again. With the Flatpak build, use Flatseal to make sure the Secret Service portal is allowed. If you keep having trouble with a sandboxed build, the .deb / .rpm packages from getmailspring.com/download talk to the keyring directly and are the most reliable option.

Because the passwords are encrypted with a key that only exists on this computer, copying config.json to another machine will not carry your passwords over — you'll be asked to reconnect each account. See Moving Mailspring to a new computer.

Thanks, but I’m still getting the error.

If you still need help, we recommend you post a new topic in the Help section, with a detailed description of the issue you are experiencing. Use the passwords tag to help others find the issue.

Can’t find what you’re looking for?

Ask in the Mailspring community — the team and other users are there to help.

Visit the Community