documentation/getting-started/quick-start.mdx
import Screenshot from "@theme/Screenshot";
import Button from "@theme/Button";
import InterpolateReleaseData from "../../src/components/InterpolateReleaseData";
import NoJrePrerequisite from "./quick-start-utils/_no-jre-prerequisites.partial.mdx";
import CodeBlock from "@theme/CodeBlock";
import { TabsPlatforms } from "../../src/modules/TabsPlatforms";
import RunWindows from "./quick-start-utils/_run-windows.partial.mdx";
import OptionsNotWindows from "./quick-start-utils/_options-not-windows.partial.mdx";
import OptionsWindows from "./quick-start-utils/_options-windows.partial.mdx";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import { Clients } from "../../src/components/Clients"
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! Select a first-party client or ingest method.
Choose from the following options:
To use Docker, one must have Docker. You can find installation guides for your platform on the official documentation.
Once Docker is installed, pull and run QuestDB:
<InterpolateReleaseData
renderText={(release) => (
<CodeBlock className="language-shell">
{docker run -p 9000:9000 -p 8812:8812 -p 9003:9003 questdb/questdb:${release.name}}
</CodeBlock>
)}
/>
This exposes the Web Console (9000), PostgreSQL wire (8812), and health endpoint (9003).
For deeper instructions, see the Docker deployment guide.
To install QuestDB via Homebrew, run the following command:
brew install questdb
On macOS, the location of the root directory of QuestDB and server configuration files depend on the chip:
Apple Silicon (M1/M2/M*) chip: /opt/homebrew/var/questdb
Intel chip: /usr/local/var/questdb
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: {" "}
<Button href={href} uppercase={false} variant="plain">
{filename}
</Button>
The default root directory becomes:
<CodeBlock className="language-shell">
{`C:\\Windows\\System32\\qdbroot`}
</CodeBlock>
</>
);
default:
return (
<>
Download the binary:{" "}
<Button href={href} uppercase={false} variant="plain">
{filename}
</Button>
Next, unpack it:{" "}
<CodeBlock className="language-shell">
{`tar -xvf ${filename}`}
</CodeBlock>
The default directory becomes:
<CodeBlock className="language-shell">
{`$HOME/.questdb`}
</CodeBlock>
</>
);
}
}} />
<!-- prettier-ignore-end --><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">./questdb.sh start
To stop: ./questdb.sh stop | To check status: ./questdb.sh status
./questdb.sh [start|stop|status] [-d dir] [-f] [-n] [-t tag]
questdb start
To stop: questdb stop | To check status: questdb status
questdb [start|stop|status] [-d dir] [-f] [-n] [-t tag]
questdb.exe start
To stop: questdb.exe stop | To check status: questdb.exe status
questdb.exe [start|stop|status|install|remove] \
[-d dir] [-f] [-j JAVA_HOME] [-t tag]
Open http://localhost:9000 in your browser.
You should see the QuestDB Web Console.
Try running your first query in the SQL editor:
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 to understand this and other
key concepts.
It works? You're ready to bring your data.
Default ports:
| Port | Service |
|---|---|
9000 | REST API and Web Console |
9009 | InfluxDB Line Protocol (ILP) - Legacy TCP, use HTTP instead |
8812 | PostgreSQL Wire Protocol |
9003 | Health endpoint |
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:
<Clients />Want more options? See the ingestion overview.
No data yet and still want to trial QuestDB?
There are several quick options:
rnd_ functions and make your own data.New to QuestDB? Start here:
For production deployments: