r/BookStack • u/jeffshead • Sep 13 '26
Two instances, same Docker server
This may be a Docker question in general, but I would like to know if I can run two Docker containers, for two separate Bookstack instances, on the same server. If so, what do I need to do to get this working?
I already have a Linux server setup with Docker Compose, Portainer, Nginx Proxy Manager, a working Bookstack instance and several other containers for other apps.
I'm concerned that attempting to add another Bookstack instance will be problematic and could damage my currently working setup. I need this second Bookstack instance because I have a backup of a previous Bookstack wiki site that I built. Unfortunately, I took the site down so that server is no longer accessible and now I need access to it. I did however make a backup and I want to restore it to a new Bookstack instance.
Is it just a matter of using different ports, container names, database name, and volume names in the Portainer stack of the second Bookstack instance? What specifically do I need to edit/make unique so that I don't have to touch my current working Bookstack instance? Does the APP_KEY need to be the same or unique?
UPDATE: Got it working. You have to makes sure ALL of the following are unique:
- Service names
- Container names
- volumes
- ports
The other issue that I ran into was that I needed to import/migrate my backup onto the second Bookstack instance. The original server hosting that instance of Bookstack supported IPv6. The server that I restored the backup onto did not. I had to comment out the lines in the /config/nginx/site-confs/default.conf file that made Nginx listen on IPv6 (e.g., #listen [::]:80 default_server;)
View all comments
Show parent comment
1
u/jeffshead Sep 13 '26 edited Sep 13 '26
Not sure what's happening but neither site loads properly. I have kept the default ports (6875:80) for the original instance and changed the ports for the second instance (6876:80).
On the second instance, I changed the container_names and mapped the volumes to a different directory.
Looks like something else needs to be edited. Getting several 500 Internal Server Errors. I've seen random things like pages not loading (404), missing CSS, can't login and also being redirected from one instance to the other on page load.
If I stop the newly added Bookstack stack in Portainer, the original site starts working again.