Get Started /

Docker (5 seconds)

This document guides you to run Bytebase in docker, which takes less than 5 seconds.

Prerequisites

Before starting, make sure you have installed Docker.

Special notes for running on Linux

!

If you run Bytebase inside Docker on Linux and want to connect the database intance on the same host, then you need to supply the additional --add-host host.docker.internal:host-gateway --host network flags.

Run on localhost:5678

Run the following command to start Bytebase on container port 8080 and bind to localhost:5678.

docker run --init \
  --name bytebase \
  --restart always \
  --publish 5678:8080 \
  --health-cmd "curl --fail http://localhost:5678/healthz || exit 1" \
  --health-interval 5m \
  --health-timeout 60s \
  --volume ~/.bytebase/data:/var/opt/bytebase \
  bytebase/bytebase:1.9.0 \
  --data /var/opt/bytebase \
  --port 8080

Bytebase will store its data under ~/.bytebase/data , you can reset all data by running command:

rm -rf ~/.bytebase/data

Check Server Startup Options for other startup options.

Run on https://bytebase.example.com

Run the following command to start Bytebase on port 80 and visit Bytebase from https://bytebase.example.com

docker run --init \
  --name bytebase \
  --restart always \
  --publish 80:8080 \
  --health-cmd "curl --fail http://localhost:80/healthz || exit 1" \
  --health-interval 5m \
  --health-timeout 60s \
  --volume ~/.bytebase/data:/var/opt/bytebase \
  bytebase/bytebase:1.9.0 \
  --data /var/opt/bytebase \
  --external-url https://bytebase.example.com \
  --port 8080
!

For production setup, you would replace https://bytebase.example.com with the actual URL your users would visit Bytebase from. See Configure External URL.

Troubleshoot

Run the following if something goes wrong.

docker logs bytebase

Normally you should see this:

██████╗ ██╗   ██╗████████╗███████╗██████╗  █████╗ ███████╗███████╗
██╔══██╗╚██╗ ██╔╝╚══██╔══╝██╔════╝██╔══██╗██╔══██╗██╔════╝██╔════╝
██████╔╝ ╚████╔╝    ██║   █████╗  ██████╔╝███████║███████╗█████╗
██╔══██╗  ╚██╔╝     ██║   ██╔══╝  ██╔══██╗██╔══██║╚════██║██╔══╝
██████╔╝   ██║      ██║   ███████╗██████╔╝██║  ██║███████║███████╗
╚═════╝    ╚═╝      ╚═╝   ╚══════╝╚═════╝ ╚═╝  ╚═╝╚══════╝╚══════╝

Version 1.9.0 has started on port 8080

************* External Visiting URL (--external-url) *************

https://bytebase.example.com

******************************************************************

Unable to start Bytebase with Docker

Using Colima

Due to the vm mechanism of colima, try to use the --mount option when starting colima as shown below:

mkdir ~/volumes
colima start --mount ~/volumes:w
docker run --init --name bytebase --restart always --publish 80:8080 --volume ~/.bytebase/data:/var/opt/bytebase bytebase/bytebase:1.9.0 --data /var/opt/bytebase --external-url https://bytebase.example.com --port 8080