How do I set max open files for Debian installs

When perfoming an install of Neo4j using the Debian install kit and as detailed at, upon completion you will need to configure the linux configuration option for max files. If not configured you may encounter errors with a stack trace that includes /data/graph.db/schema/label/lucene/_3qn3.fdt (Too many open files) at

or similar.

To configure one needs to create/edit /etc/default/neo4j and define it to include


Upon start of Neo4j via

service neo4j-service start

the /etc/default/neo4j will be read and the environment variable NEO4J_ULIMIT_NOFILE will then be used in the expression


and thus set the max open files.