Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Create admin user

Jenny edited this page Jun 12, 2020 · 1 revision

Create admin user

To access restricted routes, it is necessary to have admin rights. This guide describes how to grant admin rights to a certain user.

It is only possible to grant an existing user admin rights. So first of all, you have to create a user account.

Local environment

To grant admin rights to a user on your local setup, please follow these steps:

  1. Start local mongodb instance with mongod
  2. Open Terminal in explorer-auth
  3. run the following command with the user's email address: npm run createAdmin --email=example@mail.com --NODE_ENV=default

Docker environment

To grant admin rights to a user on your local docker setup, please follow these steps:

  1. Run docker ps to ensure that the containers are up and running
  2. SSH into authentication container with docker exec -it authentication bash
  3. run the following command with the user's email address: npm run createAdmin --email=example@mail.com

Production

To grant admin rights to a user on your production server, please follow these steps:

  1. SSH into your production server
  2. Run docker ps to ensure that the containers are up and running
  3. SSH into authentication container with docker exec -it authentication bash
  4. run the following command with the user's email address: npm run createAdmin --email=example@mail.com

Clone this wiki locally