Home Download Docs Code Community

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.

Configuration Keys & Values

Note, if you can’t find what you’re looking for here, check the API docs: /pkg/types/serverconfig.

Storage options

At least one of these must be set:

Additionally, there are two mutually exclusive options which only apply if blobPath is set:

For now, if more than one storage option is set, one of them is the primary storage and the other ones are set up as mirrors. The precedence order is the same as the order they are listed above.

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

Examples for configuring storage backends

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

Camlistore uses Go html templates to publish pages, and publishing can be configured through the publish key. There is already support for an image gallery view, which can be enabled similarly to the example below (obviously, the rootPermanode will be different).

"publish": {
  "/pics/": {
    "camliRoot": "mypics",
    "backendURL": "http://localhost:3178/",
    "cacheRoot": "/home/joe/var/camlistore/blobs/cache",
    "goTemplate": "gallery.html"

See the serverconfig.Publish type for all the configuration parameters.

One can create any permanode with camput or the UI, and set its camliRoot attribute to the value set in the config, to use it as the root permanode for publishing.

Please see the publishing README for further details on how to set up permanodes for publishing, or if you want to make/contribute more publishing views.


Camlistore has several built-in importers, including:

These can be setup by visiting the “/importer/” URL prefix path, e.g. http://localhost:3179/importer/


The default configuration comes with SQLite for the indexer. However, getting mattn go-sqlite3 to work on windows is not straightforward, so we suggest using one of the other indexers, like MySQL.

The following steps should get you started with MySQL:

Setting up MongoDB is even simpler, but the MongoDB indexer is not as well tested as the MySQL one.

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.

The UI requires some static resources that are not included by default in the App Engine application directory (server/appengine/). You can define that directory in the server configuration file (server/appengine/config.json), with the sourceRoot parameter, like so:

  "/ui/": {
    "handler": "ui",
    "handlerArgs": {
      "sourceRoot": "dir_name",
      "jsonSignRoot": "/sighelper/"

You will then have to populate that directory with all the necessary resources (UI static files and closure library files).

Alternatively, you can run devcam appengine once, which will create and populate the default directory (server/appengine/source_root). Please see the CONTRIBUTING doc to build devcam.

Website layout inspired by git and memcached,
design done by up all day creative solutions.
Content by the authors.