Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2010, 04:11 AM   #1
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 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:
  1. Calibre 3 no longer supports running the content server and GUI simultaneously.
  2. If using Calibre < 3, there are better ways to do this such as using a service manager like NSSM, instead of a scheduled task.

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 08:40 PM.
sherman is offline   Reply With Quote
Old 02-22-2010, 04:44 AM   #2
Manichean
Wizard
Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Manichean is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Manichean's Avatar
 
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?
Manichean is offline   Reply With Quote
Advert
Old 02-22-2010, 05:34 AM   #3
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by Manichean View Post
What happens if I were to start Calibre while the content server already runs?
So long as you don't have the "Run server automatically on startup" checkbox checked in the main calibre preferences, or start the server from the same preferences screen, there shouldn't be any problems.

What happens if somehow both are active at once? I haven't a clue. Maybe Kovid can answer that one.
sherman is offline   Reply With Quote
Old 02-22-2010, 11:42 AM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
You can't run two content servers at the same time, on the same port.
kovidgoyal is offline   Reply With Quote
Old 02-22-2010, 11:43 AM   #5
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by kovidgoyal View Post
You can't run two content servers at the same time, on the same port.
I thought that would be the case, which is why I I'm careful to run only one only one or the other at a time.
sherman is offline   Reply With Quote
Advert
Old 02-22-2010, 11:44 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Basically whichever instance is run second will error out
kovidgoyal is offline   Reply With Quote
Old 11-12-2010, 02:29 PM   #7
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,759
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.
Dopedangel is offline   Reply With Quote
Old 11-12-2010, 02:33 PM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
the server will also lock the file.
kovidgoyal is offline   Reply With Quote
Old 11-12-2010, 03:07 PM   #9
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,759
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
Dopedangel is offline   Reply With Quote
Old 11-12-2010, 03:08 PM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
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.
kovidgoyal is offline   Reply With Quote
Old 11-12-2010, 03:22 PM   #11
Dopedangel
Wizard
Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.Dopedangel ought to be getting tired of karma fortunes by now.
 
Dopedangel's Avatar
 
Posts: 1,759
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
Dopedangel is offline   Reply With Quote
Old 01-13-2011, 06:58 AM   #12
zzmijarevic
Member
zzmijarevic began at the beginning.
 
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]
zzmijarevic is offline   Reply With Quote
Old 03-01-2013, 12:19 PM   #13
henro
Junior Member
henro began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Mar 2013
Device: T30-p
Doesn't work for me

on Windows 8 64bit...............

Should it work?
henro is offline   Reply With Quote
Old 03-01-2013, 03:47 PM   #14
sherman
Guru
sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.sherman ought to be getting tired of karma fortunes by now.
 
Posts: 850
Karma: 2641698
Join Date: Aug 2008
Location: Taranaki - NZ
Device: Kobo Aura H2O, Kobo Forma
Quote:
Originally Posted by henro View Post
on Windows 8 64bit...............

Should it work?
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.
sherman is offline   Reply With Quote
Old 10-28-2015, 05:50 PM   #15
ehelldane
Member
ehelldane began at the beginning.
 
ehelldane's Avatar
 
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.
ehelldane is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calibre Content Server statiiq Calibre 18 11-04-2016 03:12 PM
Calibre crashes in windows on startup Jamz Calibre 12 09-17-2010 02:58 PM
Running Calibre on Terminal Server JeffAlan66 Calibre 2 08-12-2010 02:00 PM
Trouble running calibre-server ould Calibre 0 04-16-2010 02:18 PM
content server in calibre bruceOz Calibre 1 04-16-2010 04:23 AM


All times are GMT -4. The time now is 02:43 PM.


MobileRead.com is a privately owned, operated and funded community.