02-22-2010, 05:11 AM | #1 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
A Howto: Running Calibre Content server on Windows Startup
December 2017 Update
Since this thread has seen some interest lately, I though I should probably add an update. I consider the contents of this thread obsolete for at least two reasons:
I've kept the old guide if people still wish to follow it for some reason. ============================================= Original Post Hi folks, I thought I'd share with you my method of running the standalone calibre content server at windows startup. This particular method works for Windows Vista/7, and probably XP as well. It may not be the only way to accomplish this task either. The Steps Open the Task Scheduler (Start orb > type "task" in the search > select "Task Scheduler" from list) Choose "Create Task" from the menu at right. Give the task a meaningful name and description. Select the "Run whether user is logged in or not" radio button. On the "Triggers" tab, create a new trigger. From the dropdown list at the top select "Startup", and click "Ok". On the "Actions" tab, create a new Action. You want to "Start a program". In the "Program/Script" box, insert the location of the calibre-server program. This can usually be found in the following places: 32-bit Windows: C:\Program Files\Calibre2\calibre-server.exe 64-bit Windows: C:\Program Files (x86)\Calibre2\calibre-server.exe If you want to pass additional options to calibre-server (eg: username/password), put these in the "Add arguments (optional)" box. Refer to the calibre-server help for information on these options. Click "Ok" If your PC is going to be on for several days at a time, select the "Settings" tab. Uncheck the checkbox that says "Stop the task if it runs longer than:". Click "Ok" to create the new task. You will be asked for your Windows User password - put this in to complete creating the task. Now, either right-click the task and choose "Run" or reboot the PC to run the task. Finally, to ensure the content server can be accessed over the network, we need to add calibre-server to the list of exceptions in the Windows Firewall. Somewhere within the Vista/7 control panel or security center there is an option to "Allow a program through Windows Firewall". Click the "Add another program", browse to the location of calibre-server.exe and add it. So why would I want to do this? Running the Standalone content server is useful if you don't want to have the main calibre program running constantly. Running calibre-server by double clicking it however means that you have a constand command window taking up space. You also have to remember to run it whenever you log in. Calling it from a batch file placed in the startup folder also works, but again, you still have a command window floating around. Also both methods require you to login to your system. Using the task scheduler method brings the content server up at Windows startup, without requireing the user to be logged in, and doesn't display a command window. Of course, if Kovid were to implement running the content server as a windows service.... Last edited by sherman; 12-20-2017 at 09:40 PM. |
02-22-2010, 05:44 AM | #2 |
Wizard
Posts: 3,130
Karma: 91256
Join Date: Feb 2008
Location: Germany
Device: Cybook Gen3
|
What happens if I were to start Calibre while the content server already runs?
|
Advert | |
|
02-22-2010, 06:34 AM | #3 | |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
Quote:
What happens if somehow both are active at once? I haven't a clue. Maybe Kovid can answer that one. |
|
02-22-2010, 12:42 PM | #4 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can't run two content servers at the same time, on the same port.
|
02-22-2010, 12:43 PM | #5 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
|
Advert | |
|
02-22-2010, 12:44 PM | #6 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Basically whichever instance is run second will error out
|
11-12-2010, 03:29 PM | #7 |
Wizard
Posts: 1,765
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
I use dropbox to keep my calibre library synced on multiple computers.
So I was wondering is it possible to run just calibre server using this method on one computer and manage the library from another computer or does the server also lock the metadata file. |
11-12-2010, 03:33 PM | #8 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
the server will also lock the file.
|
11-12-2010, 04:07 PM | #9 |
Wizard
Posts: 1,765
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
So can the server be run with metadata.db named to something like server.db
I am not a programmer so am not sure if its even possible but maybe someone can run with it What I am thinking is server uses that file and updates it after a specific time lets say every half hour. We wont get real time additions and changes but that it would allow to run the server on one computer and manage the library from another it would even work with shared network drives not just dropbox and other sync software |
11-12-2010, 04:08 PM | #10 |
creator of calibre
Posts: 44,559
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
You can use an environment variable to control exactly what file calibre uses to load the db from, see the customizing calibre section of the user manual.
|
11-12-2010, 04:22 PM | #11 |
Wizard
Posts: 1,765
Karma: 30063305
Join Date: Dec 2006
Location: Singapore
Device: Boyue
|
Ok thanks I have free time this weekend maybe I will try to read up on it and see if I can come up with something.
So what I have to do is use some kind of task scheduler that restarts calibre server every half hour actually I don't edit my files that much so can push it to once a day. And before starting calibre-server the server.db is updated with the latest metadata.db file. I am writing this down so if anyone else has any Ideas please comment |
01-13-2011, 07:58 AM | #12 |
Member
Posts: 20
Karma: 10
Join Date: Apr 2010
Device: HTC HD2
|
On WinXP the solution is not working. I have tried some different approaches but with no success. Therefore, I started a new thread related to this post:
www.mobileread.com/forums/showthread.php?t=116256[/B] |
03-01-2013, 01:19 PM | #13 |
Junior Member
Posts: 1
Karma: 10
Join Date: Mar 2013
Device: T30-p
|
Doesn't work for me
on Windows 8 64bit...............
Should it work? |
03-01-2013, 04:47 PM | #14 |
Guru
Posts: 869
Karma: 2676800
Join Date: Sep 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
|
I don't see why not.
However personally I've turned to the "run as a service" method myself. I use the program nssm to quickly and easily run the content server as a service. The only thing you need to be aware is that when updating Calibre, the service should be stopped, unless you don't mind having to restart your PC. |
10-28-2015, 06:50 PM | #15 |
Member
Posts: 17
Karma: 10
Join Date: Oct 2015
Device: Boox Nova Pro
|
Thanks, this still works, but don't forget to add the exception to the Firewall. I forgot windows had a built-in firewall, and my upgrade to Win10 left me confused as to why I couldn't access the server from other devices.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre Content Server | statiiq | Calibre | 18 | 11-04-2016 04:12 PM |
Calibre crashes in windows on startup | Jamz | Calibre | 12 | 09-17-2010 03:58 PM |
Running Calibre on Terminal Server | JeffAlan66 | Calibre | 2 | 08-12-2010 03:00 PM |
Trouble running calibre-server | ould | Calibre | 0 | 04-16-2010 03:18 PM |
content server in calibre | bruceOz | Calibre | 1 | 04-16-2010 05:23 AM |