diff --git a/src/main/java/de/ids_mannheim/korap/web/KustvaktServer.java b/src/main/java/de/ids_mannheim/korap/web/KustvaktServer.java
new file mode 100644
index 0000000..86e9da9
--- /dev/null
+++ b/src/main/java/de/ids_mannheim/korap/web/KustvaktServer.java
@@ -0,0 +1,88 @@
+package de.ids_mannheim.korap.web;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import de.ids_mannheim.korap.config.BeansFactory;
+import de.ids_mannheim.korap.config.ContextHolder;
+import de.ids_mannheim.korap.config.KustvaktClassLoader;
+import de.ids_mannheim.korap.exceptions.KustvaktException;
+import de.ids_mannheim.korap.web.service.BootableBeanInterface;
+
+/**
+ * pu
+ * 
+ * @author hanl
+ * @date 28/01/2014
+ */
+public class KustvaktServer extends KustvaktBaseServer {
+
+    public static final String API_VERSION = "v0.1";
+    
+    public static void main (String[] args) throws Exception {
+        KustvaktServer server = new KustvaktServer();
+        kargs = server.readAttributes(args);
+
+        if (kargs.getConfig() != null)
+            BeansFactory.loadFileContext(kargs.getConfig());
+        else
+            BeansFactory.loadClasspathContext("default-config.xml");
+
+        kargs.setRootPackages(new String[] { "de.ids_mannheim.korap.web.utils",
+                "de.ids_mannheim.korap.web.service.full" });
+        rootPackages = "de.ids_mannheim.korap.web.utils;"
+                + "de.ids_mannheim.korap.web.service.full";
+        server.start();
+    }
+
+    @Override
+    protected void setup () {
+        Set<Class<? extends BootableBeanInterface>> set = KustvaktClassLoader
+                .loadSubTypes(BootableBeanInterface.class);
+
+        ContextHolder context = BeansFactory.getKustvaktContext();
+        if (context == null)
+            throw new RuntimeException("Beans could not be loaded!");
+
+        List<BootableBeanInterface> list = new ArrayList<>(set.size());
+//        for (Class cl : set) {
+//            BootableBeanInterface iface;
+//            
+//            try {
+//                iface = (BootableBeanInterface) cl.newInstance();
+//                if (iface instanceof CollectionLoader){
+//                	continue;
+//                }
+//                list.add(iface);
+//            }
+//            catch (InstantiationException | IllegalAccessException e) {
+//                continue;
+//            }
+//        }
+        System.out.println("Found boot loading interfaces: " + list);
+
+        while (!list.isEmpty()) {
+            loop: for (BootableBeanInterface iface : new ArrayList<>(list)) {
+                try {
+                    for (Class dep : iface.getDependencies()) {
+                        if (set.contains(dep))
+                            continue loop;
+                    }
+                    iface.load(context);
+                    list.remove(iface);
+                    set.remove(iface.getClass());
+                    System.out.println("Done with interface "
+                            + iface.getClass().getSimpleName());
+                }
+                catch (KustvaktException e) {
+                    // don't do anything!
+                    System.out.println("An error occurred in class "
+                            + iface.getClass().getSimpleName() + "!\n");
+                    e.printStackTrace();
+                    System.exit(-1);
+                }
+            }
+        }
+    }
+}
diff --git a/src/main/resources/kustvakt.conf b/src/main/resources/kustvakt.conf
new file mode 100644
index 0000000..3ef0604
--- /dev/null
+++ b/src/main/resources/kustvakt.conf
@@ -0,0 +1,55 @@
+## index dir
+krill.indexDir= src/test/resources/sample-index
+
+krill.index.commit.count = 134217000
+krill.index.commit.log = log/krill.commit.log
+krill.index.commit.auto = 500
+krill.index.relations.max = 100
+
+kustvakt.default.pos = tt
+kustvakt.default.lemma = tt
+kustvakt.default.token = opennlp
+kustvakt.default.dep = mate
+kustvakt.default.const = mate
+
+kustvakt.management.registration=enable
+
+kustvakt.regex.free = CC-BY.*
+kustvakt.regex.public = CC-BY.*|ACA.*
+kustvakt.regex.all = CC-BY.*|ACA.*|QAO.*
+
+# server
+server.port=8089
+server.host=localhost
+
+# user configuration
+# user.config = user.conf
+
+ldap.config = file-path-to-ldap-config
+
+## options referring to the security module!
+
+## token expiration time in minutes!
+security.longTokenTTL=150D
+security.tokenTTL=72H
+security.shortTokenTTL=45M
+
+kustvakt.security.jwt.issuer=korap.ids-mannheim.de
+
+## specifies the user data field that is used to salt user passwords
+security.passcode.salt=salt
+
+security.idleTimeoutDuration = 25M
+security.multipleLogIn = true
+security.loginAttemptNum = 3
+security.authAttemptTTL = 45M
+
+security.encryption.loadFactor = 8
+security.validation.stringLength = 150
+security.validation.emailLength = 50
+security.encryption.algo=BCRYPT
+security.sharedSecret=sharedSecret
+security.adminToken=adminToken
+
+## applicable: rewrite, foundry, filter, deny
+security.rewrite.strategies=filter, foundry, rewrite
\ No newline at end of file
