Published: July 22, 2026
Read: 9 min
In: Technology & Development

Written by

Reviewed by

Last updated: July 18, 2023

Expert verified

SVG Image

TL;DR

To add user to Docker group, you can follow these steps:

  1. Check Docker installation and version: Execute docker --version in Terminal.
  2. Verify Docker daemon status: Run systemctl status docker to check if it’s running.
  3. Add a new user to the Docker group: Create a user with adduser newuser and grant access with sudo usermod -aG docker newuser.
  4. Confirm successful addition: Log out and log back in, then execute docker run hello-world to see the Hello from Docker! message.

To ensure a smooth and secure process, follow these best practices: avoid running containers as the root user, utilize Docker’s built-in security features, regularly update Docker for security enhancements, and establish clear access control policies. However, be aware of common errors that may occur, such as users not being recognized or Docker not being installed. These errors can be resolved by ensuring users log out and back in, restarting the Docker daemon, using the correct syntax or command, and verifying Docker installation.

Continue reading the guide below to learn the step-by-step instructions to add user to Docker group. Also, learn the best practices to add user to docker group and common errors with possible solutions.

Docker has emerged as a powerful tool for containerization, simplifying application deployment and management. Adding users to the Docker group is a critical step in harnessing the full potential of Docker. By granting users access to Docker-related commands and resources, you empower them to collaborate efficiently and leverage the benefits of containerization. Moreover, adding users to the Docker group enhances security by allowing non-root users to execute Docker commands, mitigating the risks associated with running containers as the root user. In this article, I will explore the step-by-step process, best practices, and common errors to help you seamlessly add user to Docker group, unlocking a world of possibilities in container-based development.

How to Add User to Docker Group

To add user to Docker group, ensure that Docker is properly installed on your system, and you have administrative privileges. Additionally, verify that your operating system supports Docker installation and user management. Follow the following steps:

  1. Before proceeding, ensure that Docker is correctly installed and running on your system. Open Your Terminal window. 
opening terminal 26
  1. Execute the following command to check the Docker version:

<strong>docker --version</strong>
  1. This command will display the version of Docker installed on your system, confirming if it is correctly installed and running.
checking docker version
  1. Additionally, ensure the Docker daemon is running by executing:

<strong>systemctl status docker</strong>
  1. This command will provide the status of the Docker daemon, indicating whether it is currently running or not.
checking docker running status
  1. To create a new user, use the adduser command followed by the desired username. For example:

<strong>adduser newuser</strong>
  1. This command will create a new user with the specified username on your system.
creating a new user
  1. Run the following command to add the user to the Docker group:

<strong>sudo usermod -aG docker newuser</strong>
  1. This command will add the newly created user (newuser) to the Docker group, granting them access to Docker-related commands and resources.
adding user to the docker group
  1. To ensure that the user has been successfully added to the Docker group, log out and log back in to apply the group membership changes.
  2. Open a Terminal and execute the following command: