<p>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).</p>
<tr><td><code>localhost</code></td><td>Accept connections coming from localhost. On Linux, this means connections from localhost that are also from the same user as the user running the server.</td></tr>
<tr><td><code>userpass:alice:secret</code></td><td>HTTP basic authentication. Username "alice", password "secret". Only recommended if using HTTPS.</td></tr>
<tr><td><code>userpass:alice:secret:+localhost</code></td><td>Same as above, but also accept localhost auth</td></tr>
<tr><td><code>userpass:alice:secret:vivify=othersecret</code></td><td>Alice has password "secret", but her Android phone can use password "othersecret" to do a minimal set of operations (upload new things, but not access anything)r</td></tr>
<li><b><code>baseURL</code></b>: Optional. If non-empty, this is the root of your URL prefix for your Camlistore server. Useful for when running behind a reverse proxy. Should not end in a slash. e.g. <code>https://yourserver.example.com</code></li>
<li><b><code>identity</code></b>: your GPG fingerprint. A keypair is created for new users on start, but this may be changed if you know what you're doing.</li>
<li><b><code>identitySecretRing</code></b>: your GnuPG secret keyring file. A new keyring is created on start for new users, but may be changed if you know what you're doing.</li>
<li><b><code>shareHandler</code></b>: if true, the server's sharing functionality is enabled, letting your friends have access to any content you've specifically shared. Its URL prefix path defaults to "<code>/share/</code>".</li>
<li><b><code>shareHandlerPath</code></b>: Optional. If non-empty, it specifies the URL prefix path to the share handler, and the <b><code>shareHandler</code></b> value is ignored (i.e the share handler is enabled). Example: "<code>/public/</code>".</li>
<li><b><code>runIndex</code></b>: defaults to true. If "false", no search, no UI, no indexing. (These can be controlled at a more granular level by writing a low-level config file)</li>
<li><b><code>sourceRoot</code></b>: Optional. If non-empty, it specifies the path to an alternative Camlistore source tree, in order to override the embedded UI and/or Closure resources. The UI files will be expected in <code><b><sourceRoot></b>/server/camlistored/ui</code> and the Closure library in <code><b><sourceRoot></b>/third_party/closure/lib</code>.</li>
<p>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.</p>
<p>Additionally, mongo, mysql, and postgres require the <b><code>dbname</code></b> value set. Initialize your database with <a href="/cmd/camtool/">camtool dbinit</a>.</p>
<p>There's also an in-memory index type, but only in the low-level
<p>Although limited, publishing can be configured through the <b><code>publish</code></b> 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 <code>/pics/</code>:</p>
The default configuration comes with SQLite for the indexer. However, getting <a href="https://github.com/mattn/go-sqlite3">mattn go-sqlite3</a> to work on windows is not straightforward, so we suggest using one of the other indexers, like MySQL.
</p>
<p>
The following steps should get you started with MySQL:
<ul>
<li> Dowload and install <a href="https://downloads.mariadb.org/mariadb/5.5.32/">MariaDB</a> or <a href="http://dev.mysql.com/downloads/windows/installer/">MySQL</a> (the latter requires .NET).</li>
<li> Edit your server configuration file (if it does not exit yet, running <b>camlistored</b> will automatically create it):
<ul>
<li> Remove the <b>sqlite</b> option.</li>
<li> Add a <b>dbname</b> option. (ex: "dbname": "camliprod")</li>
<li> Add a <b>mysql</b> option. (ex: "mysql": "foo@localhost:bar")</li>
</ul></li>
<li> Create a dedicated user/password for your mysql server.</li>
<li> Initialize the database with <b>camtool</b>: <code>camtool dbinit --user=foo --password=bar --host=localhost --dbname=camliprod --wipe </code></li>
</ul>
</p>
<p>
Setting up MongoDB is even simpler, but the MongoDB indexer is not as well tested as the MySQL one.
The UI requires some static resources that are not included by default in the App Engine application directory (<code>server/appengine/</code>). You can define that directory in the server configuration file (<code>server/appengine/config.json</code>), with the <b><code>sourceRoot</code></b> parameter, like so:
<pre>
"/ui/": {
"handler": "ui",
"handlerArgs": {
"sourceRoot": "dir_name",
"jsonSignRoot": "/sighelper/"
}
},
</pre>
You will then have to populate that directory with all the necessary resources (UI static files and closure library files).</br>
Alternatively, you can run <b><code>devcam appengine</code></b> once, which will create and populate the default directory (<code>server/appengine/source_root</code>). Please see the <a href="https://camlistore.googlesource.com/camlistore/+/master/HACKING">HACKING</a> doc to build devcam.