Linux

Where Is the sing-box Config File?

sing-box JSON config at /etc/sing-box/config.json on Linux with check and format commands.

Last updated

sing-box reads its routing, inbounds, outbounds and DNS from a JSON config file, defaulting to /etc/sing-box/config.json for service installs. Desktop and mobile clients keep their own profiles instead.

Validate before restarting or a typo kills the tunnel. The check and format subcommands catch syntax errors while the service keeps running.

Where sing-box stores this, by platform

Linux
/etc/sing-box/config.json

Main service config with log, dns, inbounds, outbounds and route sections. Rule sets and GeoIP databases sit alongside in the same directory. Validate with sing-box check and normalize with sing-box format before restarting the service.

Frequently asked questions

How do I validate a sing-box config?

Run sing-box check against the file above. It reports schema errors without touching the running service.

Where do sing-box rule sets go?

Wherever the config points, commonly /etc/sing-box/ruleset. Local rule files must exist before the service starts or it fails.

Notice an outdated path? Let us know.