Skip to main content

User setup

For security reasons it's best not to use the root user. Instead, create a new user and add the user to the sudo group.

Also, by default, the Pocket CLI and most other node software will place the data directory for the node in the user's home directory. So, when you create a new user, you'll want to make sure the home directory is on a volume that has plenty of room for the data directory.


The following assumes you have a volume partition mounted at /mnt/data.

Creating a new user

To create a new user, and home directory, do the following:

  1. Create a new user with the following command:
    sudo useradd -m -d /mnt/data/pocket -g sudo pocket

    Note: The user pocket will be created and added to the sudo group. A home directory will also be created at /mnt/data/pocket.

  2. Set the password for the new user:
    sudo passwd pocket

Delete a user

To delete a user, do the following:

sudo userdel -r pocket