# Internal Server Error after moving Nextcloud

**URL:** <https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811>\
**Category:** ℹ️ Support\
**Created:** [March 30, 2020, 1:40am UTC](https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811 "2020-03-30T01:40:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonathanwerle](https://help.nextcloud.com/letter_avatar/jonathanwerle/32/5_5575768a8748004e209b776fc1b2916d.png) [@jonathanwerle](https://help.nextcloud.com/u/jonathanwerle)\
**Post date:** [March 30, 2020, 1:40am UTC](https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811/1 "2020-03-30T01:40:12Z")

</div>

> **Support intro**
>
> Sorry to hear you’re facing problems 🙁
> 
> _**[help.nextcloud.com](http://help.nextcloud.com) is for home/non-enterprise users. If you’re running a business, paid support can be accessed via [portal.nextcloud.com](http://portal.nextcloud.com) where we can ensure your business keeps running smoothly.**_
> 
> In order to help you as quickly as possible, before clicking **Create Topic** please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
> 
> ```
> example
> 
> ```
> 
> Or for longer, use three backticks above and below the code snippet:
> 
> ```auto
> longer
> example
> here
> 
> ```
> 
> Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can ❤

Nextcloud version _(eg, 12.0.2)_: 17.0.5.  
Operating system and version _(eg, Ubuntu 17.04)_: Ubuntu 18.04.4 LTS  
Apache or nginx version _(eg, Apache 2.4.25)_: 2.4.29  
PHP version _(eg, 7.1)_: 7.2.24

The issue you are facing:

I’m hosting Nextcloud on a virtual server. Until yesterday it ran on a Ubuntu 16.04. Server, but for (not further discussed) reasons i had to move my Nextcloud server to the clean and freshly installed Server specified above.

Using the [Nextcloud Backup and Restore documentation](https://docs.nextcloud.com/server/17/admin_manual/maintenance/backup.html), i made a backup of my Nextcloud-Folder and Database and moved it to the “new” server.  
After installing all the required packages and php-extensions the Nextcloud server displays an internal server error with the following error message:

 ![image](https://help.nextcloud.com/uploads/default/original/3X/d/f/df2f67f1c199897e695400c6ec35f9ffd5cceebc.png)

Thank you very much for your help in advance!

Is this the first time you’ve seen this error? _(Y/N)_: Y

Steps to replicate it:

1. ?
2. 
3. 

The output of your Nextcloud log in **Admin \> Logging** :

```auto
PASTE HERE

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
<?php
$CONFIG = array (
  'instanceid' => 'MYID',
  'passwordsalt' => 'MYPASSWORDSALT',
  'secret' => 'MYSECRET',
  'trusted_domains' =>
  array (
    0 => 'cloud.example.com',
    1 => 'c.example.com',
  ),
  'datadirectory' => '/var/www/MYCLOUD/data',
  'dbtype' => 'mysql',
  'version' => '17.0.5.0',
  'dbname' => 'DBNAME',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'DBUSER',
  'dbpassword' => 'DBPASSWORD',
  'logtimezone' => 'UTC',
  'installed' => true,
  'maintenance' => true,
  'theme' => '',
  'logfile' => 'nextcloud.log',
  'loglevel' => 'All',
  'debug' => true,
  'data-fingerprint' => 'DATAFINGERPRINT',
  'updater.release.channel' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_from_address' => 'XYZ',
  'mail_smtpmode' => 'smtp',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_domain' => 'mail.example.com',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'mysql.utf8mb4' => true,
  'mail_smtpsecure' => 'ssl',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.example.com',
  'mail_smtpport' => '465',
  'mail_smtpname' => 'host@mail.example.com ',
  'mail_smtppassword' => 'MYTOPSECRETPASSWORD',
  'app_install_overwrite' =>
  array (
    0 => 'files_downloadactivity',
    1 => 'admin_notifications',
  ),
  'trashbin_retention_obligation' => 14,
  'updater.secret' => 'UPDATERSECRET',
);

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:

```auto
(no relevant information displayed :/)

```

---

<div class="post-metadata">

**Author:** ![thijssie85](https://help.nextcloud.com/letter_avatar/thijssie85/32/5_5575768a8748004e209b776fc1b2916d.png) [@thijssie85](https://help.nextcloud.com/u/thijssie85)\
**Post date:** [March 30, 2020, 2:02am UTC](https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811/2 "2020-03-30T02:02:40Z")

</div>

Is it possible to delete everything on the server, except:

```
apps - if you have special apps.
config
data

```

And untar the zip from [nextcloud.com](http://nextcloud.com).

---

<div class="post-metadata">

**Author:** ![devnull](https://help.nextcloud.com/user_avatar/help.nextcloud.com/devnull/32/27793_2.png) [@devnull](https://help.nextcloud.com/u/devnull)\
**Post date:** [March 30, 2020, 6:53am UTC](https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811/3 "2020-03-30T06:53:57Z")

</div>

“MySqlExpressionBuilder not found” ???

Look for lib/private/DB/QueryBuilder/ExpressionBuilder/MySqlExpressionBuilder.php

---

<div class="post-metadata">

**Author:** ![jonathanwerle](https://help.nextcloud.com/letter_avatar/jonathanwerle/32/5_5575768a8748004e209b776fc1b2916d.png) [@jonathanwerle](https://help.nextcloud.com/u/jonathanwerle)\
**Post date:** [March 30, 2020, 12:48pm UTC](https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811/4 "2020-03-30T12:48:29Z")

</div>

Thank you for your fast answer! I’ll give it a try.  
Deleted everything but the apps, config and data folder and the logfile:

 ![image](https://help.nextcloud.com/uploads/default/original/3X/e/6/e6ff6d309ce277cc380d579ceb125bdefe2c1540.png)

And downloaded the nextcloud release (v17.0.5 -\> same as my instance) and extracted it to my document root. Edited the file permissions with `chown` and `chmod` and restarted apache (`service apache2 restart`) just to be safe.

And finally i can log in to my nextcloud instance and the issue seems to be resolved.  
Even though i don’t think this step **should** be necessary, it **solved** my problem.  
Thank you all very much!

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 9:25pm UTC](https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811/5 "2024-12-11T21:25:37Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 9:25pm UTC](https://help.nextcloud.com/t/internal-server-error-after-moving-nextcloud/75811/6 "2024-12-11T21:25:38Z")

</div>


