Project

General

Profile

Setting Up Bitwarden Admin Portal » History » Revision 2

Revision 1 (Gareth Eaton, 08/26/2023 12:43 PM) → Revision 2/3 (Gareth Eaton, 08/26/2023 12:43 PM)

h1. Setting Up Bitwarden Admin Portal 


 1. Create the necessary directory: 

 Open a terminal on your server and execute: 


    sudo mkdir /opt/bitwarden_data/env 


 2. Create and edit the `global.override.env` file: 

 Use the following command to open the file for editing: 

    nano /opt/bitwarden_data/env/global.override.env 


 Add the following line to the file: 

    [email protected],[email protected],[email protected] 


 Save the file and exit the text editor. 

 3. Generate an Admin Token: 

 Generate a random Admin Token using the following command: 


    openssl rand -base64 40 

 Copy the generated token for later use. 

 4. Edit the Docker Compose configuration: 

 Open the `docker-compose.yml` file in a text editor: 


    nano /opt/bitwarden/docker-compose.yml 


 5. Configure the Admin Token: 

 In the `bitwarden` service section, add the `ADMIN_TOKEN` environment variable and paste the previously generated token as the value: 

    services: 
      .... 

 <pre> 
     # ... other environment variables ... 
          - ADMIN_TOKEN=pasteGeneratedTokenHere     # Add this line for Admin Token 
        volumes: 
          - /opt/bitwarden_data:/data 
          - /opt/bitwarden_data/env/global.override.env:/bwdata/env/global.override.env # Add this line for Admin Panle 
    # Other configuration options for the Bitwarden service 
 </pre> 


 Save the file and exit the text editor. 

 6. Restart Containers: 

 Apply the changes by restarting the containers: 

    docker-compose down 
    docker-compose up -d 


 7. Access the Admin Portal: 

    Open a web browser and go to your Bitwarden instance's URL followed by `/admin`. For example, `https://bitwarden.eximple.com/admin`. 

    Use the previously generated `ADMIN_TOKEN` to log in to the Admin Portal. 

 By following these steps, you will successfully enable and configure the Bitwarden Admin Portal using the provided Admin Token.