2025-01-08, 02:52 AM
(This post was last modified: 2025-01-08, 04:55 AM by twilco. Edited 2 times in total.)
(2024-08-20, 05:54 PM)Topomov Wrote: My setup runs on a Synology which reverse proxy (nginx) as far as I know does not allow to easily add routing rules in a docker compose. It's most likely my fault; I failed to fully get it working on my setup.
I also use Synology DSM reverse proxy and I setup Jellysearch today. Since you can't make the necessary changes to the ngnix configuration via the limited GUI, you need to ssh into the NAS to make the changes manually.
Using this syno forum post as inspiration, you should:
- Make a reverse proxy for Jellyfin using the DSM GUI (in Control Panel -> Login Portal -> Advanced -> Reverse Proxy)
- Connect over SSH and open the file at "/etc/nginx/sites-enabled/server.ReverseProxy.conf" and find the "server" block that corresponds to the Jellyfin reverse proxy you configured in step 1.
- Copy the entire contents of the "server" block to a text editor and apply the changes described in the Jellysearch description (it's just adding the "if ($arg_searchTerm)" block at the beginning of the "location" block)
- Using the Synology DSM GUI, remove the reverse proxy you configured in step 1, as it will conflict with the manual one we're about to create
- Copy the modified "server" block you copied in step 2 to a new file inside "/etc/nginx/sites-enabled/" (I named my file the hostname of the previously configured reverse proxy, e.g. "jellyfin.myaccount.synology.me", but you can use any filename you wish). You'll need to use vi to do this, so "sudo vi /etc/nginx/sites-enabled/your.file.name", then press "i" to enter insertion mode, then you can paste the file contents, then press escape to exit insertion mode, then enter ":wq" and hit enter to save and close the file.
- Once you've created the manual nginx server configuration in step 5, we want to make sure the resulting nginx configuration is valid. Run "sudo nginx -t" to test the configuration. If it passes, then you can reload ngnix to apply the change using "sudo nginx -s reload"
- That's it!
A note regarding the modification of the "server" block. You'll be adding this bit at the beginning of the "location" block:
Code:
if ($arg_searchTerm) {
proxy_pass http://jellysearch:5000;
break;
}
Make sure that the url specified here matches the address of the host machine on which you're running Jellysearch, and that the port matches the host port that's mapped to port 5000 in the container.
Hope that helps! Jellysearch is lightning fast compared to built-in search, and far more functional and flexible. Having gone through this process, I think it was totally worth it.
Edit: I've also setup the Meilisearch plugin, which is great because it's simpler, requires no tinkering with reverse proxy, works with all clients (I assume), and works over LAN unlike Jellysearch. Comparing the two, Jellysearch seems to respond much faster, so I think I'll keep both implemented, such that the plug-in is used over LAN and Jellysearch over WAN.