LogoLogo
BlogDiscordGitHubDoltgres
  • Introduction
    • What is Doltgres?
    • Installation
    • Getting Started
  • Concepts
    • Git
      • Commits
      • Log
      • Diff
      • Branch
      • Merge
      • Conflicts
      • Remotes
      • Working Set
    • SQL
      • Databases
      • Schema
      • Tables
      • Primary Keys
      • Types
      • Indexes
      • Views
      • Constraints
      • Triggers
      • Functions
      • Procedures
      • Users/Grants
      • Transactions
      • System Variables
    • RDBMS
      • Server
      • Backups
      • Replication
  • Guides
    • Cheat Sheet
    • Replication from Postgres
  • Reference
    • Running the Server
      • Configuration
      • Access Management
      • Branch Permissions
      • Backups
      • Garbage Collection
      • Metrics
      • Replication
      • Troubleshooting
    • Version Control Features
      • Using Branches
      • Merges
      • Querying History
      • Using Remotes
      • Functions
      • System Tables
      • System Variables
    • SQL Language Support
      • Supported Functions and Operators
      • Supported Types
      • Supported SQL Commands
      • System Catalog Schema
    • Supported Clients
      • Programmatic
    • Benchmarks
      • Correctness
      • Latency
Powered by GitBook
On this page
  • Configuration options
  • Data location
  1. Reference

Running the Server

PreviousReplication from PostgresNextConfiguration

Last updated 3 months ago

Start the DoltgreSQL server by running the doltgres command:

% doltgres

Configuration options

Like dolt, doltgres accepts several configuration options both as command line parameters or via a config.yaml file. The for Dolt cover most of these options. You can also consult doltgres --help for a listing of all configuration options.

Data location

The location of any databases created depends on the setting of the DOLTGRES_DATA_DIR environment variable. For example:

% export DOLTGRES_DATA_DIR=~/dbs/
% doltgres &
% psql -h 127.0.0.1 -U doltgres -c "CREATE DATABASE newDb"

The newDb database above will be stored at the location ~/dbs/newDb. The first time you run the doltgres command, a database named doltgres will be created for you in the data directory if it doesn't exist.

If you don't set this environment variable, it defaults to ~/doltgres/databases.

You can override this location on the command line with the --data-dir flag:

% doltgres --data-dir /var/doltgres/dbs

Or you can provide it in a config.yaml file:

log_level: debug

behavior:
  read_only: false

listener:
  host: localhost
  port: 5432
  read_timeout_millis: 28800000
  write_timeout_millis: 28800000

data_dir: /var/doltgres/dbs

cfg_dir: .doltcfg

Provide the path to the config.yaml on the command line with the --config option.

% doltgres --config config.yaml
docs for the sql-server command