First install on ubuntu server

Have chia installed and working on several Windows machines. This is my first attempt at getting it running on a ubuntu server and I am getting the following error when I try to import my existing key.

(venv) user@t5600:~/chia-blockchain$ chia keys add -f key.txt
Traceback (most recent call last):
  File "/home/user/chia-blockchain/venv/bin/chia", line 33, in <module>
    sys.exit(load_entry_point('chia-blockchain', 'console_scripts', 'chia')())
  File "/home/user/chia-blockchain/chia/cmds/", line 77, in main
    cli()  # pylint: disable=no-value-for-parameter
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/click/", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/click/", line 782, in main
    rv = self.invoke(ctx)
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/click/", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/click/", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/click/", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/click/", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/user/chia-blockchain/chia/cmds/", line 53, in add_cmd
  File "/home/user/chia-blockchain/chia/cmds/", line 50, in add_private_key_seed
    sk = keychain.add_private_key(mnemonic, passphrase)
  File "/home/user/chia-blockchain/chia/util/", line 188, in add_private_key
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/", line 133, in set_password
    self._write_config_value(service, username, password_base64)
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/", line 143, in _write_config_value
  File "/home/user/chia-blockchain/venv/lib/python3.8/site-packages/keyrings/cryptfile/", line 168, in _ensure_file_path
  File "/usr/lib/python3.8/", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/user/.local/share/python_keyring'
(venv) user@t5600:~/chia-blockchain$

Hey man! When you run the install did you preface the command with sudo

Please use the code block function. Look at the top post in Support to see how.

1 Like

If you do an ls -al in your home dir ~, is anything owned by root?

Possible quick fix: sudo chown -R user:user /home/user

This would change the ownership on everything in your home folder to be owned by your user user.

1 Like

Did run it with the sudo command.

Did find the post in support. Ill check for it.

sudo chown -R user:user /home/user” did the trick.

Cool, glad that fixed it. :beers: