Skip to content

Instantly share code, notes, and snippets.

@brettclanton001
Last active May 1, 2019 20:13
Show Gist options
  • Save brettclanton001/fc406fc1c2ad6a8db0e3 to your computer and use it in GitHub Desktop.
Save brettclanton001/fc406fc1c2ad6a8db0e3 to your computer and use it in GitHub Desktop.
Setting up Open Bazaar on a Raspberry Pi Server - On Ubuntu and Raspbian

Step One A - Server Setup : Raspbian Jessie

These steps will prepare your Raspberry Pi / Raspbian server for Open Bazaar.

Boot the system

Downloaded RASPBIAN JESSIE LITE : https://www.raspberrypi.org/downloads/raspbian/

  • Install the .img file on an SD card
  • Boot the Raspberry Pi from SD card
  • Login:
    • user: pi
    • pass: raspberry

Use the nifty config tool

sudo raspi-config
  • Expand File System
  • Change User Password
    • Change this to something only you know
  • Internationalization Options
    • Change Keyboard Layout
    • Generic 105-key (Intl) PC
    • English (US) # important for users in USA
    • continue with other default options
  • Finish
  • Reboot: Yes

Step One B - Server Setup : Ubuntu 14.04

These steps will prepare your Raspberry Pi / Ubuntu server for Open Bazaar.

Format an SD card with the ubuntu image

https://wiki.ubuntu.com/ARM/RaspberryPi

Adjust the partition to fill the SD card

( as described in https://wiki.ubuntu.com/ARM/RaspberryPi )

# boot the Pi
# login: ubuntu password: ubuntu
sudo fdisk /dev/mmcblk0
d [enter]
2 [enter]
n [enter]
p [enter]
2 [enter]
[enter]
[enter]
w [enter]
sudo reboot
# system reboots
# you log back in
sudo resize2fs /dev/mmcblk0p2

Set a new password

It is never a good idea to run a server with a default password.

Run this command and follow the instructions:

passwd

Prepare the server for SSH connection

This will be handy for the rest of the setup.

sudo apt-get install -y openssh-server

Step Three - Install and Run Open Bazaar

Install the Server Software

Many of these steps will take a very long time, be patient. It's a lot to download and install, but once it's done, it's smooth sailing.

sudo apt-get update
sudo apt-get install -y git python-dev libffi-dev libssl-dev
sudo easy_install pip

git clone https://github.com/OpenBazaar/OpenBazaar-Server.git
cd OpenBazaar-Server/

sudo pip install -r requirements.txt
sudo pip install -r test_requirements.txt

Run the server

python openbazaard.py start -t -d -r 0.0.0.0

Stop the server

It's preferred that this is done from the client UI:

Account Icon >> Admin Panel >> System >> Turn Server Off

Step Four - Configure the client to communicate with the server

Run the client on your desktop / laptop computer.

https://github.com/OpenBazaar/OpenBazaar-Client

These instructions do not cover the client setup, perhaps they will later.

Let the loading / connection time out.

It's trying to connect to a "local" server. And this server is not local, it's on a separate computer ( your raspberry pi ). It should be on the same network though.

Remember the IP address you used for SSH?

Earlier, you SSH'ed into the raspberry pi. To do this you needed it's IP address, you're going to need that now to setup the connection from the client.

Change the server connection config to meet your needs.

Now that the localhost connection has timed out.

  • Click the avatar at the top right of the app.
  • Click 'Admin Panel'
  • Change Server
    • Enter in the full path for the server api, using the IP address you used earlier. Ex: http://192.168.1.148:18469/api/v1/
  • Close the Admin Panel to establish connection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment