The Handle System provides a distributed infrastructure to manage persistent identifiers (PID) of digital ressources and resolve to their locations. There are several advantages of the Handle system like: scalability, detailed documentation, typed records structure, working global resolution infrastructure and last but not least – stable and readable Java code. By default a Handle server and its clients are designed to participate in the global PID resolution infrastructure.
But if you like to experiment with a local installation within your development environment you can follow these steps (you should be familiar with the Handle basics and Chapter 11 of the Technical Manual, also read the Handle System Service Agreement http://hdl.handle.net/4263537/5029 for more information).

Server setup:

  1. Download the source of Handle software distribution from handle.net
  2. This distribution comes with a SimpleSetup tool (see also the docs :Handle Manual), you have to edit some lines of the net.handle.server.SimpleSetup source file to be able to configure the server to run on 127.0.0.1 (you could do this by editing the config.dct file, but then there will be more work to set up the client). Change the getIPAddress() function to (commenting IP number check):
    /******************************************************************************
    * Get IP address for server
    */
    private static InetAddress getIPAddress()
    throws Exception
    {
    String localAddress = "",
    prompt = "Through what IP address will this server be accessible?";
    try {
    localAddress = InetAddress.getLocalHost().getHostAddress();
    }
    catch (Exception e)
    {
    localAddress = "";
    }
    if (localAddress.length() > 0)
    prompt = prompt + " [" + localAddress + "]";while (true)                                 // I.e., until "break" on success
    {
    String line = responseToPrompt(prompt);
    if ((line.equals("")) && (localAddress.length() > 0))
    line = localAddress;try {
    InetAddress listenAddr = InetAddress.getByName(line);
    /*  if (listenAddr.getHostAddress().startsWith("127."))
    throw new Exception("you must enter an address that is accessible from the network");*/
    return listenAddr;                                      // Success
    }
    catch (Exception e)
    {
    out.println("Invalid address (" + e + "), please try again.");
    }
    }
    }
  3. Compile net.handle.server.SimpleSetup and run it. (I imported the source to Eclipse and run it directly from there)
  4. Answer the questions as described in the manual. Use 127.0.0.1 as IP to run it locally.
  5. Home a prefix of your choice by inserting it to the nas table (nas.jdb).
    1. Run the provided DBTool
      java -cp  ./bin/handle.jar net.handle.apps.db_tool.DBTool ./svr_1/
    2. Add a test naming authority like 0.NA/1 .
    3. Add a handle for the admin 1/ADMIN with HS_PUBKEY and HS_SECKEY type at index 300 and 301 (so you can experiment with both authentication methods):
      300 HS_PUBKEY 1110 <hexcode of your pubkey>
      301 HS_SECKEY 1110 secret
      (I couldn’t get the variant using FILE <path>/svr_1/admpub.bin as value here to work, cause FILE contents is not read from the server prior to authentication, the path to admins pubkey assumes that servers working dir is “pathtohandleserver”/hs or set Java property -Duser.dir=”pathtohandleserver”/hs on start up)
    4. Create a few handles like 1/TEST with HS_ADMIN at index 100: use DBTools “Create Handle” -> Enter New Handle:”1/TEST” -> Ok -> Add -> Index: 100 , Type: HS_ADMIN , Data-Edit: select Admin Info and fill in Admin ID Handle: 1/ADMIN and Admin ID Index: 300 (or 301), set appropriate rights, add further values and types.
  6. Edit the servers config.dct file:
    1. Add configuration options for independend server:
      "server_config" = {
      "server_admin_full_access" = "y"
      "allow_na_admins" = "no"
    2. Change admin values to
      "server_admins" = (
      "300:1/ADMIN"
      "301:1/ADMIN"
      )
      and same for other admin elements.
  7. Start up server
    /hs$ java -cp ./bin/handle.jar net.handle.server.Main svr_1/

Configure Client (linux):

  1. Create ~/.handle directory in users home.
  2. $ cp  “pathothandleserver”/hs/svr_1/siteinfo.bin ~/.handle/resolver_site
  3. In ~./handle create a file local_nas, which should contain one prefix on each line. Every request for a handle having a prefix contained in this file will be sent to the local resolution site. Add one line “O.NA/1″.
  4. Restart server and browse the proxy at http://127.0.0.1:8000 .