Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/multipleInstances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Install and Run Multiple Servers
=========================

### Init the New Data Directory

In your server directory, use the datadir option to init the server with a new data directory. This will create the data directory if it doesn't already exist, and generate all the files needed to run the server from that directory.

Example:
`go run openbazaard.go init -d=c://Users/Username/OpenBazaar2.0StoreB`

### Change the Ports in the Config File

In the new data directory, open the config file change the default 4001 and 9005 ports in the Addresses object, and save the file. You can change them to any unused, valid port number.

Example:
```
"Addresses": {
"API": "",
"Gateway": "/ip4/127.0.0.1/tcp/4102",
"Swarm": [
"/ip4/0.0.0.0/tcp/4101",
"/ip6/::/tcp/4101",
"/ip4/0.0.0.0/tcp/9105/ws",
"/ip6/::/tcp/9105/ws"
]
},
```

### Run the Server

You can now run an instance of the server from the new data directory with the daradir option. Multiple intances can be run simultaneously, one for each data directory you've created.

Example:
`go run openbazaard.go start -d=c://Users/Username/OpenBazaar2.0StoreB`