Multiple instances on the same database possible? #3937

Closed
opened 2026-02-05 07:54:34 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @mfatfhg on GitHub (Jul 26, 2023).

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

Because its not possible to activate multiple authentication methods at the same time, I would like to workaround this issue.

Is it possible to run multiple instances on the same database?

Our main instance is using OIDC ( AUTH_METHOD=oidc ).

Can we setup a second instance which is configured to AUTH_METHOD=standard with the same database like the OIDC instance?

We would like to ensure that the bookstack instance will remain accessible when OIDC provider is not available.

Will there be any problems when we are using multiple instances ?

Edit: And we would like to use the second instance to test roles and rights with local db users.

Exact BookStack Version

v23.06.2

Log Content

Not needed

PHP Version

8.1.2

Hosting Environment

Ubuntu 22.04 VM
bookstack installed with automated installation script

Originally created by @mfatfhg on GitHub (Jul 26, 2023). ### Attempted Debugging - [X] I have read the debugging page ### Searched GitHub Issues - [X] I have searched GitHub for the issue. ### Describe the Scenario Because its not possible to activate multiple authentication methods at the same time, I would like to workaround this issue. Is it possible to run multiple instances on the same database? Our main instance is using OIDC ( AUTH_METHOD=oidc ). Can we setup a second instance which is configured to AUTH_METHOD=standard with the same database like the OIDC instance? We would like to ensure that the bookstack instance will remain accessible when OIDC provider is not available. Will there be any problems when we are using multiple instances ? Edit: And we would like to use the second instance to test roles and rights with local db users. ### Exact BookStack Version v23.06.2 ### Log Content Not needed ### PHP Version 8.1.2 ### Hosting Environment Ubuntu 22.04 VM bookstack installed with automated installation script
OVERLORD added the 🐕 Support label 2026-02-05 07:54:34 +03:00
Author
Owner

@ssddanbrown commented on GitHub (Jul 26, 2023):

It's technically possible to run multiple instances on the same DB but it's not something I'd consider supported, nor something I'd recommend, especially if they're on different URLs.

With some hackery and PHP knowledge it might be possible to do something using our logical theme system to hook in early and change auth method depending on details in the request (Param, cookie, IP, query param etc...) but some additional hackery may be needed to carry that through the auth process.

Again, not really something that's supported or advised, not something I've validated. It's just an idea. Might be logical issues and edge cases when dynamically jumping between auth systems like that.

You could also maybe control the AUTH_METHOD via environment variable from external system (proxy, webserver) but again would need some persistence, at least to carry you through the auth cycle.

@ssddanbrown commented on GitHub (Jul 26, 2023): It's technically possible to run multiple instances on the same DB but it's not something I'd consider supported, nor something I'd recommend, especially if they're on different URLs. With some hackery and PHP knowledge it might be possible to do something using our [logical theme system](https://github.com/BookStackApp/BookStack/blob/development/dev/docs/logical-theme-system.md) to hook in early and change auth method depending on details in the request (Param, cookie, IP, query param etc...) but some additional hackery may be needed to carry that through the auth process. Again, not really something that's supported or advised, not something I've validated. It's just an idea. Might be logical issues and edge cases when dynamically jumping between auth systems like that. You could also maybe control the `AUTH_METHOD` via environment variable from external system (proxy, webserver) but again would need some persistence, at least to carry you through the auth cycle.
Author
Owner

@ssddanbrown commented on GitHub (Aug 2, 2023):

Since the question has been answered, and there's been no further follow up, I'll close this off.

@ssddanbrown commented on GitHub (Aug 2, 2023): Since the question has been answered, and there's been no further follow up, I'll close this off.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#3937