- Node (v8 LTS).
- Make sure you install from the Node website link.
- npm (should come installed with Node).
- Git
- Curl
- Tmux
- Unzip
$ npm update
-
If you are using a server provided by lbry, we will have caddy installed already.
-
If you are using your own server, make sure to have a web server installed and set up to serve from port 3000.
-
Nginx instructions (recommended).
-
Insert directions for certbot before installing.
-
Install Nginx.
-
Create a config file called
spee.ch
in /etc/nginx/sites-available -
see example: config file.
-
Rename all mentions of sub.domain.com with your subdomain name.
-
Run this command to link the sites-available.
$ ln -s /etc/nginx/sites-available/speech /etc/nginx/sites-enabled/speech
-
Restart Nginx.
$ sudo service nginx restart
-
Try visiting your website.
- If Nginx is working, you should get a 502 error because there is nothing running on 3000 yet.
- If you get the default Nginx greeting, you have not properly configured it to serve from port 3000.
- You can find logs in /var/log/nginx/ too.
-
Caddy tutorial: https://caddyserver.com/tutorial
-
-
Install MySql
-
Create user root. * Note: We are going to access mysql as root for this setup, but you may want to create a separate user in the future.
- Keep your password somewhere handy!
-
Create a database called lbry and make sure you can use it.
`CREATE DATABASE lbry;` `$ USE lbry;` `$ exit; (or press ‘ctl + d’)`
-
Try logging into mysql.
`$ mysql -u username -p`
-
If you are using a LBRY server, your password is the one provided for ssh.
- Note: If it fails, try using
sudo
.
- Note: If it fails, try using
##2. Install & Run the LBRY Daemon
note: if you have a server from LBRY, lbrynet is already installed, you can skip to 2.4.
$ wget --quiet -O ~/latest_daemon.zip https://lbry.com/get/lbrynet.linux.zip
$ unzip -o -u "~/latest_daemon.zip"
$ tmux
$ ./lbrynet-daemon
press ctrl
+ b
then d
to detach
Get a list of your wallets:
$ ~/lbrynet-cli wallet_list
Send some LBC to one of the addresses from your wallet.
Check your balance again:
$ ~/lbrynet-cli wallet_balance
You should have LBC!
directions: here
$ git clone https://github.com/lbryio/www.spee.ch.git
Change directory into your site’s folder
$ cd <name-of-your-site>` or `$ cd www.spee.ch
Install dependencies
$ npm install
Run the config cli:
$ npm run configure
Check your site configs
$ cd /site/config/
$ nano siteConfig.json
Run the below command to transpile, build, and start your server.
$ npm run start
Note: if you had to use sudo
to login to mysql above, you may have issues with this step.
Spee.ch should now be running !
Visit your site in the browser. Try publishing an image!
Install PM2
$ sudo npm i -g pm2
From inside your project’s folder, start your server with PM2.
$ pm2 start server.js
Visit your site and see if it is running!