> Migrate the data directory in ntopng/nEdge Up to release 3.6 ntopng on Unix systems is using ‘ /var/tmp/ntopng’ as default directory for storing historical…

# Migrate the data directory in ntopng/nEdge

Up to release 3.6 ntopng on Unix systems is using ‘*/var/tmp/ntopng’* as default directory for storing historical data, and ‘*nobody*‘ as default user.

Since ntopng 3.7, for security reasons, the default setting for the data directory has been changed to ‘*/var/lib/ntopng’*, and the default user has been changed to ‘*ntopng*‘ (which is created during package installation if you are installing from our repositories, otherwise it keeps using ‘*nobody*‘).

In order to maintain backward compatibility, if you are already using ‘*/var/tmp/ntopng’* as data directory, ntopng keeps using that folder, owned by ‘*nobody*‘. This said, using the old defaults is not recommended and a manual action is required in order to migrate to the new settings, unless you are already using a custom directory:

1.  stop ntopng (or nedge)
2.  move ‘*/var/tmp/ntopng’* to ‘*/var/lib/ntopng’*
3.  change the owner to ‘*ntopng’*
4.  start ntopng (or nedge)

Example on systemd-based systems:

```
systemctl stop ntopng
rmdir /var/lib/ntopng
mv /var/tmp/ntopng /var/lib/ntopng
chown -R ntopng:ntopng /var/lib/ntopng
systemctl start ntopng
```

Please note that it is still possible to customize the data directory path using the *–data-dir|-d <path>* parameter to override the default settings.

## Related questions

-   [ClickHouse fails with "Illegal instruction" when used with ntopng. What can I do?](https://www.ntop.org/faq/ntopng-clickhouse-illegal-instruction/)
-   [Do ntopng Professional and Enterprise licenses need to be activated?](https://www.ntop.org/faq/do-ntopng-professional-and-enterprise-licenses-need-to-be-activated/)
-   [How to use PagerDuty to Deliver ntopng Alerts](https://www.ntop.org/faq/how-to-use-pagerduty-to-deliver-ntopng-alerts/)

## Learn more about ntopng

-   [ntopng overview and features](https://www.ntop.org/products/traffic-analysis/ntopng/)
-   [Tags in ntopng: Automatically Spot (and Track) Misconfigured Hosts](https://www.ntop.org/asset-tags-and-ttl/)
-   [ntopng 7.0 in Practice: Network Visibility and Security Monitoring with Open Source](https://www.ntop.org/ntopng-7-practice/)
-   [All frequently asked questions](https://www.ntop.org/support/need-help/faq/)

## Ready to see it on your network?

Download the free Community edition, or talk to the ntop team about scale, licensing and support.

[Download ntopng free](https://www.ntop.org/support/documentation/software-installation/)[Talk to an engineer](https://www.ntop.org/support/need-help/contacts/)
Source: https://www.ntop.org/faq/migrate-the-data-directory-in-ntopng-nedge/