Linux

Where Does Gogs Store Repositories and Config?

Gogs repositories, config, and data folders for binary installs and the official Docker image paths.

Last updated

Gogs separates code, config, and database cleanly. Repositories live under a repo root that defaults to ~/gogs-repositories for binary installs. Config lives in custom/conf/app.ini next to the binary. The SQLite database sits in data/gogs.db when SQLite is in use.

Docker moves the whole tree under /data. Repos are at /data/gogs-repositories, config at /data/gogs/conf/app.ini, and uploads beside them. Check app.ini first on any unfamiliar host. Its paths override every documented default, so trust it over guides.

Where Gogs stores this, by platform

Linux
~/gogs-repositories

Binary install defaults. The custom folder beside it holds app.ini, which can relocate every path here. Check REPO_ROOT before assuming.

Linux
/data/gogs

Docker image persistence root. Mount a volume here to survive container replacement. Contains git repositories, avatars, attachments, and the SQLite file.

Frequently asked questions

how do i find where my Gogs repos actually live

Open custom/conf/app.ini and read the REPO_ROOT and DB settings. Binary installs vary by user, Docker uses /data. The ini file is the reliable pointer when guides disagree.

what do i back up for a Gogs migration

Copy the repositories folder, the custom folder with app.ini, and a database dump. SQLite users can copy the gogs.db file directly. That trio restores users, issues, and code.

Notice an outdated path? Let us know.