Create a VPS on Digital Ocean
Ensure that it is created with SSH access setup
Login as root
via ssh
Create a user
adduser yourusername
Add a password
Give user root access
visudo
Add yourusername ALL=(ALL:ALL) ALL
under root ALL=(ALL:ALL) ALL
Logout of the VPS and login as yourusername
ssh yourusername@ipaddress
You'll be prompted to type in your password this time
After you login, you'll be in the $HOME
directory (i.e. /home/yourusername/
)
Setup SSH access to yourusername
mkdir .ssh
chmod 700 .ssh
cd .ssh
nano authorized_keys
Paste in your RSA pubkey (example below)
chmod 600 authorized_keys
Harden the security of the VPS
Open the ssh config file as root
sudo -s
nano /etc/ssh/sshd_config
Change SSH port to something non-standard
Change Port 22
to Port insertnumberhere
Disable root
access:
Change PermitRootLogin yes
to PermitRootLogin no
Disable password access (SSH only as a non-root user):
Change ChallengeResponseAuthentication yes
to ChallengeResponseAuthentication no
Change PasswordAuthentication yes
to PasswordAuthentication no
Change UsePAM yes
to UsePAM no
Save (Ctrl-o) and exit (Ctrl-x)
Restart sshd
Run OpenBazaar
From $HOME
: cd OpenBazaar-Server
Modify the ob.cfg
to have your custom username and password
Remove #
in front of #USERNAME
and #PASSWORD
, and replace username
and password
with whatever you want
Run the server in daemon mode allowing access from any IP address: sudo python openbazaard.py start -da 0.0.0.0
Install Script for Ubuntu 16.04.1
#!/bin/bash
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install git build-essential libssl-dev libffi-dev python-dev openssl python-pip libsodium-dev autoconf libzmq-dev pkg-config libtool
sudo pip install cryptography
(cd /$HOME/; sudo git clone https://github.com/OpenBazaar/OpenBazaar-Server.git)
(cd /$HOME/OpenBazaar-Server; sudo pip install -r requirements.txt)