Aurora Files documentation

Configuring autodiscover for mobile app

When using mobile app with Aurora Files, normally you would enter just the email address and password - and there has to be a way for a mobile app to determine URL of Aurora Files installation. That is the purpose of the autodiscover feature.

If you enter email address that looks like, mobile app will take the part and will check server to find out Aurora Files installation location from there.

IMPORTANT: autodiscover needs to be set up for the primary domain. For example, if you have a server that hosts website but Aurora Files installation is found on a different server, e.g. - you still need to perform the configuration on webserver that runs website.

To determine the product installation URL, mobile app sends request to URL of the following kind:

The simplest solution is to redirect all the requests sent to that server over to the single Aurora Files installation. To do so, you need to have aurora-autodiscover.json file of the following kind placed at server, under root web directory:


It means that mobile app will connect to Aurora Files installation found at address.

If you have several Aurora Files installations or multiple domains, and you need more complex logic, you'll need to use PHP script instead of static JSON file. You can use the following sample for creating your aurora-autodiscover.php script:

$oResponse = array(
    'url' => '',
    'error' => ''
$aUsers = array(
    "" => ""
$aServers = array(
    "" => "",
    "" => ""
try {
        $sEmail = (string) $_GET['email'];
        $aEmailData = explode('@', $sEmail);
        $sDomain = "";
        if (isset($aEmailData[1])) {
            $sDomain = $aEmailData[1];
        } else {
            $oResponse['error'] = "Incorrect email";
    if (isset($aUsers[$sEmail])) {
        $oResponse['url'] = $aUsers[$sEmail];
    else if (isset($aServers[$sDomain])) {
        $oResponse['url'] = $aServers[$sDomain];
    } else {
        $oResponse['error'] = "Unknown email";
} catch (Exception $e) {
    $oResponse['error'] = $e->getMessage();
header("Content-Type: application/json");
echo json_encode($oResponse);

And since requests will be looking for aurora-autodiscover.json file you'd need to rewrite URLs so aurora-autodiscover.php script is actually executed. For Nginx web server, you can find sample configuration below:

location ~* ^/aurora-autodiscover.json {
        alias /var/www/html/aurora-autodiscover.php;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param HTTPS $ssl;