First register a new user.
To make the new user an admin, use the File Manager and edit /app/data/conf/local.php:
<?php
$conf['superuser'] = "userid1,userid2";
Disabling registrationTo
disable registration,
Admin ->
Configuration Manager ->
Disable DokuWiki actions and check
Register.