Filestash on Litespeed Using CyberPanel

Written in

by

Background

If you don’t know what Filestash is it is an open source application that lets you explore multiple types of file storage (S3, FTP, Backblaze, Google Drive, etc.) in a unified manner, on your own server. If you want to see a demo of it running click here. In this tutorial I will be installing Filestash using CyberPanel, a web hosting control panel that makes running website on an OpenLiteSpeed webserver much more simple.

Install

  1. Login to CyberPanel and select “Manage Images” under “Docker Manager” on the sidebarl.
Screenshot of cyberpanel homepage.
Tip: click on any image to expand it.
  1. Install Docker if not already installed. Note that this may take several minutes.
  2. Search for “Filestash. Choose “machines/filestash” image, select the “latest” tag, and finally, click “pull.”
Screen shot of installing docker image in cyberpanel.
  1. Click “Create Container.”
  2. Then, select “latest” and click “Create.”
  3. Select an “owner,” a “memory limit,” and set “port” to 8334. Then create the container.
Screenshot of container settings.
  1. Click on settings and check “Start on reboot,” then save.
  2. Start the application.
  3. Now by going to “ipaddress:8334” you can setup Filestash by setting a password.

Optional: Set a Custom Domain

  1. In Filestash settings change the “host” to your desried domain. Note: Make sure your domain’s DNS is pointing to your server.
  2. In CyberPanel create a website for your domain.
Screen of cyberpanel website setup.
  1. In commandline login into your server and edit “/usr/local/lsws/conf/httpd_config.conf.” One way to do this is with the following line of code:
sudo nano /usr/local/lsws/conf/httpd_config.conf
  1. Near the bottom of the file, underneath your domain name, add the following block of code.
extprocessor dockerbackend {
  type                    proxy
  address                 127.0.0.1:8334
  maxConns                100
  pcKeepAliveTimeout      60
  initTimeout             60
  retryTimeout            0
  respBuffer              0
}
Screenshot of editing httpd_config in terminal.
  1. Return to CyberPanel and select “Manage” on your domain.
  2. Scroll down to “Rewrite Rules” and paste the following code:
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
REWRITERULE ^(.*)$ http://dockerbackend/$1 [P]
Screenshot of cyberpanel rewrite rules.

You can now visit your filestash install by typing in your selected domain.

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how your comment data is processed.