Files
stacks-puppet-node/docs/install-api.md
2017-04-09 16:13:15 -04:00

2.2 KiB

Blockstack API

Step-by-step instructions for deploying a Blockstack API node on Debian or Ubuntu are below.

$ sudo apt-get install -y python-pip memcached python-dev libmemcached-dev zlib1g-dev
$ sudo service memcached start
$ sudo pip install virtualenv
$ virtualenv api
$ git clone https://github.com/blockstack/blockstack-core.git
$ cd blockstack-core/
$ git checkout api
$ pip install -r api/requirements.txt
$ bin/blockstack api start
$ bin/blockstack-api

Search Subsystem

If you want to enable the search subsystem in your installation, you can follow the instructions here.

Nginx Deployment

For a production deployment we recommend using nginx and uwsgi:

  • Step 1: Install nginx and uWSGI:
$ sudo apt-get install -y nginx
$ sudo pip install uwsgi

/etc/nginx/sites-available/blockstack_api

and edit the paths depending on your home directory. You can test your nginx settings:

$ sudo nginx -t

/etc/systemd/system/blockstack_api.service

and edit the paths depending on your home directory.

$ git clone https://github.com/certbot/certbot.git
$ cd certbot/
$ ./certbot-auto --nginx -d <your_domain>

And copy the cert files to the path given in the nginx sites file earlier.

  • Step 5: Start nginx and the Blockstack API:
sudo systemctl restart blockstack_api
sudo systemctl restart nginx

If you run into any issues, please submit a Github issue and we'll update these instructions.