diff --git a/apps/user_ldap/ajax/getNewServerConfigPrefix.php b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
new file mode 100644
index 0000000000000000000000000000000000000000..1a5f78cf214ebbf804c6787cf93461ce4247c7f4
--- /dev/null
+++ b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
@@ -0,0 +1,39 @@
+<?php
+
+/**
+ * ownCloud - user_ldap
+ *
+ * @author Arthur Schiwon
+ * @copyright 2013 Arthur Schiwon blizzz@owncloud.com
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public
+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+// Check user and app status
+OCP\JSON::checkAdminUser();
+OCP\JSON::checkAppEnabled('user_ldap');
+OCP\JSON::callCheck();
+
+$query = \OCP\DB::prepare('
+	SELECT DISTINCT `configkey`
+	FROM `*PREFIX*appconfig`
+	WHERE `configkey` LIKE ?
+');
+$serverConnections = $query->execute(array('%ldap_login_filter'))->fetchAll();
+sort($serverConnections);
+$lk = array_pop($serverConnections);
+$ln = intval(str_replace('s', '', $lk));
+$nk = 's'.str_pad($ln+1, 2, '0', STR_PAD_LEFT);
+OCP\JSON::success(array('configPrefix' => $nk));
\ No newline at end of file
diff --git a/apps/user_ldap/js/settings.js b/apps/user_ldap/js/settings.js
index 7063eead96a3bdfa785de615ff132be788767a52..8cd31301f2e5bc744dc820a65a399fb1ca98f67e 100644
--- a/apps/user_ldap/js/settings.js
+++ b/apps/user_ldap/js/settings.js
@@ -21,4 +21,37 @@ $(document).ready(function() {
 			}
 		);
 	});
+
+	$('#ldap_serverconfig_chooser').change(function(event) {
+		value = $('#ldap_serverconfig_chooser option:selected:first').attr('value');
+		if(value == 'NEW') {
+			$.post(
+				OC.filePath('user_ldap','ajax','getNewServerConfigPrefix.php'),
+				function (result) {
+					if(result.status == 'success') {
+						OC.dialogs.confirm(
+							'Take over settings from recent server configuration?',
+							'Keep settings?',
+							function(keep) {
+								if(!keep) {
+									$('#ldap').find('input[type=text], input[type=password], textarea, select').val('');
+									$('#ldap').find('input[type=checkbox]').removeAttr('checked');
+								}
+							}
+						);
+						$('#ldap_serverconfig_chooser option:selected:first').removeAttr('selected');
+						var html = '<option value="'+result.configPrefix+'" selected>'+$('#ldap_serverconfig_chooser option').length+'. Server</option>';
+						$('#ldap_serverconfig_chooser option:last').before(html);
+					} else {
+						OC.dialogs.alert(
+							result.message,
+							'Cannot add server configuration'
+						);
+					}
+				}
+			);
+		} else {
+			alert(value);
+		}
+	});
 });
\ No newline at end of file
diff --git a/apps/user_ldap/settings.php b/apps/user_ldap/settings.php
index e49f37da2de6d2ebb93e067bd14fb0f38e19c33a..35233dc987a20396598f8fb53305b012f82ff5b7 100644
--- a/apps/user_ldap/settings.php
+++ b/apps/user_ldap/settings.php
@@ -76,5 +76,6 @@ $tmpl->assign( 'ldap_cache_ttl', OCP\Config::getAppValue('user_ldap', 'ldap_cach
 $hfnr = OCP\Config::getAppValue('user_ldap', 'home_folder_naming_rule', 'opt:username');
 $hfnr = ($hfnr == 'opt:username') ? '' : substr($hfnr, strlen('attr:'));
 $tmpl->assign( 'home_folder_naming_rule', $hfnr, '');
+$tmpl->assign('serverConfigurationOptions', '', false);
 
 return $tmpl->fetchPage();
diff --git a/apps/user_ldap/templates/settings.php b/apps/user_ldap/templates/settings.php
index 030fbff4aac13d09a2be037d2cdf771be0bae348..c3ec20fc847463247e86971536cde0e9be9794a6 100644
--- a/apps/user_ldap/templates/settings.php
+++ b/apps/user_ldap/templates/settings.php
@@ -12,6 +12,11 @@
 		}
 		?>
 	<fieldset id="ldapSettings-1">
+		<p><label for="ldap_serverconfig_chooser"><?php echo $l->t('Server configuration');?></label><select id="ldap_serverconfig_chooser" name="ldap_serverconfig_chooser">
+		<option value="" selected><?php echo $l->t('Default (1. Server)');?></option>
+		<?php echo $_['serverConfigurationOptions']; ?>
+		<option value="NEW"><?php echo $l->t('Add Server Configuration');?></option>
+		</select></p>
 		<p><label for="ldap_host"><?php echo $l->t('Host');?></label><input type="text" id="ldap_host" name="ldap_host" value="<?php echo $_['ldap_host']; ?>" title="<?php echo $l->t('You can omit the protocol, except you require SSL. Then start with ldaps://');?>"></p>
 		<p><label for="ldap_base"><?php echo $l->t('Base DN');?></label><textarea id="ldap_base" name="ldap_base" placeholder="<?php echo $l->t('One Base DN per line');?>" title="<?php echo $l->t('You can specify Base DN for users and groups in the Advanced tab');?>"><?php echo $_['ldap_base']; ?></textarea></p>
 		<p><label for="ldap_dn"><?php echo $l->t('User DN');?></label><input type="text" id="ldap_dn" name="ldap_dn" value="<?php echo $_['ldap_dn']; ?>" title="<?php echo $l->t('The DN of the client user with which the bind shall be done, e.g. uid=agent,dc=example,dc=com. For anonymous access, leave DN and Password empty.');?>" /></p>