Alternative solution here (and for general access from 'outside'): I'm running my content server on a Pi (along with a media server, NAS and bunch of other things). This will sound a bit like spam but I have used NORDVPN for years for VPN connections (with a paid subscription) but found that they offer a private encrypted private LAN capability called"MeshNet" which allows you to set up a virtual private LAN between multiple devices and IT"S FREE! You do need to have an account but do not need to subscribe to any of the VPN plans. This allows me to have my Pi, PC, Phone, Laptop etc on a private LAN (need to run NordVPN on each with MeshNet enabled), each getting a private IP address (call it static for lack of a better word). Each device is individually configured with a number of options (what is allowed and not allowed). This include being able to route locally, route all traffic through and out the normal LAN (useful for streaming), etc. You can also invite others to join your meshnet with specific options allowed (my kids can access Calibre, the media server etc) - this can be for a single period of time or just kept setup.
In this context (phone as example), I can connect with calibre through my local Pi address when on my LAN or using the MeshNet IP when external. In fact I generally just use the MeshNet IP in the favourites as this keeps things simple - so I almost always connect trough the private LAN from any mobile device.
As noted this can also be handled through various port-forwarding and other network configuration changes but I have seen many people screw this up thinking they are secure (and, yes, you need to assume MeshNet is secure). By using a private LAN it offers a really flexible system for not only this use case but lots more.
in my Calibre service start I use
ExecStart=/opt/calibre/calibre-server --trusted-ips "100.xxx.44.xxx,192.168.2.20,100.yy.ww.6,192.168.2 .60" --enable-local-write "/home/calibre/Calibre_Library"
with the 100. addresses being the MeshNet assigned IPs for my phone and laptop.
I don't normally markup anything but I did just validate adding a highlight into a book from the local side and it showed up on the phone as expected.
I leave it to you to read up on Meshnet to see if it might make things a bit easier.
Last edited by razmichael; 05-21-2025 at 04:41 AM.
|