This repository was archived by the owner on Feb 11, 2019. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Install from Source (Ubuntu)
chimerasoup edited this page Jan 20, 2019
·
18 revisions
- Open your favorite terminal app
- Run the
cdcommand to where you want to install stash. - Update your system by running
sudo apt-get update && apt-get dist-upgrade - Install an LTS release of Nodejs using the install instructions at https://nodejs.org/en/
- Install yarn (a node package manager) by using Yarn's install instructions at https://yarnpkg.com/lang/en/docs/install/#debian-stable
- Install stash's required dependencies by running
sudo apt-get install -y ffmpeg imagemagick libmagic-dev aria2 ruby ruby-dev ruby-bundler sqlite3 libsqlite3-dev nginx git dialog zlib1g-dev patch liblzma-dev - Install optional dependencies if you want to enable the metadata scraper:
sudo apt-get install -y chromium-chromedriver aria2 curl - Make a folder for the stash app and change to that folder by running
mkdir -p /home/app/stash && cd /home/app/stash(or whatever you want to call it). - Run the following command to download the server
git clone https://github.com/stashapp/stashserver.git - Run the following command to download the frontend
git clone https://github.com/stashapp/stashfrontend.git - Stop nginx by running
systemctl stop nginx - Remove the default nginx site by running
sudo rm /etc/nginx/sites-enabled/default - Copy the server nginx config by running
sudo cp stashserver/docker/nginx_proxy.conf /etc/nginx/sites-available/stash.conf - Enable the stashserver site in nginx
sudo ln -s /etc/nginx/sites-available/stash.conf /etc/nginx/sites-enabled/stash.conf - Modify the server nginx config by running
sudo sed -i 's#/home/app/stash/public#'pwd'/stashserver/public#' /etc/nginx/sites-enabled/stash.conf - Copy the frontend nginx config by running
sudo cp stashserver/docker/nginx_frontend.conf /etc/nginx/sites-enabled/stash_frontend.conf - Enable the frontend site in nginx
sudo ln -s /etc/nginx/sites-available/stash_frontend.conf /etc/nginx/sites-enabled/stash_frontend.conf - Modify the frontend nginx config by running:
sudo sed -i 's#/home/app/frontend#'pwd'/stashfrontend/dist#' /etc/nginx/sites-enabled/stash_frontend.conf - Change to the server directory:
cd stashserver - Make sure your gem installer works ok
gem install bundler - Install the gems with:
bundle install - Make a file called
application.ymllocated in thestashserver/configfolder and edit the paths as necessary. Here is an example (change the paths where it makes sense for you)
# The location of your videos and zipped pics (galleries).
stash_directory: '/path/to/your/videos/and/pics'
# The location metadata should be exported to, previews, etc.
stash_metadata_directory: '/home/app/stash/metadata'
# The location to store cache files
stash_cache_directory: '/home/app/stash/cache'
# The location to store scraped downloads
stash_downloads_directory: '/home/app/stash/downloads'
- Set up the database with
rails db:migrate. Test that the server runs correctly by typingrails s. If there are no errors then you have set it up correctly. PushCtrl+Cto quit the server. - Run this command to change over to the frontend folder:
cd ../stashfrontend - Install Gulp CLI globally:
sudo yarn global add gulp - Install Angular CLI globally:
sudo yarn global add @angular/cli - Build the frontend with
ng build --prod - Start nginx again with:
systemctl restart nginx - Change back to the stashserver directory:
cd ../stashserver - Run the back end stashserver with
rails s - Open a new terminal, Change back to the stashfront end directory:
cd /home/app/stash/stashfrontendand run theupdate_schema.shin the stashfrontend directory. You might have to run this periodically after updating your git repos.
You should now be able to access the app from http://your_ip_here:8008 as long as the server is running in the terminal.