The CLI allows you to start, stop and interact with QuestDB. On Windows, QuestDB can also be started interactively.

import Tabs from “@theme/Tabs” import TabItem from “@theme/TabItem”

General

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

  1. ./questdb.sh [start|stop|status] [-d dir] [-f] [-t tag]
  1. questdb [start|stop|status] [-d dir] [-f] [-t tag]
  1. questdb.exe [start|stop|status|install|remove] \
  2. [-d dir] [-f] [-j JAVA_HOME] [-t tag]

Start

start - starts a service.

OptionDescription
-d root_directorySpecify QuestDB’s root directory. See below for the default values.
-t my-tagSpecify a service tag. You can use this option to run several services and manage them separately. If omitted, the default will be questdb.
-fForce re-deploying the Web Console. Without this option, the Web Console is cached deployed only when missing.
-j (Windows only)Specify a path to JAVA_HOME.

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

  1. ./questdb.sh start
  1. questdb start
  1. questdb.exe start

Default root directory

By default, QuestDB’s root directory will be the following:

<Tabs defaultValue=”nix” values={[ { label: “Linux/FreeBSD”, value: “nix” }, { label: “macOS”, value: “macos” }, { label: “Windows”, value: “windows” }, ]}>

  1. $HOME/.questdb
  1. /usr/local/var/questdb
  1. C:\Windows\System32\questdb

Stop

stop - stops a service.

OptionDescription
-tSpecify a service tag, if omitted, the default will be questdb

<Tabs defaultValue=”nix” values={[ { label: “Linux/FreeBSD”, value: “nix” }, { label: “macOS”, value: “macos” }, { label: “Windows”, value: “windows” }, ]}>

  1. ./questdb.sh stop
  1. questdb stop
  1. questdb.exe stop

Status

status - shows the status for a service.

OptionDescription
-tSpecify a service tag, if omitted, the default will be questdb

<Tabs defaultValue=”nix” values={[ { label: “Linux/FreeBSD”, value: “nix” }, { label: “macOS”, value: “macos” }, { label: “Windows”, value: “windows” }, ]}>

  1. ./questdb.sh status
  1. questdb status
  1. questdb.exe status

Install

install - installs the Windows QuestDB service. It will start automatically at startup. This command is only available on Windows.

  1. questdb.exe install

Remove

remove - removes the Windows QuestDB service. It will no longer start at startup. This command is only available on Windows.

  1. questdb.exe remove

Use interactively (Windows)

You can start QuestDB interactively by running questdb.exe.

Behaviour

This will launch QuestDB interactively in the active Shell window. QuestDB will be stopped when the Shell is closed.

Default root directory

When started interactively, QuestDB’s root directory defaults to the current directory.

Stop

To stop, press Ctrl+C in the terminal or close it directly.