You might want to read up on how chaley has his content server running on an offsite VPS. See this post from him for his scripts and what he has done.
https://www.mobileread.com/forums/sho...23&postcount=2
This includes how he replicates data from his calibre to the VPS, and how he ensures that the content server restarts when changes have been made.