cubeshipd/cubeship-cloudbeaver-template
Cloudbeaver
CloudBeaver Community: web database client by DBeaver
CloudBeaver on Cubeship
CloudBeaver is DBeaver's web database client: browse schemas, edit data and run SQL against PostgreSQL, MySQL, MariaDB, MongoDB and dozens more, from the browser.
This template installs CloudBeaver Community on a Cubeship instance, already configured, with a volume for everything it keeps.
What it creates
- cloudbeaver — CloudBeaver, from
dbeaver/cloudbeaver:26.2.0, answering on the domain you choose, with a volume at/opt/cloudbeaver/workspace: the server's configuration, its users, the connections you save with their passwords, and your scripts.
It needs Cubeship 0.7.0 or newer.
What you are asked
| Input | What to give |
|---|---|
| Where CloudBeaver answers | A domain you control, pointed at your instance. |
| The administrator you sign in as | A lowercase name. Not admin or user: those are CloudBeaver's team names, and the account would not be created. |
| The administrator's password | Nothing — the instance generates it and shows it once. Keep a copy. |
First start
CloudBeaver normally opens a setup wizard to whoever reaches it first, and whoever finishes it becomes the administrator. This template skips it: the server name, administrator name and password are set as variables, so the server configures itself on its first start and creates that account before it answers anyone. Anonymous access is off, so nothing is reachable without signing in.
The variables only apply to that first start. Changing them afterwards changes nothing.
After installing
- Open the domain and sign in with the administrator name and the generated password.
- Change the password under your account → Change password.
- New connection for each database. A database on the same instance
answers at its internal host,
cubeship-db-<name>, on the engine's port (5432for PostgreSQL,3306for MySQL and MariaDB,27017for MongoDB); its credentials are on its page in the dashboard.
If you lose the administrator password
There is no console into an app on Cubeship. SSH into the machine the app runs
on and use docker exec on its container (docker ps lists it):
- Open
/opt/cloudbeaver/workspace/.data/.cloudbeaver.runtime.confand delete the"serverName"line, keeping the JSON valid. - Redeploy the app. It starts in setup mode, and the wizard sets a new administrator password; connections and users are kept.
Until you finish the wizard, whoever opens the domain first can finish it instead — do it straight after the redeploy.
The volume
The app runs as one copy on the machine its volume is on, and a deploy stops it for a few seconds. CloudBeaver Community keeps its own data in an embedded H2 database inside the volume; an external database for it is a feature of the paid editions. Back the volume up from the app's settings: the saved connection passwords are in it.
Resources
The app is limited to 1 CPU and 2 GiB of memory, and the JVM may use 75% of
it. Raise limits in template.yaml if you need more.
What this creates
cloudbeaver
dbeaver/cloudbeaver:26.2.0
/opt/cloudbeaver/workspace
Volume of cloudbeaver
# yaml-language-server: $schema=https://cubeship.dev/schema/template/v1.json
version: 1
minCubeship: "0.7.0"
project: cloudbeaver
inputs:
- key: domain
type: domain
label: Where CloudBeaver answers
- key: adminName
type: text
label: The administrator you sign in as
help: Lowercase. Not admin or user — those are CloudBeaver's own team names.
default: cbadmin
pattern: ^[a-z0-9][a-z0-9._-]*$
- key: adminPassword
type: secret
label: The administrator's password
generate: 32
apps:
- key: web
name: cloudbeaver
image: dbeaver/cloudbeaver
tag: "26.2.0"
port: 8978
health: /status
domains:
- host: ${input.domain}
# The configuration, its H2 database, saved connections and scripts.
# The image starts as root, hands this directory to uid 8978 and runs
# as it, so an empty volume works.
volumes:
- path: /opt/cloudbeaver/workspace
limits: { cpu: 1, memory: 2Gi }
env:
# All three set means the server configures itself on first start
# and the setup wizard never opens. No CB_SERVER_URL: 26.2 reads
# none, and takes its address from the proxy's X-Forwarded headers.
CB_SERVER_NAME: CloudBeaver
CB_ADMIN_NAME: ${input.adminName}
CB_ADMIN_PASSWORD: ${input.adminPassword}
# The image's default is on.
CLOUDBEAVER_APP_ANONYMOUS_ACCESS_ENABLED: "false"
# The JVM otherwise takes a quarter of the memory limit.
JAVA_OPTS: -XX:MaxRAMPercentage=75