# Quick start

Get started with QuestDB, as quickly as possible. Instructions for docker, homebrew, our binaries, and more.

This guide will get your first QuestDB instance running.

As the goal is to, well, _start quickly_, we'll presume defaults.

Once running, we'll provide guides for inserting data, configuration and
production hosting.

> **QuestDB already running? [Jump ahead!](/docs/getting-started/quick-start/#bring-your-data)
> Select a first-party client or ingest method.**

:::tip Upgrading an existing instance?
See the [Upgrade QuestDB](/docs/operations/upgrade/) guide.
:::

## Install QuestDB

Choose from the following options:

- [Docker](#docker)
- [Homebrew](#homebrew)
- [Binaries](#binaries)

### Docker

To use Docker, one must have Docker. You can find installation guides for your
platform on the [official documentation](https://docs.docker.com/get-docker/).

Once Docker is installed, pull and run QuestDB:

```shell
docker run -p 9000:9000 -p 8812:8812 -p 9003:9003 questdb/questdb:9.4.0
```

This exposes the Web Console (9000), PostgreSQL wire (8812), and health endpoint (9003).

For deeper instructions, see the
[Docker deployment guide](/docs/deployment/docker/).

### Homebrew

To install QuestDB via [Homebrew](https://brew.sh/), run the following command:

```shell
brew install questdb
```

On macOS, the location of the root directory of QuestDB and
[server configuration](/docs/configuration/overview/) files depend on the chip:

- Apple Silicon (M1/M2/M\*) chip: `/opt/homebrew/var/questdb`

- Intel chip: `/usr/local/var/questdb`

### Binaries

export const platforms = [
  { label: "Linux", value: "linux" },
  { label: "Windows", value: "windows" },
  { label: "Any (no JVM)", value: "noJre" },
];

Download and run QuestDB via binaries.

Select your platform of choice:

<!-- prettier-ignore-start -->

<TabsPlatforms
  platforms={platforms}
  render={({ platform, href }) => {
    const filename = href.split("/").reverse()[0];
    switch (platform) {
      case "noJre":
        return <NoJrePrerequisite href={href} label={filename} />;
      case "windows":
        return (
          <>
            Download the executable: {" "}
            <br />
            <br />
              <Button href={href} uppercase={false} variant="plain">
                {filename}
              </Button>
            <br />
            <br />
            The default root directory becomes:
            <br />
            <br />
            

```shell
{`C:\\Windows\\System32\\qdbroot`}
```

          </>
        );
      default:
        return (
          <>
            Download the binary:{" "}
            <br />
            <br />
            <Button href={href} uppercase={false} variant="plain">
             {filename}
            </Button>
            <br />
            <br />
            Next, unpack it:{" "}
            <br />
            <br />
            

```shell
{`tar -xvf ${filename}`}
```

            The default directory becomes:
            <br />
            <br />
            

```shell
{`$HOME/.questdb`}
```

          </>
        );
    }
  }}
/>

<!-- prettier-ignore-end -->

## Run QuestDB

<Tabs defaultValue="nix" values={[ { label: "Linux/No JVM", value: "nix"
}, { label: "macOS (Homebrew)", value: "macos" }, { label: "Windows", value:
"windows" }, ]}>

<!-- prettier-ignore-end -->

<TabItem value="nix">

```shell
./questdb.sh start
```

To stop: `./questdb.sh stop` | To check status: `./questdb.sh status`

<details>
<summary>All options</summary>

```shell
./questdb.sh [start|stop|status] [-d dir] [-f] [-n] [-t tag]
```

| Option | Description                                                                                                                                                                                                                                          |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-d`   | Expects a `dir` directory value which is a folder that will be used as QuestDB's root directory. For more information and the default values, see the [default root](/docs/configuration/overview/#default-root-directory) section below. |
| `-t`   | Expects a `tag` string value which will be as a tag for the service. This option allows users to run several QuestDB services and manage them separately. If this option is omitted, the default tag will be `questdb`.                              |
| `-f`   | Force re-deploying the [Web Console](/docs/getting-started/web-console/overview/). Without this option, the [Web Console](/docs/getting-started/web-console/overview/) is cached and deployed only when missing.                                                                                       |
| `-n`   | Do not respond to the HUP signal. This keeps QuestDB alive after you close the terminal window where you started it.                                                                                                                                 |

</details>

</TabItem>

<TabItem value="macos">

```shell
questdb start
```

To stop: `questdb stop` | To check status: `questdb status`

<details>
<summary>All options</summary>

```shell
questdb [start|stop|status] [-d dir] [-f] [-n] [-t tag]
```

| Option | Description                                                                                                                                                                                                                                          |
| ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `-d`   | Expects a `dir` directory value which is a folder that will be used as QuestDB's root directory. For more information and the default values, see the [default root](/docs/configuration/overview/#default-root-directory) section below. |
| `-t`   | Expects a `tag` string value which will be as a tag for the service. This option allows users to run several QuestDB services and manage them separately. If this option is omitted, the default tag will be `questdb`.                              |
| `-f`   | Force re-deploying the [Web Console](/docs/getting-started/web-console/overview/). Without this option, the [Web Console](/docs/getting-started/web-console/overview/) is cached and deployed only when missing.                                                                                       |
| `-n`   | Do not respond to the HUP signal. This keeps QuestDB alive after you close the terminal window where you started it.                                                                                                                                 |

</details>

</TabItem>

<TabItem value="windows">

```shell
questdb.exe start
```

To stop: `questdb.exe stop` | To check status: `questdb.exe status`

<details>
<summary>All options</summary>

```shell
questdb.exe [start|stop|status|install|remove] \
  [-d dir] [-f] [-j JAVA_HOME] [-t tag]
```

| Option    | Description                                                                                                                                                                                                                                          |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `install` | Installs the Windows QuestDB service. The service will start automatically at startup.                                                                                                                                                               |
| `remove`  | Removes the Windows QuestDB service. It will no longer start at startup.                                                                                                                                                                             |
| `-d`      | Expects a `dir` directory value which is a folder that will be used as QuestDB's root directory. For more information and the default values, see the [default root](/docs/configuration/overview/#default-root-directory) section below. |
| `-t`      | Expects a `tag` string value which will be as a tag for the service. This option allows users to run several QuestDB services and manage them separately. If this option is omitted, the default tag will be `questdb`.                              |
| `-f`      | Force re-deploying the [Web Console](/docs/getting-started/web-console/overview/). Without this option, the [Web Console](/docs/getting-started/web-console/overview/) is cached and deployed only when missing.                                                                                       |
| `-j`      | **Windows only!** This option allows to specify a path to `JAVA_HOME`.                                                                                                                                                                               |

</details>

</TabItem>

</Tabs>

<!-- prettier-ignore-start -->

## Verify installation

Open `http://localhost:9000` in your browser.

You should see the QuestDB [Web Console](/docs/getting-started/web-console/overview/).

Try running your first query in the SQL editor:

```questdb-sql
CREATE TABLE test (ts TIMESTAMP, val DOUBLE) TIMESTAMP(ts);
INSERT INTO test VALUES (now(), 42.5);
SELECT * FROM test;
```

The `TIMESTAMP(ts)` clause makes this a time-series table — it's what enables
QuestDB's sub-millisecond time-range queries. See
[Schema design](/docs/schema-design-essentials/) to understand this and other
key concepts.

It works? You're ready to bring your data.

**Default ports:**

| Port | Service |
|------|---------|
| `9000` | [REST API](/docs/query/rest-api/) and [Web Console](/docs/getting-started/web-console/overview/) |
| `9009` | [InfluxDB Line Protocol (ILP)](/docs/ingestion/ilp/overview/) - Legacy TCP, use HTTP instead |
| `8812` | [PostgreSQL Wire Protocol](/docs/query/pgwire/overview/) |
| `9003` | [Health endpoint](/docs/operations/logging-metrics/#minimal-http-server) |

## Bring your data

Now... Time to really blast-off. 🚀

Next up: Bring your data - the _life blood_ of any database.

Choose from one of our premium ingest-only language clients:

**ILP Clients**

- [C & C++](/docs/ingestion/clients/c-and-cpp): High-performance client for systems programming and embedded applications.
- [.NET](/docs/ingestion/clients/dotnet): Cross-platform client for building applications with .NET technologies.
- [Go](/docs/ingestion/clients/go): An open-source programming language supported by Google with built-in concurrency.
- [Java](/docs/ingestion/clients/java): Platform-independent client for enterprise applications and Android development.
- [Node.js](/docs/ingestion/clients/nodejs): Node.js® is an open-source, cross-platform JavaScript runtime environment.
- [Python](/docs/ingestion/clients/python): Python is a programming language that lets you work quickly and integrate systems more effectively.
- [Rust](/docs/ingestion/clients/rust): Systems programming language focused on safety, speed, and concurrency.

**PGWire Clients**

- [.NET](/docs/query/pgwire/dotnet): Query QuestDB using Npgsql or other .NET PostgreSQL drivers.
- [Go](/docs/query/pgwire/go): Query QuestDB using pgx or other Go PostgreSQL drivers.
- [Java](/docs/query/pgwire/java): Query QuestDB using JDBC with any PostgreSQL-compatible driver.
- [Node.js](/docs/query/pgwire/nodejs): Query QuestDB using pg or other Node.js PostgreSQL clients.
- [Python](/docs/query/pgwire/python): Query QuestDB using psycopg, asyncpg, or other Python drivers.
- [Rust](/docs/query/pgwire/rust): Query QuestDB using tokio-postgres or other Rust PostgreSQL crates.
- [PHP](/docs/query/pgwire/php): Query QuestDB using PDO or other PHP PostgreSQL extensions.
- [R](/docs/query/pgwire/r): Query QuestDB using RPostgres or other R database packages.

_Want more options? See the [ingestion overview](/docs/ingestion/overview/)._

### Create new data

No data yet and still want to trial QuestDB?

There are several quick options:

1. [QuestDB demo instance](https://demo.questdb.io): Hosted, fully loaded and
   ready to go. Quickly explore the Web Console and SQL syntax.
2. [Create my first data set guide](/docs/getting-started/create-database/): create
   tables, use `rnd_` functions and make your own data.
3. [Sample dataset repos](https://github.com/questdb/sample-datasets): IoT,
   e-commerce, finance or git logs? Check them out!
4. [Quick start repos](https://github.com/questdb/questdb-quickstart):
   Code-based quick starts that cover ingestion, querying and data visualization
   using common programming languages and use cases. Also, a cat in a tracksuit.
5. [Time series streaming analytics template](https://github.com/questdb/time-series-streaming-analytics-template):
   A handy template for near real-time analytics using open source technologies.

## Learn QuestDB

New to QuestDB? Start here:

- **[Schema design](/docs/schema-design-essentials/)** — Understand designated
  timestamps, partitions, and SYMBOL types. These are the foundations of fast
  time-series queries.

For production deployments:

- [Capacity planning](/docs/getting-started/capacity-planning/) — Recommended
  configurations for production
- [Configuration](/docs/configuration/overview/) — All server.conf options
- [Visualize with Grafana](/docs/integrations/visualization/grafana/) — Create
  dashboards from your data ([example](/dashboards/crypto/))
