Getting Started
DoltLab is Dolt's self-hosted remote with a built-in web interface. You get all the features of DoltHub, a built in SQL Workbench, Pull Requests, Issues, etc, on infrastructure deployed in your own network.
This guide will walk through the simplest way to set up a basic DoltLab installation. Once complete, you'll have a DoltLab running on an internet-accessible EC2 instance that works for a single admin
user. Some features like multiple users, HTTPS, and custom logo and colors are not enabled but links to documentation to enable those things are provided.
Get a Ubuntu Host and SSH in
The first thing you will need is an internet accessible Ubuntu host. We have documentation on how to get a DoltLab ready Ubuntu host on:
Download DoltLab and its Dependencies
Now that you're on the host, you need to get DoltLab and its dependencies on the host. First, you'll need curl
and unzip
as a basic minimum. curl
was already on my Ubuntu host by default but unzip
was not. So, I grabbed unzip like so:
Then I downloaded and unzipped the latest DoltLab.
This should produce a directory that includes the DoltLab installer. It can take it from here!
I run ./installer --ubuntu
to generate an install script for the rest of DoltLab's dependencies. Then, I run the install script.
There are a few dependencies. This will take a couple minutes.
Make sure Docker works
DoltLab uses Docker to run all of its services. After the bootstrap script is done, make sure Docker works with sudo by running:
Then exit the docker shell. You want to set it up so Docker can run as your current user, in my case ubuntu
. The steps to do this are here but I just ran:
And then ran docker ps
to test.
If docker ps
works without sudo
, you are in business.
Installer
Now, my host is set up for DoltLab, I need to generate the configuration needed to run it. This is done with the installer as well, this time by only passing in the name of your host.
Now the moment of truth, I hit the IP over http
, not https
, http://54.191.163.60/. Bam!
Login as Admin
Now, your DoltLab is running but it's not very useful. Only logged in users can create databases so your DoltLab is going to stay really empty.
The DoltLab instance ships with a default user configured called admin
. It has a password DoltLab1234
. If you click the Sign In button in the top corner and log in as admin
, you get a more useful set of features.
Basic Configuration
Single user
A configured email server is required to create new users. If you try to create a user, you'll get an error that looks like this:
So, you only have a single admin user to play with for now.
Create/Modify databases
You can build whatever database you can imagine using the web user interface. The built in SQL workbench can be used to create and edit tables. You can import CSVs. You can edit a table using the spreadsheet editor. You can make branches and Pull Requests.
Here's a simple test database I created using SQL.
Clone Databases
DoltLab is a remote so you can clone databases from it. The remote API is exposed on port 50051. I made my test database public so I don't need any permissions to clone it.
I now have the test database I created on my DoltLab locally.
Push Databases
To push databases you need your Dolt client authenticated against your DoltLab instance. You can run a fresh dolt login
against DoltLab using something like this:
dolt login --insecure --auth-endpoint 54.191.163.60:50051 --login-url http://54.191.163.60/settings/credentials
It is listed on the new user page on DoltLab. It will open a browser window. Follow the instructions to authenticate your client.
But if you're already logged into DoltHub, you can just look at your credential using dolt creds ls
and copy that into your Settings/Credentials.
Now you should be able to make a change and push to your DoltLab.
And I can now see my change on DoltLab!
You're now ready to try out all the Dolt and DoltLab experiences like Pull Requests, Issues, the SQL Workbench, and Diffs. Get testing and see if DoltLab is right for you and your team.
Adding Additional Functionality
Create new users
As discussed in the single user section, creating users in DoltLab <= v2.1.6
requires a working SMTP server to send emails. However, DoltLab >= v2.2.0
does not require an SMTP server connection in order for new users to create accounts on your DoltLab instance. In this newer version, an SMTP server connection can only be made with DoltLab Enterprise. For more information, consult this guide to set up an email server for DoltLab.
Receive Email Notifications
DoltLab Enterprise sends emails for password resets, pull request and issue status, and a few other use cases. Obviously, these also won't work without a running email server. Consult this guide to set up an email server for DoltLab.
HTTPS
Your DoltLab is currently set up to only use HTTP which is fairly insecure. If it's running on your internal network and you have other threat mitigations, this may be OK. But having it sit on the public internet on AWS without HTTPS is probably not what you want. Learn how to set up HTTPS on your DoltLab here.
Custom URL
Right now, you're stuck hitting the IP address of your host. In order to use a custom URL on the internet, you need a static IP for your EC2 host and a domain name. If your host is running on an internal network, you may need to follow a different process.
Custom Logo/Colors
Yay! Our first DoltLab Enterprise feature. If you would like a custom logo and color scheme for your DoltLab instance, you are going to need DoltLab Enterprise. DoltLab Enterprise is $5,000/month for unlimited users. It comes with Enterprise Support for Dolt as well. Among other features, DoltLab Enterprise allows you to customize the look and feel of your DoltLab instance. Learn how to configure your DoltLab as Enterprise and set up your custom look and feel here.
Scalability
Lastly, your DoltLab is running on a single host. All the components will scale to the size of that host including storing all the databases that are created. Storage and compute requirements can get big quickly. In order to break your DoltLab up into multiple instances and use cloud storage to store your databases, you need DoltLab Enterprise. Learn how to set up Enterprise here.
Last updated