Clamshell: Documentation

Last modification: 2008/07/20 23:55

Quick Start

Setting up Clamshell takes just four steps:

  1. Download the source
  2. Unzip into a directory on your favourite webserver
  3. Make sure that your web server has write access to the users/ subdirectory.
  4. Visit http://<server>/<clamshell dir>/?admin=true to set up OpenID usernames


  • HTTP server such as Apache (recommended)
  • PHP 4.3+
  • PHP must either be compiled with BcMath enabled (most are), or GMP must be installed (see below)


  • Clamshell runs best on a server which supports URL rewriting, such as Apache with mod_rewrite enabled. Most Linux distros come pre-configured with this setup. An off-the-shelf solution for Windows is IndigoPerl.
  • Performance and/or security notes:
    • You can install the GMP 'big math' library to get improved performance
    • There are no cryptographically secure random sources available on Windows for PHP. On Linux distros, /dev/urandom will be used if available.

Administering Clamshell

  • Access the admin pages by adding "?admin=true" to the Clamshell URL, ie. http://server/Clamshell?admin=true. You will be prompted to authenticate - default is "admin" with password "admin".
  • To modify the user designated as administrator, add a new user to the Admin console, then add a new preference in conf\prefs.module as follows:
'opt_user_admin' => 'myuser', // 'myuser' is the name of the new admin user

Using your OpenID

  • All OpenIDs created through the Administration pages can be supplied as a number of different URLs. For example, if your server is installed at, and you have set up an OpenID for bob, all of these will work:
    • (recommended, requires mod_rewrite)

Delegating an OpenID to Clamshell

You can also manually delegate any URL which you control to act as an OpenID using Clamshell. Simply add two lines to the <head> section of the page you wish to delegate. As an example, you could modify as follows:

<link rel="openid.server" href="http://<server>/<clamshell dir>/clamshell.php?u=bob">
<link rel="openid.delegate" href="http://<server>/<clamshell dir>/clamshell.php?u=bob">

Once this has been done, you can enter anywhere an OpenID is valid and Clamshell will do the rest.

Testing the Server


Questions? Comments? Send us your feedback.