Basic server to download and serve anime
Below is a complete list of commands and settings you can run to get this server up and running on a server with OpenLiteSpeed. Note this has been tested on a Vultr instance using the OpenLiteSpeed CentOS 7 system image, so some instructions will not work on other operating systems.
cd /usr/local/lsws/Example/
rm -rf cgi-bin fcgi-bin
sudo yum remove git*
sudo yum -y install https://packages.endpoint.com/rhel/7/os/x86_64/endpoint-repo-1.7-1.x86_64.rpm
sudo yum install git
(Hit y to accept download)
git clone https://github.com/AnirudhRahul/Anime-Server.git
curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
sudo yum install -y nodejs
node -v
cd Anime-Server/
npm install
npm install pm2 -g
pm2 --version
sudo yum install epel-release
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm
sudo yum install ffmpeg ffmpeg-devel
ffmpeg -version
Make sure to add a .env file with the following attributes, in the torrent/object-storage/
dir:
AWS_accessKeyId=SECRET
AWS_secretAccessKey=SECRET
AWS_Endpoint=s3.us-east-2.wasabisys.com
AWS_Region=us-east-2
AWS_Bucket=aniserve-dev(can pick any bucket name just make sure it exists)
pm2 start ecosystem.config.js
pm2 log
https://s8.gifyu.com/images/vhost_general.png
https://s8.gifyu.com/images/vhost_external_app.png
https://s8.gifyu.com/images/vhost_context.png
https://s8.gifyu.com/images/vhost_context_exapanded.png
https://s8.gifyu.com/images/vhost_app_routing.png
Go to Server Configuration > Tuning
https://s8.gifyu.com/images/server_tuning.png
Server Configuration > General
Click on conf/mime.properties
Add the following MIME types
Suffixes | Type |
---|---|
wasm | application/wasm |
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install certbot
mkdir /usr/local/lsws/Example/.well-known/
-
certbot certonly
-
Select option 2
-
Enter your email
-
Press
A
to agree -
Press Y or N if you want to get additional emails
-
Enter your domain name(required to setup ssl)
-
Enter
/usr/local/lsws/Example/
as your webroot
Enter ssl certificate into virtual host config
https://s8.gifyu.com/images/vhost_ssl.png
Private Key File: /etc/letsencrypt/live/DOMAIN_NAME/privkey.pem
Certificate File: /etc/letsencrypt/live/DOMAIN_NAME/fullchain.pem
Select yes for chained certificate
Test to see if https works, by going to https://{DOMAIN_NAME}/