# How to hold multiple neo4j databases on local machine?

**URL:** <https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964>\
**Category:** Neo4j Graph Platform\
**Created:** [May 1, 2020, 6:23pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964 "2020-05-01T18:23:22Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![lingvisa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lingvisa/32/8150_2.png) [@lingvisa](https://community.neo4j.com/u/lingvisa)\
**Post date:** [May 1, 2020, 6:23pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/1 "2020-05-01T18:23:22Z")

</div>

For example, I have neo4j Desktop running on my machine that can be accessed by:  
`http://localhost:7474/browser`

This is the project named 'Project' by default, and the database is named 'Graph' by default.

For testing, I want to create another project named 'Project 1' and the database is named 'Graph' be default again. Now , in access the two databases, how to specify which database that I want to connect in browser?  
`http://localhost:7474/browser`

---

<div class="post-metadata">

**Author:** ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)\
**Post date:** [May 1, 2020, 6:28pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/2 "2020-05-01T18:28:02Z")

</div>

Just a slight terminology fix, Neo4j Desktop allows creation of multiple dbms, not databases. Only one can be run at a single time.

If you want to use a single dbms that allows creation and usage of multiple databases simultaneously, then you'll need to launch an instance for 4.0.x from Neo4j Desktop, then switch to the system db and create your other databases:

> **[Managing Multiple Databases in Neo4j - Developer Guides](https://neo4j.com/developer/manage-multiple-databases/)**
>
> In this guide, we will walk through how to manage multiple database within the Neo4j DBMS.

---

<div class="post-metadata">

**Author:** ![lingvisa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lingvisa/32/8150_2.png) [@lingvisa](https://community.neo4j.com/u/lingvisa)\
**Post date:** [May 1, 2020, 8:52pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/3 "2020-05-01T20:52:10Z")

</div>

To make it easier, can I install another neo4j instance, which is has nothing to the existing neo4j installation? In such a case, how to connect the two different instances on the same machine? For example, use another port different from '7474'?

[http://localhost:7474/browser](http://localhost:7474/browser)

My database version is 3.5.2

---

<div class="post-metadata">

**Author:** ![lingvisa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lingvisa/32/8150_2.png) [@lingvisa](https://community.neo4j.com/u/lingvisa)\
**Post date:** [May 1, 2020, 10:13pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/4 "2020-05-01T22:13:27Z")

</div>

I don't use Neo4j Desktop. The installation is the tar file which I installed on a remote linux.

---

<div class="post-metadata">

**Author:** ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)\
**Post date:** [May 1, 2020, 11:03pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/5 "2020-05-01T23:03:32Z")

</div>

You had mentioned Neo4j Desktop being used in your first post, but I guess you were referring to a remote connection to this instance?

Are we still talking about two instances on the same remote machine? Or are we talking about different instances on different remote machines?

---

<div class="post-metadata">

**Author:** ![lingvisa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lingvisa/32/8150_2.png) [@lingvisa](https://community.neo4j.com/u/lingvisa)\
**Post date:** [May 1, 2020, 11:40pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/6 "2020-05-01T23:40:55Z")

</div>

Sorry about that. Let's just talk about the possibility of having two Neo4j installations on the same local machine so that I can create two different graph. Hopefully I can use two different ports to refer to each?

OR, the possibility of two different DBMSes on the same neo4j installation so that I can create two different databases. Again on the same local machine.

In both cases, I haven't upgraded to 4.0 version. 3.5.17 only.

---

<div class="post-metadata">

**Author:** ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)\
**Post date:** [May 2, 2020, 12:10am UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/7 "2020-05-02T00:10:11Z")

</div>

Yes, you'll need to change the ports of the other instances in their neo4j.conf so as not to conflict.

`dbms.connector.bolt.listen_address`

`dbms.connector.http.listen_address`

`dbms.connector.https.listen_address`

---

<div class="post-metadata">

**Author:** ![lingvisa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lingvisa/32/8150_2.png) [@lingvisa](https://community.neo4j.com/u/lingvisa)\
**Post date:** [May 2, 2020, 1:00am UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/8 "2020-05-02T01:00:53Z")

</div>

That's great to know and thanks.

---

<div class="post-metadata">

**Author:** ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)\
**Post date:** [May 2, 2020, 1:02am UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/9 "2020-05-02T01:02:57Z")

</div>

Also make sure you're careful about how you set your heap and pagecache memory settings, since both instances are sharing the same hardware.

---

<div class="post-metadata">

**Author:** ![lingvisa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lingvisa/32/8150_2.png) [@lingvisa](https://community.neo4j.com/u/lingvisa)\
**Post date:** [May 3, 2020, 4:40am UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/10 "2020-05-03T04:40:24Z")

</div>

It's strange that I downloaded the 3.5.17 tar file to my mac, untar it and changed the port configs in the conf/ directory. Then I went to the bin/ and execute:

```auto
cd neo4j-community-3.5.17/bin
./neo4j console

```

It doesn't really execute this version of neo4j, but it still executes my desktop version of neo4j, which is 3.5.12, which is installed in another directory:

`/Users/min/Library/Application Support/Neo4j Desktop/Application/neo4jDatabases/database-b719f648-a8e5-4a16-a1af-8174f09ea344/installation-3.5.12`

I didn't set a $NEO4J\_HOME/bin and how it points to that executable?

---

<div class="post-metadata">

**Author:** ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)\
**Post date:** [May 4, 2020, 8:29pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/11 "2020-05-04T20:29:49Z")

</div>

Is there any particular reason why you're using the console? You would normally start Neo4j with `./neo4j start`, from the bin directory of the instance.

---

<div class="post-metadata">

**Author:** ![lingvisa](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/lingvisa/32/8150_2.png) [@lingvisa](https://community.neo4j.com/u/lingvisa)\
**Post date:** [May 4, 2020, 10:08pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/12 "2020-05-04T22:08:47Z")

</div>

I can use the start, but I got the same result. There may be something weird. But for this particular problem, I found that I can create another project in desktop, create a new graph in the new project, and switch to this new project to work on the new graph. The original graph in old project remains intact, which is what i want for testing.

---

<div class="post-metadata">

**Author:** ![pseudorandomcoder](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/pseudorandomcoder/32/11148_2.png) [@pseudorandomcoder](https://community.neo4j.com/u/pseudorandomcoder)\
**Post date:** [May 5, 2020, 3:04pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/13 "2020-05-05T15:04:03Z")

</div>

This seems like a great situation to use docker, but I only spin up one container at a time. [How-To: Run Neo4j in Docker - Developer Guides](https://neo4j.com/developer/docker-run-neo4j/)

---

<div class="post-metadata">

**Author:** ![steven4320555](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/steven4320555/32/10240_2.png) [@steven4320555](https://community.neo4j.com/u/steven4320555)\
**Post date:** [May 6, 2020, 8:22am UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/14 "2020-05-06T08:22:05Z")

</div>

Hi @lingvisa  
I am curious to know how you are getting on with this?

To my knowledge, and have double checked from the link @andrew_bowman shared. You will have to use 4. 0 above version to run multiple databases, in a single RDBMS.

' Managing Multiple Databases in Neo4j

Goals

> In this guide, we will walk through how to manage multiple database within the Neo4j DBMS.

Prerequisites

> Please have [Neo4j](https://neo4j.com/download) (version 4.0 or later) downloaded and installed.'

I am also interested in setting this up, as in the past (my little experience on windows local host), two related graph database can't be accessed at the same time. One has to be closed before the other one is open.

Hope I am not misleading,  
Steven

---

<div class="post-metadata">

**Author:** ![tms](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/tms/32/7142_2.png) [@tms](https://community.neo4j.com/u/tms)\
**Post date:** [May 8, 2020, 6:36pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/15 "2020-05-08T18:36:39Z")

</div>

I'm also new to Neo4J. I use the "community edition". My reading of the documentation is that only one DBMS at a time is supported (by the community edition). Am I missing something?

I simulate the behavior I want by stopping the instance, replacing the contents of the files it uses (in `/var/lib/neo4j`) and restarting (I run on a CentOS 7 platform).

It would be nice if there was a more graceful way to accomplish this.

---

<div class="post-metadata">

**Author:** ![andrew\_bowman](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/andrew_bowman/32/73_2.png) [@andrew\_bowman](https://community.neo4j.com/u/andrew_bowman)\
**Post date:** [May 8, 2020, 11:56pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/16 "2020-05-08T23:56:36Z")

</div>

In 4.0.x community edition, per dbms, you will only have access to the neo4j db, and the system db (which is reserved for admin/security and not available to be used as a general db).

If you're running Neo4j 3.5.x or below, you can use change the neo4j.conf config property [dbms.active\_database](https://neo4j.com/docs/operations-manual/3.5/reference/configuration-settings/#config_dbms.active_database) to change which database the dbms will use, this may be easier for you than replacing file contents.

It will still require a shutdown before you change the config property though.

---

<div class="post-metadata">

**Author:** ![oumamaexol](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/oumamaexol/32/31078_2.png) [@oumamaexol](https://community.neo4j.com/u/oumamaexol)\
**Post date:** [March 24, 2024, 9:51pm UTC](https://community.neo4j.com/t/how-to-hold-multiple-neo4j-databases-on-local-machine/17964/17 "2024-03-24T21:51:14Z")

</div>

do you find a solution?
