electrum icon indicating copy to clipboard operation
electrum copied to clipboard

linux plugin keyfile path may not work on some distros

Open f321x opened this issue 7 months ago • 1 comments

Description

On linux we currently store the root owned plugin keyfile in /etc/electrum/plugins_key, however the /etc directory may not work on some distributions like NixOS and Fedora Silverblue as there the /etc directory is read only or its content can get deleted on system rebuilds/updates. Is there a reason why we can't just store the keyfile in config.electrum_path() or alternatively at $HOME/.config/electrum/?

f321x avatar Jun 06 '25 16:06 f321x

on some distributions like NixOS and Fedora Silverblue as there the /etc directory is read only

Oh right, immutable distros.

just store the keyfile in config.electrum_path() or alternatively at $HOME/.config/electrum/?

The file should only be writable by root, but I guess that does not put a restriction on its location. Re putting it in the datadir, the question is whether we want it to be global:

  • should it be reused between different instances of electrum run with custom --dir?
  • should it be reused between mainnet/testnet?

Depending on the answer, one of your suggested locations makes sense.

I think it makes sense to make it global. Note that even testnet is relatively high value / sensitive: installed plugins get to execute code after all.

SomberNight avatar Jun 06 '25 16:06 SomberNight