How does calibre server work




















Project Gutenberg maintains a massive repository of free, public domain literature and is a great resource for ebooks. And add the book you just downloaded to your new library using the calibredb command:. But before we access the calibre Content server in a web browser, we need to make sure that our server can accept traffic on port , which is the default port for calibre.

If you followed the initial server setup guide in the prerequisites section, then you enabled ufw , or Uncomplicated Firewall. You now need to allow port through the firewall. Click on calibre-library and you will see the book that you added in the previous step. This method of running the calibre Content server works well, but you probably want your library to work all of the time, even after you close the SSH connection to your server.

First, create a file called calibre-server. Now add the following configurations, which will start the calibre Content server on boot. Make sure to replace the highlighted text with your user and group:. Here we tell our service to use the --enable-local-write flag when starting the server. Instead, you have to do this through the running server, and this means that the server needs permission to write new files to disk.

This flag allows it to do so as long as it receives the request locally. You now have a fully functioning calibre Content server that you can access from any device. You might not want this. First, SSH back into your server and stop calibre. When prompted, choose to add a new user. Then select a username and strong password. You will see a final output message like this:. To enable authentication, add the --enable-auth flag to the end of the line starting ExecStart.

Password based authentication to access the server. Normally, the server is unrestricted, allowing anyone to access it. You can restrict access to predefined users with this option. By default, this option is disabled. Fallback to auto-detected interface. Allow un-authenticated local connections to make changes. Normally, if you do not turn on authentication, the server operates in read-only mode, so as to not allow anonymous users to make changes to your calibre libraries.

This option allows anybody connecting from the same computer as the server is running on to make changes. This is useful if you want to run the server without authentication but still use calibredb to make changes to your calibre libraries. Note that turning on this option means any program running on the computer can make changes to your calibre libraries. Normally, the server logs all HTTP requests for resources that are not found.

This can generate a lot of log spam, if your server is targeted by bots. Use this option to turn it off. Zero copy file transfers for increased performance. This will use zero-copy in-kernel transfers when sending files over the network, increasing performance. However, it can cause corrupted file transfers on some broken filesystems. If you experience corrupted file transfers, turn it off. Ignored user-defined metadata fields. The interface on which to listen for connections. The default is to listen on all available IPv4 interfaces.

You can change this to, for example, " The end of the output will report something about "desktop integration failed" but since we're just trying to serve it up in the browser, don't worry about it. If you get any other strange looking errors, check out the Calibre link again - there's a lot of notes about other prerequisites, although I seemed to have them all other than Python2.

Under Step 2, Gareth says to run two commands to install xvfb and ImageMagick. Installing them did not affect my installation at all, but I'm not sure they're necessary anymore. Based on other stuff I read after installing them, I'm almost certain that you can, at the very least, forego installing ImageMagick.

If you don't have a Calibre library yet, you're sorta on your own. I don't think it's hard though! But it's not the path I took so I can't speak to it. The same tutorial referenced above has a section on creating a new library. If you already have a library, like me, then you'll want to upload it. I just discovered the rsync command, and it's amazing. Over the course of a day or so, my entire library slowly got uploaded. You can read more about rsync here.

If you're planning on assigning a domain name to your server, you might consider securing your site with a free certificate from Let's Encrypt. That's beyond the scope of this though. When you're done, you should end up with a couple files a public cert and a private key - just mark the locations of each. If you don't want just anyone being able to view your library and download your books, you'll need to setup a user and password to login to your Calibre library.

Now that you have a new Calibre user and a self-signed certificate, you're ready fire up Calibre and access it securely. In order to run the Calibre service as soon as your server starts up, create a "service" file:. Sign in and check out your library It should all be secured over SSL as well. My Google-fu totally failed me on this one. I even scoured pages 2 and 3 of the results, and could find nothing to explain why large downloads fail with:.

I assumed it was my subpar Internet connection, so I tried again at work. I uploaded a few large files at one time, something that should've happened fairly quickly, but it hung for awhile and then displayed the same error. Do this:. Finally, restart Calibre-Web. This web app has been tested on DigitalOcean. If you would like to get this app installed, maintained or need training, Contact Me to get current rates. I sincerely appreciate your effort by making this information available. OperationalError attempt to write a readonly database.

Your kind assistance is needed. Hoping to hewar from you soon. Hello, based on the error message above attempt to write a readonly database , I would try to make sure your permissions are set correctly on the calibre-library directory as well as the metadata. Please, how do i resoive it and proceed from there. Again, George has pointed out a problem with some code in Step 9. You can always change this port later I had initially set the port at I installed the package successfully and changed the port from to I have not been able to access the Calibre web since then I keep getting an error message Error starting server: [Errno 13] Permission denied.



0コメント

  • 1000 / 1000