Linux

Where Does GitLab Runner Store Config and Builds?

Where the GitLab Runner CI agent keeps its full config.toml file, session data, and build folders.

Last updated

GitLab Runner centers on config.toml: /etc/gitlab-runner/config.toml for system installs, ~/.gitlab-runner/config.toml for user installs, a mounted file in Docker. Executors, tokens, and concurrency all live there.

Builds fan out into managed work directories the runner owns and prunes. Backups mean the config file plus external cache; job workspaces are disposable by nature. The verify subcommand checks the config before restarts, catching most typos early. Fleeting VMs need no backup.

Where GitLab Runner stores this, by platform

Linux
/etc/gitlab-runner/config.toml

config.toml with executor blocks and tokens here for root installs. The service runs as gitlab-runner or root depending on install flags. Keep the registration tokens out of shared dotfiles.

Frequently asked questions

which gitlab runner files should i edit

Only config.toml (executor settings, tokens, concurrency). Never edit the session files in the work dirs; the runner manages those. After edits run gitlab-runner verify and restart the service. Tokens in the file grant pipeline access, so guard it.

where are gitlab runner build files

Under the builds/ and cache/ directories the runner manages (location per executor: shell, docker volumes, or custom). Failed job workspaces linger here until cleaned. The runner prunes them on configure, so manual deletion is rarely needed.

does gitlab runner in docker need volumes

Yes for cache and artifacts across runs, or every job downloads the world fresh. The runner itself needs only its config persisted; build dirs are disposable by design. Mount the config plus cache volumes and nothing else.

Notice an outdated path? Let us know.