Skip to content

Instantly share code, notes, and snippets.

@benyanke
Created November 14, 2016 23:51
Show Gist options
  • Save benyanke/e6271c60977fba5458708c41df214cd4 to your computer and use it in GitHub Desktop.
Save benyanke/e6271c60977fba5458708c41df214cd4 to your computer and use it in GitHub Desktop.
LBRY Server Setup - Setup script to install LBRY on a headless debian or ubuntu server
#!/bin/bash
#################################
# Written by Ben Yanke
# https://github.com/benyanke
#
# This script sets up the lbry daemon
# for use on a headless server.
#
# Currently tested on Ubuntu Server 16.04.1 LTS
# Likely to work on other ubuntu and debian-based OSes.
#################################
# Root check
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Get the currently running user (normal user vars will return "root")
user=${SUDO_USER:-$(whoami)}
userHome=$(eval echo "~$user")
installPath="$userHome/lbryInfo"
initDFile="/etc/init.d/lbry"
# Change this to update DEB file
debFile="http://lbry.io/get/lbry.deb"
mkdir -p $installPath
wget $debFile -O $installPath/inst.deb
# Install dependencies
apt-get update
apt-get install libgmp3-dev build-essential python2.7 python2.7-dev python-pip git python-virtualenv libssl-dev libffi-dev -y
# Install package
dpkg -i $installPath/inst.deb
apt-get install -f -y
# Add to startup
touch $initDFile
chmod +x $initDFile
echo "#!/bin/bash" >> $initDFile
echo "" >> $initDFile
echo $(which lbrynet-daemon) " &" >> $initDFile
# Run now
lbrynet-daemon &
@shellbufton
Copy link

i am bitch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment