stash.red is a Small footprint File host (Specificly for Image/Video and Audio files)
- A server to host the code
- A Domain name (recommended registrar: Cloudflare)
- A Reverse Proxy capable Webserver (reccomended: Nginx)
- Node LTS
Tested on versions 18.18.2 and 20.9.0(recommended: use Node Version Manager) - Git
$ sudo apt install git
- Essential Build tools
$ sudo apt install build-essential
It is Recommended to begin in your Home directory (
cd ~)
- Clone this repository using
$ git clone https://github.com/cmd430/stash.red yourdomainname.tld
- Change into the newly created directory and install dependencies
$ cd yourdomainname.tld $ npm i --omit=dev - Copy
./config/sql/002-Config.templateto./config/sql/002-Config.sql - Edit any options in
./config/sql/002-Config.sqlnote: it is reccomended to only change settings tagged with:
<CHANGE_ME:setting_explaination>unless you know what you are doing$ nano ./config/sql/002-Config.sql
- Start with PM2 and run continuously
$ pm2 start ecosystem.config.cjs
- Start the server
$ node main # or $ npm start
- Create site config
$ sudo nano /etc/nginx/sites-available/yourdomainname.tld
- add the following config (change where necessary) and save
server{server_name <yourdomainname.tld>;listen443ssl;ssl_certificate <path_to_cloudflare_origin_certificate>/origin-cert.pem;ssl_certificate_key <path_to_cloudflare_origin_private_key>/private-key.pem;location / {proxy_passhttp://localhost:3000;proxy_http_version 1.1;proxy_set_header X-Forwarded-Proto https;proxy_set_header Upgrade $http_upgrade;proxy_set_header Connection 'upgrade';proxy_set_header Host $host;proxy_cache_bypass$http_upgrade;proxy_request_buffering off;}client_max_body_size 0;}
- add the following config (change where necessary) and save
- Create a symbolic link in
../sites-enabled/and reload nginx$ sudo ln -s /etc/nginx/sites-available/yourdomainname.tld /etc/nginx/sites-enabled/yourdomainname.tld $ sudo nginx -s reload
If everything is working correctly you should be able to open https://yourdomainname.tld in your browser
- Account creation with hashed and salted passwords and captcha
- Private uploads (hidden unless you have the link)
- Simple Album and Single file support
- User pages to see files uploaded by specific users
- Ability to easily find content by User or by Album
- Zero loss in quality of uploaded files
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

