Skip to content
This repository has been archived by the owner on Feb 11, 2019. It is now read-only.

Install from Source (MacOS)

chimerasoup edited this page Jun 9, 2018 · 2 revisions

MacOS

  1. Open your favorite terminal app
  2. Change to your home folder by running cd ~
  3. Install FFMPEG brew install ffmpeg --with-libvpx --with-opus --with-x265 --with-webp
  4. Install libmagic brew install libmagic
  5. Install optional dependencies if you want to enable the metadata scraper: brew install chromedriver && brew install aria2
  6. Make a folder for the stash app and change to that folder by running mkdir Stash && cd Stash
  7. Run the following command to download the server git clone https://github.com/stashapp/stashserver.git
  8. Run the following command to download the frontend git clone https://github.com/stashapp/stashfrontend.git
  9. brew install nginx and follow the instructions
  10. Stop nginx by running systemctl stop nginx
  11. Remove the default nginx site by running sudo rm /etc/nginx/sites-enabled/default
  12. Copy the server nginx config by running sudo cp stashserver/docker/nginx_proxy.conf /usr/local/etc/nginx/servers/stash.conf
  13. Modify the server nginx config by running the following command:
sudo sed -i 's#/home/app/stash/public#'`pwd`'/stashserver/public#' /etc/nginx/sites-enabled/stash.conf
  1. Copy the frontend nginx config by running sudo cp stashserver/docker/nginx_frontend.conf usr/local/etc/nginx/servers/stash_frontend.conf
  2. Modify the frontend nginx config by running:
sudo sed -i 's#/home/app/frontend#'`pwd`'/stashfrontend/dist#' /etc/nginx/sites-enabled/stash_frontend.conf
  1. Change to the server directory: cd stashserver
  2. Install the gems with: bundle install
  3. Make a file called application.yml located in the stashserver/config folder and edit the paths as necessary. Here is an example (change the paths where it makes sense for you)
# The location of the stash
stash_directory: '/home/stash/Stash/content'

# The location metadata should be exported to
stash_metadata_directory: '/home/stash/Stash/metadata'

# The location to store cache files
stash_cache_directory: '/home/stash/Stash/cache'

# The location to store scraped downloads
stash_downloads_directory: '/home/stash/Stash/downloads'
  1. Set up the database with rails db:migrate. Test that the server runs correctly by typing rails s. If there are no errors then you have set it up correctly. Push Ctrl+C to quit the server.
  2. Run this command to change over to the frontend folder: cd ../stashfrontend
  3. Install Gulp CLI globally: sudo npm install gulp-cli -g
  4. Install Angular CLI globally: sudo npm install @angular/cli -g
  5. Install the frontend dependencies: npm install
  6. Build the frontend with ng build --prod
  7. Start nginx again with: systemctl start nginx
  8. Change back to the server directory: cd ../stashserver
  9. Run the back end stashserver with puma -t 8:32

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.

Clone this wiki locally