Running YDB from a binary file

This section describes how to deploy a local single-node YDB cluster using a built binary file. Currently, only a Linux build is supported. Support for Windows and MacOS builds will be added later.

Connection parameters

As a result of completing the steps described below, you'll get a YDB database running on your local machine, which you can connect to using the following parameters:

Installing

Create a working directory. In this directory, run a script to download an archive with the ydbd executable file and libraries required for using YDB, as well as a set of scripts and auxiliary files to start and stop a server:

curl https://install.ydb.tech | bash

Starting

You can start a local YDB server with a disk or in-memory storage:

  • For YDB to work efficiently, we recommend using physical (not virtual) disks larger than 800 GB as block devices.

    The minimum disk size is 80 GB, otherwise the YDB node won't be able to use the device. Correct and uninterrupted operation with minimum-size disks is not guaranteed. We recommend using such disks exclusively for informational purposes.

    Warning

    Configurations with disks less than 800 GB or any types of storage system virtualization cannot be used for production services or system performance testing.

    We don't recommend storing YDB data on disks shared with other processes (for example, the operating system).

  • The first time you run the script, an 80GB ydb.data file will be created in the working directory. Make sure there's enough disk space to create it.

  • Run the following command from the working directory:

    ./start.sh disk
    
  • When data is stored in memory, it will be lost if the server is stopped.

  • Run the following command from the working directory:

    ./start.sh ram
    

The YDB server is started in the current terminal window context. Closing the window stops the server.

If you see an error saying Failed to set up IC listener on port 19001 errno# 98 (Address already in use) when you make an attempt to start the server, then the server may already be running and you should stop it using the stop.sh script (see bellow).

Stopping

To stop the server, run the following command in the working directory:

./stop.sh

Making queries via the YDB CLI

Install the YDB CLI and run a query, for example:

ydb -e grpc://localhost:2136 -d /Root/test scheme ls

Working with the database via the Web UI

To work with the DB structure and data, you can also use a web interface that is embedded in the ydbd process and available at http://localhost:8765. For more details about the embedded web interface, see Embedded UI.

Additional features

For information about how to deploy multi-node clusters and configure them, see Managing a cluster.

Previous