Article DetailsDetailsHelp DetailsUnderstand initial database primaries and secondaries count When installing Neo4j for the first time, if there is no database created and has never been a database created or even a cluster started. In other words, not even the system database yet exists. you can define what will happen upon fist startup by setting the following in the “neo4j.conf" files initial.dbms.default_database — the name of the database. initial.dbms.default_primaries_count — the number of primaries requested for the default database. initial.dbms.default_secondaries_count — the number of secondaries requested for the default initial.dbms.automatically_enable_free_servers — Automatically enable free servers. Once the cluster is started, as part of the initialisation process (bootstrap) the “system” database is created. This is populated with the entries above. Also the default database will be created with the defined number of primaries and secondaries.eg : (within the system database) { "identity": 1, "labels": [ "TopologyGraphSettings" ], "properties": { "default_allocation_hint_weight": 10, "default_number_of_secondaries": 1, "default_database": "neo4j", "default_number_of_primaries": 2, "default_database_created": true, "auto_enable_free_servers": false, "create_default_database": true, "initial_instances_enabled": true }, "elementId": "4:5817e5ba-383c-4bb3-b0d6-e7fa37adb473:1" } From this point onwards, any new database created will read the system database for its starting Topology.The entries in the “neo4j.conf" file will no longer be used. it would not matter if they are changed, they will not update the system database entries and as such have no further use.From the Documentation If TOPOLOGY is not specified, the database is created according to initial.dbms.default_primaries_count and initial.dbms.default_secondaries_count specified in neo4j.conf. After cluster startup, these values can be overwritten using the dbms.setDefaultAllocationNumbers procedure. Therefore, the next step is to review and change as needed the entries in the system database which hold the topology settings. Since the system database can not directly be updated by Neo4j users, this is done by using the following two procedure calls.View current settings: dbms.showTopologyGraphConfig call dbms.showTopologyGraphConfig() Amend settings: dbms.setDefaultAllocationNumbers call dbms.setDefaultAllocationNumbers(2,1) Notes Both of these calls need to be run against the system database, as that is where the settings are stored.The call to dbms.setDefaultAllocationNumbers() will report no change! please run dbms.showTopologyGraphConfig() again to validate.Since the “system” database is replicated, all cluster members will be updated when calling dbms.setDefaultAllocationNumbers() it is possible to automatically enable free servers by setting the initial.dbms.automatically_enable_free_servers to true. This can be changed after startup using the dbms.cluster.setAutomaticallyEnableFreeServers procedure.If initial.dbms.automatically_enable_free_servers is left at it’s default of false, it’s likely the number of primaries and secondaries created for the default database initial.dbms.default_database may well be less than the number defined by initial.dbms.default_primaries_count and initial.dbms.default_secondaries_count InformationTitleUnderstand initial database primaries and secondaries countArticle Created Date3/25/2025, 4:50 PMURL NameUnderstand-Initial-initial-default-primaries-countLast Modified Date9/22/2025, 3:40 PM