Configuring the server

The server's config file at $HOME/.config/camlistore/server-config.json is JSON. It can either be in simple mode (for basic configurations), or in low-level mode (for any sort of crazy configuration).

This page documents the simple configuration mode.

If you visit your Camlistore server's /setup page (by default, at http://localhost:3179/setup) you can modify the config file from your web browser and restart the server.

Configuration Keys & Values

Storage options

At least one of these must be set:

Others aren't yet supported by the simple config mode. Patches to pkg/genconfig welcome.

Indexing options

Unless runIndex is set to false, exactly one of these must be set:

Additionally, mongo, mysql, and postgres require the dbname value set. Initialize your database with camtool dbinit.

There's also an in-memory index type, but only in the low-level config, as used by devcam server.

Publishing options

Although limited, publishing can be configured through the publish key. There is only support for an image gallery view (even though it will display thumbnails for other kinds of items), which is not really customizable. Here is an example of a value if one wanted to publish some items under /pics/:

{
  "/pics/": {
    "rootPermanode": "sha1-09888624be84fcb3ae67e8aa2f29682b4ff515d7",
    "style": "pics.css",
    "template": "gallery"
  }
}

One can create any permanode with camput or the UI and use it as the rootPermanode.

App Engine

Most configuration doesn't apply on App Engine as it's pre-configured to use the App Engine Blobstore and Datastore, as well as App Engine's user auth mechanisms. But as of 2013-06-12 we don't yet recommend running on App Engine; there are still some sharp corners.