ShelfServer Advanced Configuration
While the default setup for ShelfServer works for most people, power users may wish to customize things a bit.
Static port for firewalls
If your WiFi and desktop computer aren't on the same network, you may need to adjust your firewall to allow your iThing to access the necessary port on your desktop. To help in this, ShelfServer allows setting a fixed port on the desktop instead of a randomly assigned one.
To use this feature, first find an unused port on your computer between 1025 and 65535. Launch ShelfServer, uncheck the "Automatic" box next to the network port and enter your desired port number. Click the "Apply Settings" button, and the server will be re-launched on your desired port number. This port number is saved in the config file and will automatically be used in the future.
You may now configure your firewall to allow your iThing to access your desktop on this port. How you do that is entirely dependent on what firewall solution you're using and is beyond the ability of BookShelf's author to help.
You can now manually add the IP (or hostname) and port of your ShelfServer to BookShelf and download books.
Note that this setup also works if you'd like to expose your shelf server to the Internet. You do so at your own risk, but this setup would allow you to download books from home where ever you might be.
Running the command line server
The ShelfServer GUI is only one way to run the ShelfServer. If you prefer to leave the server running, perhaps on a headless server, you can run the GUI-less JAR. You'll need to create ShelfServer's config file first, either manually or using the GUI on another computer. Please the config file in the home directory of the user who will run the server under ~/.shelfserver/shelfserver.properties.
You can download the ZIPped version of ShelfServer, and launch the server by running "java -jar ShelfServer.jar". The server could be left running in the background, spawned from a startup script, etc.
Config file location and syntax
The ShelfServer configuration file is stored in the user's home directory under ~/.shelfserver/shelfserver.properties. The file is a simple Java properties file with the following keys:
- shelf.password -- the password required when connecting to the server. NOT encrypted. Use "PUBLIC" (without quotes, all in caps) to allow public access to the server with no password. Please respect copyright law.
- shelf.networkport -- the TCP port the server will run on. Must be free when the server starts. Use 0 for auto detection of a dynamic port number.
- shelf.name.# -- name of a shared directory. Number must start at 1 and increase without gaps.
- shelf.path.# -- the full path to the directory to be shared under the matching shelf.name.# entry.
The location of the configuration file can also be changed using a Java system property. Something like -Dconfig.dir=/path/to/directory/containing/config/. The file is always named shelfserver.properties under that directory.
When run from the command line, ShelfServer will attempt to register the selected (or dynamically selected) port number with the system's ZeroConf daemon. If ZeroConf is not available, a warning will be printed to the console, and the server will continue as a stand alone server without registration.
Bonjour in Linux
While the author has not yet personally attempted it, Bonjour is available for Linux and released by Apple as open source. This Mailing list post explains the process of setting it up.
WAR-based server
The ShelfServer is written in Java and uses the Jetty servlet container by default. If you wish to run a public shelf server for a large number of users, you may wish to deploy the server as a WAR file into a Tomcat or other servlet container. Please contact the BookShelf author for information and to obtain the necessary version of the server.
Download & Buy Books
Latest News
- 2008-Nov-11: Temporary Support Slow down [Click 'All News' for details]
- 2008-Nov-06: Version 1.3 Available
- 2008-Oct-07: Server issues nearly resolved
- 2008-Oct-04: 1.2 Available NOW
- 2008-Sep-17: Version 1.2 Submitted to Apple
[All News]
Click to Install BookShelf with iTunes or AppStore