Skip to main content
Documentation & User Guides | Fotoware

Setting the MongoDB instance that FotoWeb uses

MongoDB settings

FotoWeb uses MongoDB to store metadata about the assets in the Fotoware system. By default it uses a built-in MongoDB instance running on the same instance as the FotoWeb server. However, FotoWeb can also be configured to connect to a MongoDB replica set, which offers redundancy and high availability.

When using a MongoDB replica set you need to define the replica set name and the MongoDB hosts in the FotoWeb configuration. To do so, open the FotoWeb settings app.

Go to Settings > Database.

MongoDB replica set configuration in FotoWeb

By default, FotoWeb is set up to connect to the MongoDB instance that came with the installer and runs on the local host. This is illustrated in the screenshot above. To change this to a replica set, select Connect to a MongoDB replica set and enter the replica set name. Then enter the MongoDB hosts, using the Add host button to create additional entries.

NoteWhen FotoWeb runs using its own bundled MongoDB instance, the MongoDB server MUST be set to localhost, not the server's actual hostname. Otherwise, FotoWeb will assume that it has been configured to use an external MongoDB instance and is then no longer responsible for starting and stopping the MongoDB instance itself. For more information, see here.