Linux

Where Does snac2 Store Data?

snac2 keeps accounts and posts as JSON files under a base dir you choose at init. Layout and backup notes.

Last updated

snac2 has no database. The single C binary stores everything as JSON files under a base directory you pick when initializing, often a folder in home. Server config, per-user configs, queued federation work and posted objects each get their own corner.

That choice-at-init design means no two installs share a path unless admins copy each other. The file names matter: server.json for the instance, user.json per actor. Older writeups naming server.ini or actor.json describe files that do not exist. Back up the whole tree at once, since posts without their actor files orphan.

Where snac2 stores this, by platform

Linux
$HOME/snac-data/server.json

Example base dir; yours is whatever init created. Per-actor configs at user/<name>/user.json, objects in object, queues in queue and user queues, tokens in token, logs in log. Single binary plus filesystem store: no Postgres or Redis to back up.

Frequently asked questions

How do I back up a snac2 instance?

Stop the daemon and copy the entire base directory. JSON files, queues and keys move as one unit. Restoring half the tree orphans posts from actors, so keep the whole snapshot together and note which folder yours uses.

Where is the snac2 config file?

At server.json directly inside your base directory, with per-user user.json files under user/<name>. There is no server.ini and no actor.json despite older mentions. Run init in an empty folder to see the canonical layout.

Does snac2 need Postgres or Redis?

No. The filesystem is the database here, which is the point of the project. That removes two backup targets compared with Mastodon-style stacks. The tradeoff is manual queue inspection instead of SQL queries.

Notice an outdated path? Let us know.