# Database Drivers

Since Speedtest Tracker is built on the Laravel Framework any of the framework's supported database [drivers](https://laravel.com/docs/10.x/database#configuration) are also supported.

SQLite ships as the default driver but you can also use MySQL/MariaDB/Postgres.

> While SQL Server is supported by Laravel it hasn't been tested with Speedtest Tracker so no support will be provided for that driver.

***

### Driver Options

#### SQLite (Default)

SQLite is a good option for simple installs. The database will be create automatically inside the docker volume.

| Environment Variable | Value    |
| -------------------- | -------- |
| `DB_CONNECTION`      | `sqlite` |

#### MariaDB

| Environment Variable | Value                                                    |
| -------------------- | -------------------------------------------------------- |
| `DB_CONNECTION`      | `mariadb`                                                |
| `DB_HOST`            | The FQDN or address to the database instance.            |
| `DB_PORT`            | `3306` is the default port but can depend on your setup. |
| `DB_DATABASE`        | Name of the database you'll connect to.                  |
| `DB_USERNAME`        | User that'll be used to connect to the database.         |
| `DB_PASSWORD`        | Password for the user above.                             |

#### MySQL

| Environment Variable | Value                                                    |
| -------------------- | -------------------------------------------------------- |
| `DB_CONNECTION`      | `mysql`                                                  |
| `DB_HOST`            | The FQDN or address to the database instance.            |
| `DB_PORT`            | `3306` is the default port but can depend on your setup. |
| `DB_DATABASE`        | Name of the database you'll connect to.                  |
| `DB_USERNAME`        | User that'll be used to connect to the database.         |
| `DB_PASSWORD`        | Password for the user above.                             |

#### Postgres

| Environment Variable | Value                                                    |
| -------------------- | -------------------------------------------------------- |
| `DB_CONNECTION`      | `pgsql`                                                  |
| `DB_HOST`            | The FQDN or address to the database instance.            |
| `DB_PORT`            | `5432` is the default port but can depend on your setup. |
| `DB_DATABASE`        | Name of the database you'll connect to.                  |
| `DB_USERNAME`        | User that'll be used to connect to the database.         |
| `DB_PASSWORD`        | Password for the user above.                             |
| `DB_SEARCH_PATH`     | To change the database schema used by Postgres.          |


---

# 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.speedtest-tracker.dev/getting-started/database-drivers.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.
