Start DoltLab

The following describes how to start the latest versions of DoltLab, >= v2.1.4, that contain the installer binary. For instructions on how to start an older version of DoltLab that do not have the installer, please see the pre-installer guide.

In the simplest configuration the installer will generate four local DoltLab assets: a docker-compose.yaml file, an envoy.json file, a start.sh script, and a stop.sh script.

Use start.sh to start your DoltLab instance and stop.sh, to stop it. These scripts will reference the other local files generated by the installer as well.

DoltLab's installer uses a configuration file, ./installer_config.yaml, that ships with DoltLab. The default configuration contains the following:

version: v2.1.4

# "Host" is the hostname or IP address of host running DoltLab. Required.
host: ""

# "Services" contains config for specific DoltLab services.
# The first time DoltLab runs, it uses the passwords defined in `doltlabdb.admin_password`
# and `doltlabdb.dolthubapi_password` to initialize DoltLab's application database.

services:
  doltlabdb:
    admin_password: "DoltLab1234"
    dolthubapi_password: "DoltLab1234"

# "Default User" configures the default user account created by DoltLab the first time it starts up. This account is able to use
# all of DoltLab's features, without connecting DoltLab to an SMTP server.
default_user:
  name: "admin"
  password: "DoltLab1234"
  email: "admin@localhost"
## "SMTP" is used to configure a connection to an existing SMTP server. Optional.
## For more information on connecting your instance to an SMTP server,
## see https://docs.doltlab.com/guides/administrator#connect-smtp-server.
#smtp:
#  auth_method: "plain"
#  host: ""
#  port: 0
#  no_reply_email: ""

Edit installer_config.yaml and supply the host name or IP address of your DoltLab host in the host field.

# installer_config.yaml
---
host: "12.34.567.890"

Additionally, edit the default passwords in the following sections to be more secure values:

# installer_config.yaml
services:
  doltlabdb:
    admin_password: "MySecurePassword1"
    dolthubapi_password: "MySecurePassword2"
# installer_config.yaml
default_user:
  name: "admin"
  password: "MySecurePassword3"
  email: "admin@localhost"

It is important to change these passwords before starting DoltLab with the ./start.sh script for the first time, since on DoltLab's first run, the application database backing DoltLab will be initialized with these passwords and persisted to disk.

These passwords can be changed later on, but requires a couple additional steps.

Save these changes, then run the installer:

./installer

Notice the output produced by the installer as shown below:

2024-05-14T18:27:43.285Z	INFO	metrics/emitter.go:111	Successfully sent DoltLab usage metrics

2024-05-14T18:27:43.285Z	INFO	cmd/main.go:492	Successfully configured DoltLab	{"version": "v2.1.4"}

2024-05-14T18:27:43.285Z	INFO	cmd/main.go:498	To start DoltLab, use:	{"script": "/home/ubuntu/doltlab/start.sh"}
2024-05-14T18:27:43.285Z	INFO	cmd/main.go:503	To stop DoltLab, use:	{"script": "/home/ubuntu/doltlab/stop.sh"}

The installer will tell you how to start and stop DoltLab using the scripts it generated.

Importantly, the first time DoltLab starts, a default user, admin, with email admin@localhost is created. This user will be the only user able create databases on the DoltLab instance until the instance is connected to a valid SMTP server. The email associated with the default user can be updated to a valid email at anytime before starting DoltLab for the first time, or if DoltLab has already created the default user, from the Profile > Settings page of the running DoltLab instance.

Additionally, the first time the DoltLab is started, it will use the values in services.doltlabdb.admin_password and services.doltlabdb.dolthubapi_password to initialize DoltLab's application database using the following SQL statements:

CREATE USER 'dolthubadmin' IDENTIFIED BY '<doltlabdb admin password>';
CREATE USER 'dolthubapi' IDENTIFIED BY '<doltlabdb dolthubapi password>';
GRANT ALL ON *.* TO 'dolthubadmin';
GRANT ALL ON dolthubapi.* TO 'dolthubapi';

DoltLab's main API, doltlabapi, will connect to the application database as the dolthubapi SQL user.

You can now run ./start.sh to start DoltLab:

./start.sh

After running ./start.sh, DoltLab's running services can be viewed with docker ps:

docker ps
CONTAINER ID   IMAGE                                                            COMMAND                  CREATED          STATUS         PORTS                                                                                                                                                                                                                  NAMES
74a40090eefc   public.ecr.aws/dolthub/doltlab/dolthub-server:v2.1.4              "docker-entrypoint.s…"   6 seconds ago    Up 3 seconds   3000/tcp                                                                                                                                                                                                               doltlab-doltlabui-1
8e12720fe7ac   public.ecr.aws/dolthub/doltlab/dolthubapi-graphql-server:v2.1.4   "docker-entrypoint.s…"   6 seconds ago    Up 3 seconds   9000/tcp                                                                                                                                                                                                               doltlab-doltlabgraphql-1
565cc67b2539   public.ecr.aws/dolthub/doltlab/dolthubapi-server:v2.1.4           "/app/go/services/do…"   6 seconds ago    Up 4 seconds                                                                                                                                                                                                                          doltlab-doltlabapi-1
ce3e618f7038   public.ecr.aws/dolthub/doltlab/doltremoteapi-server:v2.1.4        "/app/go/services/do…"   10 minutes ago   Up 4 seconds   0.0.0.0:50051->50051/tcp, :::50051->50051/tcp                                                                                                                                                                          doltlab-doltlabremoteapi-1
44f2a41532e6   public.ecr.aws/dolthub/doltlab/fileserviceapi-server:v2.1.4       "/app/go/services/fi…"   10 minutes ago   Up 4 seconds                                                                                                                                                                                                                          doltlab-doltlabfileserviceapi-1
84e99a5330fc   public.ecr.aws/dolthub/doltlab/dolt-sql-server:v2.1.4             "tini -- docker-entr…"   10 minutes ago   Up 5 seconds   3306/tcp, 33060/tcp                                                                                                                                                                                                    doltlab-doltlabdb-1
dc3380071331   envoyproxy/envoy:v1.28-latest                                    "/docker-entrypoint.…"   10 minutes ago   Up 4 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:100->100/tcp, :::100->100/tcp, 0.0.0.0:2001->2001/tcp, :::2001->2001/tcp, 0.0.0.0:4321->4321/tcp, :::4321->4321/tcp, 0.0.0.0:7770->7770/tcp, :::7770->7770/tcp, 10000/tcp   doltlab-doltlabenvoy-1

Navigating to http://${HOST_IP}:80 in a web browser, where HOST_IP is the domain name or IP address of your DoltLab host, should show the DoltLab homepage.

For more ways to configure and run your DoltLab instance, checkout DoltLab's Administrator Guide.

Next Steps

Last updated