Linux

Where Does Grocy Store Its Data?

Grocy keeps all state in its data directory: config, SQLite database, uploads, backups, and view cache in one place.

Last updated

Grocy is stateful in exactly one directory. A bare install uses a data folder next to the web root, with config.php, the SQLite database, backups, and storage below it. Copy that folder and you have copied Grocy.

Docker images only change where that directory is mounted. The classic image persists /var/www/data. LinuxServer images persist /config. Bind mounts start empty and hide the image default config, so prefer named volumes unless you seed config.php yourself.

Where Grocy stores this, by platform

Linux
/var/www/data

Classic container path. Back up the full volume, not just the db subfolder. Stop the container first so SQLite is not mid write.

Linux
/config

LinuxServer image path. The Grocy database, settings, and backups all live below this mount on the host folder you chose.

Frequently asked questions

How do I back up a self hosted Grocy install?

Copy the data directory while Grocy is stopped. That captures config.php, the SQLite file, storage uploads, and backups together. Restoring one file alone leaves a split install.

Do I need to migrate the database after updating?

Visit the main route once after the upgrade. Grocy runs pending database migrations on that first page load. Skipping that step leaves the schema behind the code.

Where is data in the LinuxServer Grocy container?

Map a host folder to /config in compose. LinuxServer keeps the database and settings under that mount, so a bare container without the mount loses everything on recreate.

Notice an outdated path? Let us know.