Skip to content

Instantly share code, notes, and snippets.

@SaidTorres3
Last active May 17, 2023 18:24
Show Gist options
  • Save SaidTorres3/abf1ea98c507f5392e69ecd5b5c4a231 to your computer and use it in GitHub Desktop.
Save SaidTorres3/abf1ea98c507f5392e69ecd5b5c4a231 to your computer and use it in GitHub Desktop.
Create a media server
# bin/bash
# Run this in the user home
sudo apt-get update
# sudo apt-get upgrade
sudo apt install tmux
sudo apt install nodejs npm -y
sudo npm i -g http-server
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
mkdir Filebrowser
filebrowser_path=$(pwd)/Filebrowser
echo "pkill tmux
tmux new-session -d -s filebrowser
tmux send-keys -t filebrowser 'filebrowser -a 0.0.0.0 -r $filebrowser_path -p 80' Enter
tmux new-session -d -s http-server
tmux send-keys -t http-server 'http-server $filebrowser_path -p 8080' Enter" > start-server.sh
chmod +x start-server.sh
echo "Setup successful! Now start the media server with ./start-server.sh"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment