-
Notifications
You must be signed in to change notification settings - Fork 170
Raspberry Pi Install Raspbian
These steps will prepare your Raspberry Pi / Raspbian server for Open Bazaar.
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
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
Many of these steps are easier if you can copy and paste directly into the terminal. Making an SSH connection to your Raspberry Pi from your desktop makes this possible.
Here's some info on how to do it: https://www.raspberrypi.org/documentation/remote-access/ssh/unix.md
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 upgrade
sudo apt-get install -y git python-dev libffi-dev libssl-dev python-setuptools
sudo easy_install pip
git clone https://github.com/OpenBazaar/OpenBazaar-Server.git
cd OpenBazaar-Server/
Get on the latest stable release:
git checkout `git describe --tags`
Install python requirements for the server to run.
sudo pip install -r requirements.txt
Open the ob.cfg
file in your text editor of choice (nano
comes preinstalled on Raspbian):
nano ob.cfg
Then uncomment and set the USERNAME
and PASSWORD
variables to values of your choice, like so.
Before changes:
#USERNAME = username
#PASSWORD = password
After changes:
USERNAME = joebloggs
PASSWORD = aVeryLong&C()mpl1cat3d5tringThatW1llBeVeryHardToGue$5
python openbazaard.py start -d -a 0.0.0.0
It's preferred that this is done from the client UI:
"Account Icon" >> Settings >> Advanced >> Shut Down the Server
https://github.com/OpenBazaar/OpenBazaar-Client
These instructions do not cover the client setup, perhaps they will later.
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.
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.
Now that the localhost connection has timed out.
- Click the avatar at the top right of the app.
- Click
Settings
- Click
Advanced
- Click the
Change
button in the Server Settings row. - Set the IP to match that of your Raspberry Pi, and the username and password fields to match the values you entered into your
ob.cfg
file. - Click
Save Changes
You're probably going to want the Pi to maintain a static IP address on your home network. This will help with:
- SSHing into the pi in the future
- Connecting to the Open Bazaar Server from your client running on another computer
- Port forwarding settings on your router
To set a custom IP, simply open /etc/dhcpcd.conf
with the command sudo nano /etc/dhcpcd.conf
. Then add the following code to the bottom of the file:
# Static IP
interface eth0
static ip_address=192.168.1.7/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
I used 192.168.1.7
because it happened to be the IP address that my Pi was already assigned. I suggest you change it to match your assigned IP address. So if your Pi is currently 192.168.2.13
, then your code should be:
# Static IP
interface eth0
static ip_address=192.168.2.13/24
static routers=192.168.2.1
static domain_name_servers=192.168.2.1
You want your server to be dead simple. If the power goes out, or the Pi gets unplugged, you want powering it back up to start the server automatically. There are many ways to do this, but I believe this is the simplest way.
Add the startup command to your rc.local file. Open the file sudo nano /etc/rc.local
and add these lines before the exit 0
line.
# start OB server
su pi -c 'cd /home/pi/OpenBazaar-Server/ && python openbazaard.py start -d -a 0.0.0.0'
This assumes that the pi
user is the one that you've been using so far, and the Open Bazaar Server repo was cloned to your home directory. If you followed this guide for your setup, this should all be true.