├── install.sh └── readme.md /install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | #============================================================= 3 | # https://github.com/roshanconnor123/mediaserver 4 | # File Name: install.sh 5 | # Author: roshanconnor 6 | # Description:一Installation of Media Servers 7 | # System Required: Debian/Ubuntu 8 | #============================================================= 9 | 10 | COLOR="\033[" 11 | NORMAL="${COLOR}0m" 12 | YELLOW="${COLOR}1;33m" 13 | RED="${COLOR}1;31m" 14 | CYAN="${COLOR}1;36m" 15 | BLUE="${COLOR}1;34m" 16 | GREEN="${COLOR}1;32m" 17 | PURPLE="${COLOR}1;35m" 18 | 19 | # ★★★Installation of Rclone and Creating a remote★★★ 20 | rclone() { 21 | curl https://rclone.org/install.sh | sudo bash 22 | sudo apt update && sudo apt install fuse 23 | sudo sed -i '/#user/s/#//g' /etc/fuse.conf 24 | sudo mkdir /mnt/media 25 | sudo rclone config 26 | } 27 | # ★★★Mounting using rclone★★★ 28 | mount() { 29 | echo "Provide your remote name you configured in rclone\n" 30 | read remote 31 | sudo rclone mount "$remote": /mnt/media --allow-other --allow-non-empty --vfs-cache-mode writes & 32 | crontab -l > mycron 33 | echo "@reboot sudo rclone mount "$remote": /mnt/media --allow-other --allow-non-empty --vfs-cache-mode writes &" >> mycron 34 | #install new cron file 35 | crontab mycron 36 | rm mycron 37 | } 38 | # ★★★Installation of Plex★★★ 39 | plex () { 40 | sudo apt-get update 41 | sudo apt-get upgrade 42 | wget https://downloads.plex.tv/plex-media-server-new/1.20.1.3252-a78fef9a9/debian/plexmediaserver_1.20.1.3252-a78fef9a9_amd64.deb 43 | sudo dpkg -i plexmediaserver*.deb 44 | sudo systemctl enable plexmediaserver.service 45 | sudo systemctl start plexmediaserver.service 46 | echo "${BLUE}Plex has been Installed succesfully${NORMAL}" 47 | echo "${RED}Go to ip.adress.of.server:32400 in your browser now${NORMAL}" 48 | } 49 | # ★★★Installation of Emby★★★ 50 | emby() { 51 | sudo apt-get update 52 | sudo apt-get upgrade 53 | wget https://github.com/MediaBrowser/Emby.Releases/releases/download/4.5.1.0/emby-server-deb_4.5.1.0_amd64.deb 54 | sudo dpkg -i emby-server-*.deb 55 | sudo service emby-server start 56 | echo "${BLUE}Emby has been Installed succesfully${NORMAL}" 57 | echo "${RED}Go to ip.adress.of.server:8096 in your browser now${NORMAL}" 58 | } 59 | # ★★★Installation of Jellyfin★★★ 60 | jellyfin() { 61 | sudo apt-get update 62 | sudo apt-get upgrade 63 | sudo apt install apt-transport-https 64 | sudo add-apt-repository universe 65 | wget -O - https://repo.jellyfin.org/ubuntu/jellyfin_team.gpg.key | sudo apt-key add - 66 | sudo touch /etc/apt/sources.list.d/jellyfin.list 67 | echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/ubuntu $( lsb_release -c -s ) main" | sudo tee /etc/apt/sources.list.d/jellyfin.list 68 | sudo apt update 69 | sudo apt install jellyfin 70 | sudo systemctl start jellyfin.service 71 | echo "${BLUE}Jellyfin has been Installed succesfully${NORMAL}" 72 | echo "${RED}Go to ip.adress.of.server:8096 in your browser now${NORMAL}" 73 | } 74 | 75 | # ★★★Installation★★★ 76 | echo && echo " ${BLUE}Media Server Installation Srcipt${NORMAL} by ${RED}Roshanconnor${NORMAL} 77 | 78 | ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ 79 | 1.${GREEN}Setting Up Plex with Gdrive${NORMAL} 80 | 2.${GREEN}Setting Up Emby with Gdrive${NORMAL} 81 | 3.${GREEN}Setting Up Jellyfin with Gdrive${NORMAL} 82 | ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖ 83 | 69.${PURPLE}Exit${NORMAL}" && echo 84 | read -p " Choose any Number [1-3]:" option 85 | 86 | case "$option" in 87 | 1) 88 | rclone 89 | mount 90 | plex 91 | ;; 92 | 2) 93 | rclone 94 | mount 95 | emby 96 | ;; 97 | 3) 98 | rclone 99 | mount 100 | jellyfin 101 | ;; 102 | 69) 103 | exit 104 | ;; 105 | *) 106 | echo 107 | echo " ${RED}Choose Correct Number from the Options${NORMAL}" 108 | ;; 109 | esac 110 | 111 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Media Server Installation with Gdrive as your Source 2 | 3 | Setup Includes: Plex, Emby, Jelyfin - with Rclone Mount 4 | 5 | ## Pre Requisite 6 | - Ubuntu VPS with Sudo Access 7 | - Open Ports 32400, 8096 in your VPS 8 | - Google Drive Full of contents to Stream 9 | 10 | ## Installation 11 | - Clone the Repo and run the bash script 12 | ``` 13 | git clone https://github.com/roshanconnor123/mediaserver && sh mediaserver/install.sh 14 | ``` 15 | ![mediaserver](https://i.ibb.co/ygKr9gG/Screenshot-1041.png) 16 | - Choose Media server of you choice..Setup a new Rclone remote when it asks you to 17 | - Once everything is done..Open Browser in your Computer (The Computer in which you are using your SSH client) 18 | - Go to http://server.local.ip.address:32400/web - For Plex 19 | - Go to http://server.local.ip.address:8096 - For Emby/Jellyfin 20 | --------------------------------------------------------------------------------