***
This is a work in progress post, it has most of the content of what I did, but it's after the fact, and I haven't replicated it to ensure it works exactly as described, but you should have enough info to accomplish what I did!
***
(Note I have Amazon Affiliate links below FYI)
I decided to build a portable Jellyfin Server. I wanted my kids to be able to login and watch shows as needed while we were driving and thus started going down the path.
I bought a travel router from amazon. I came across this on HackerNews a while back, and liked the idea, which is where this all started.
We used it on our last road trip and it worked quite well.
Parts required (I used stuff I had around, so the links below are largely placeholders for you to try, with the exception of the travel router and power bank, I did buy those).
1 Raspberry Pi (I selected 3b+ as it's what I had lying around)
1 SD Card (If you already have a pi up and running, you may not need this)
1 GL-MT3000 (Beryl AX) Pocket-Sized Wi-Fi 6 Wireless Travel Gigabit Router
1 Shutdown Key (Or just find a spare usb device you can bring along)
1 Storage Case (Totally optional)
Key Stages:
- Get Pi Setup and running (Assumed you have set this up)
- Get Jellyfin installed on Pi
- Setup USB Drive for media
- Get nginx installed on Pi
- Static IP on Travel Router
- Get Adblocker running on Travel Router with Redirect
- Get USB Shutdown Key Created
Installing Jellyfin
https://pimylifeup.com/raspberry-pi-jellyfin/
Ultimately I just searched install jellyfin on raspberry pi and it just worked.
Setup USB Drive for media
TODO: More details on how I setup with the USB drive.
Installing nginx
Ultimately we will follow the above however there are some details that are a bit fuzzy for me. It has you edit this
sudo nano example.com.conf
file, however my system wasn't setup like that, so instead of that I used default (likely this command):
ln -s /etc/nginx/sites-available/default /etc/nginx/sites-enabled/default
From there we need to update:
sudo nano /etc/nginx/sites-available/default
to contain this:
server {
listen 80;
server_name jellyfin.car.com;
location / {
proxy_pass http://localhost:8096;
}
}
This means that we will redirect a request coming in for jellyfin.car.com to the jellyfin server. You can replace jellyfin.car.com with whatever you want, but that's what I used.
I specifically used localhost, because when I was doing setup, I was on my main wifi, so when I swapped between wifi's as long as I had the request coming in via jellyfin.car.com (on my main or the travel wifi) it handled correctly.
Static IP
https://docs.gl-inet.com/router/en/3/setup/gl-e750/more_settings/#static-ip-address-binding
This should generally be what you need to do. Figure out your mac address, and then put in a static IP there. I think the default IP range is 192.168.8.x so I set my pi to something like 192.168.8.31.
Get Adblocker running on Travel Router with Redirect
Next we are going to turn on the adguard (A sweet feature of the travel router), and point the redirect to our pi!
Specifically we are going to do the section called add local DNS entries into Adguard.
I put in
192.168.8.31 jellyfin.car.com
(instead of their arpa example)
Now when I visit jellyfin.car.com on the wifi that router is on, the adguard will look that URL up, and then return the pi's ip address, which in turn, means that it will connect over NGINX on port 8096
Get USB Shutdown Key Created
http://blog.onaclovtech.com/2024/03/usb-shutdown-key.html
Finally, we will setup a USB shutdown key, this makes it so when we are ready to shutdown for the day we can kill our pi, and unplug power after maybe 30 seconds.
You can use any old usb device I have an old 32 mb usb key (my first perhaps?) that I am using, I labelled it Shutdown Key.
Results
Once you have this setup, you can kick it off, the system should last on the battery bank more or less 5-7 hours (maybe more, maybe less, depending on use).
Alternatively you can buy two banks, and then just run the router on one, and the pi on another.
Finally you "could" possibly just run your router off the USB power in the car, so you don't need the power bank at all, however I didn't test that out, I think the router can handle power interruptions, the pi generally can get finnicky on that, so I wanted a way to be in control of that which is why it's on a power bank, so if I shut the car off I don't accidentally forget to gracefully power the pi off, and kill it in the middle of my trip.
***
This is a work in progress post, it has most of the content of what I did, but it's after the fact, and I haven't replicated it to ensure it works exactly as described, but you should have enough info to accomplish what I did!
***