Skip to main content

Google authentication initial configuring

Follow these steps:

Step 1: Connect to Your EC2 Instance

1. Go to the AWS ConsoleEC2.

2. Locate your BookStack instance (named something like bookstack-dev-asg-instance).

3. Use Systems Manager to connect to the instance. In new window appear, enter in prompt: sudo su - ec2-user and hit enter

sh-5.2$ sudo su - ec2-user

Last login: Wed Feb 26 07:36:32 UTC 2025 on pts/1

Welcome to your EC2 instance!

-----------------------------

Operating System: GNU/Linux

Hostname: ip-172-31-42-121.ec2.internal

Current Date and Time: Wed Feb 26 08:33:35 UTC 2025
Step 2: Modify the Authentication Method

In the .env file, change the authentication method from OIDC to Standard by modifying or adding the following lines:

nano bookstack/.env
#AUTH_METHOD="oidc" # comment in or edit exist line
AUTH_METHOD="standard" # or add the new one with value =standard 

Save and exit the file.

Step 3: Restart BookStack

Run the following command to restart the BookStack service:

docker-compose --env-file bookstack/.env -f bookstack/docker-compose.yml up -d

# After a few seconds, you should see:
[+] Running 1/1
✔ Container bookstack  Started   
Step 4: Log in as Admin

Now, access BookStack through your AppUrl and log in using the default credentials:

Email: admin@admin.com

Password: password

Step 5: Enable User Registration

1. Click on Settings in the top navigation bar.
Bookstack settings.png

2. Under Categories, select Registration.

3. Check Enable Registration.

4. In Default User Role After Registration, select Admin (this will allow newly registered users to have admin rights).

5. Click Save Settings.
Bookstack registration.png

Step 6: Switch Back to OIDC Authentication

Now that user registration is enabled, repeat Step 2, but this time set the authentication method back to OIDC:

AUTH_METHOD="oidc"

Save the file and restart BookStack again:

docker-compose --env-file bookstack/.env -f bookstack/docker-compose.yml up -d

[+] Running 1/1

✔ Container bookstack  Started

Important Note! Don’t worry! If something goes wrong, the Auto Scaling Group will detect the issue and recreate the instance with default settings.