Project

General

Profile

Setting Up Bitwarden Admin Portal » History » Version 3

Gareth Eaton, 08/26/2023 12:44 PM

1 1 Gareth Eaton
h1. Setting Up Bitwarden Admin Portal
2
3
4
1. Create the necessary directory:
5
6
Open a terminal on your server and execute:
7
8
9
   sudo mkdir /opt/bitwarden_data/env
10
11
12
2. Create and edit the `global.override.env` file:
13
14
Use the following command to open the file for editing:
15
16
   nano /opt/bitwarden_data/env/global.override.env
17
18
19
Add the following line to the file:
20
21
   adminSettings__admins=john@example.com,bill@gmail.com,tom@example.com
22
23
24
Save the file and exit the text editor.
25
26
3. Generate an Admin Token:
27
28
Generate a random Admin Token using the following command:
29
30
31
   openssl rand -base64 40
32
33
Copy the generated token for later use.
34
35
4. Edit the Docker Compose configuration:
36
37
Open the `docker-compose.yml` file in a text editor:
38
39
40
   nano /opt/bitwarden/docker-compose.yml
41
42
43
5. Configure the Admin Token:
44
45
In the `bitwarden` service section, add the `ADMIN_TOKEN` environment variable and paste the previously generated token as the value:
46
47
   services:
48
     ....
49
50
<pre>
51
    # ... other environment variables ...
52
         - ADMIN_TOKEN=pasteGeneratedTokenHere   # Add this line for Admin Token
53
       volumes:
54
         - /opt/bitwarden_data:/data
55 2 Gareth Eaton
         - /opt/bitwarden_data/env/global.override.env:/bwdata/env/global.override.env # Add this line for Admin Panle
56 1 Gareth Eaton
   # Other configuration options for the Bitwarden service
57
</pre>
58
59
60
Save the file and exit the text editor.
61
62
6. Restart Containers:
63
64
Apply the changes by restarting the containers:
65
66
   docker-compose down
67
   docker-compose up -d
68
69
70
7. Access the Admin Portal:
71
72 3 Gareth Eaton
Open a web browser and go to your Bitwarden instance's URL followed by `/admin`. For example, `https://bitwarden.eximple.com/admin`.
73 1 Gareth Eaton
74 3 Gareth Eaton
Use the previously generated `ADMIN_TOKEN` to log in to the Admin Portal.
75 1 Gareth Eaton
76
By following these steps, you will successfully enable and configure the Bitwarden Admin Portal using the provided Admin Token.