# Editing the config file

System-wide settings are stored in the config file. The default location is `/nidb/nidb.cfg`.

The NiDB Settings page allows you to edit the configuration file directly. When the page is saved, the config file is updated. But the config file can be edited manually, which is useful when the website is unavailable or you need to edit settings through the command line. To edit the file by hand, start vim from a terminal. (if `vim` is not be installed on your system, run `sudo yum install vim`)

```bash
vim /nidb/nidb.cfg
```

This will start vim in the terminal. Within vim:

1. Use the arrow keys to navigate to the variable you want to edit
2. Press the `[insert]` key
3. Edit as normal
4. When done editing, press `[esc]` key
5. Type `:wq` which will save the file and quit `vim`

### Special Config Variables

Some variables can only be changed by editing the config file directly and cannot be changed from the NiDB settings page.

`offline` - Set to `1` if the website should be unavailable to users, `0` for normal access. Default is `0`

`debug` - Set to `1` if the website should print out every SQL statement, and other debug information. Default is `0`

`hideerrors` - Set to `1` if the website should hide SQL errors from the user. 0 otherwise. Default is `0`


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.neuroinfodb.org/nidb/tutorials/administration-of-users-projects-and-system/editing-the-config-file.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
