So you decided want to run your store on a spare computer or VPS. This guide will help you setup your own store that you can connect to remotely.

For this tutorial I will be using a Debian-based system (Ubuntu 19.04) but these packages are available for all major linux distros.

1) First things first, you need to install gcc and git

1
2
3
4
5

sudo apt-get update

sudo apt-get install build-essential git -y

2) The second step will be to install and setup Golang v1.11.5

1
2
3
4
5
6
7
8
9
10
11
12
wget https://storage.googleapis.com/golang/go1.11.5.linux-amd64.tar.gz

sudo tar -zxvf go1.11.5.linux-amd64.tar.gz -C /usr/local/

mkdir $HOME/go

echo "export GOPATH=$HOME/go" >> .profile

echo "export PATH=$PATH:/usr/local/go/bin" >> .profile

source ~/.profile

3) Next you will install and initialize the Openbazaar daemon

1
2
3
4
5
go get github.com/OpenBazaar/openbazaar-go

cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go

go run openbazaard.go init

4) Now you will have to set your API credentials, make sure to save these. You will use these credentials to connect to your instance

1
go run openbazaard.go setapicreds

5) After that we will set the server to be accessible to outside connections

1
2
3
cd $HOME/.openbazaar

sed -i -- 's/127.0.0.1/0.0.0.0/g' config

6) So let’s start the openbazaar-go server and run it in the background

1
2
3
cd $GOPATH/src/github.com/OpenBazaar/openbazaar-go

go run openbazaard.go start &

That’s it! You are now self-hosted and your server is now remotely accessible on port 4002.

To generate an SSL certificate for your server click here

If you would like help connecting to your OpenBazaar instance click here