Skip to content

dopbase client connect ​

dopbase client connect selects the server used by later client commands.

When no server has been selected, Dopbase uses the local default automatically:

text
http://localhost:8840

You can therefore start a default local server and sign in without running connect first:

bash
dopbase server start # complete the printed setup link on fresh storage
dopbase login

Connect to another server ​

Select a self-hosted or Cloud endpoint:

bash
dopbase client connect https://dopbase.example.com
dopbase client connect http://dopbase.internal.example
dopbase client connect 192.168.1.20:8840

The command normalizes the URL and verifies that it is a compatible Dopbase server before changing machine-global state. If validation fails, the previous server and credential remain active. The one exception is this machine's own instance, covered under Return to the local server.

Domain names must include http:// or https://. A bare domain such as dopbase.example.com is rejected with an example of the required format. Bare IPv4 and IPv6 addresses are accepted and use HTTP by default. Add the scheme when an IP address uses HTTPS.

The CLI prints a warning before contacting any server over HTTP because login credentials and secrets are not protected by transport encryption. Use HTTPS whenever possible. The client does not follow redirects, so the configured endpoint must be the final Dopbase URL.

Invalid hosts, malformed IP addresses, unsupported schemes, and ports outside 1 to 65535 are rejected before a network request. Each validation error shows a valid example. A valid address that cannot be reached reports a connection error instead, while a reachable non-Dopbase endpoint reports a compatibility error.

An actual server change requires a yes/no confirmation. The warning identifies the current and destination endpoints and explains that Dopbase will delete the encrypted local CLI session and clear the saved default environment. There is no non-interactive bypass.

If the current endpoint is a local server running from the same data directory, connect refuses to switch away from it and tells you to stop that server first. Stop it, then run connect again. Connecting to that server, for example with client connect local after using a remote server, works while it runs. connect never stops a server or revokes browser sessions.

Connecting does not authenticate. Sign in separately after switching:

bash
dopbase login

Return to the local server ​

Use the local alias:

bash
dopbase client connect local
dopbase login

local means this machine's own instance: the server configured in the same data directory, at its public URL. That is http://localhost:8840 unless server.toml or DOPBASE_PUBLIC_URL sets another one. On the default URL, Dopbase removes the configured server override and returns to the implicit local default. Any other public URL is saved as the active server. When no server is saved and the default URL already reaches this instance, local leaves things as they are and keeps your CLI session.

The local server doesn't have to be running. If its URL refuses the connection, Dopbase still switches after confirmation and tells you to start it. A DNS or TLS failure still stops the switch, since it doesn't mean the server is stopped:

bash
dopbase client connect local
dopbase server start
dopbase login

The same applies when you pass your own instance's URL instead of local, as long as the data directory holds its database. If something else answers at that URL and it isn't a compatible Dopbase server, the switch is refused. Every other server must be reachable before Dopbase saves it.

DOPBASE_URL must be unset before changing the saved endpoint. Otherwise, its environment override would remain active instead of the newly selected server.

Cloud uses the same command ​

bash
dopbase client connect <dopbase-cloud-url>
dopbase login

The Cloud URL has not been published. Dopbase Cloud is planned to use the same client and REST model as a self-hosted server.

Machine-global state ​

The selected endpoint is stored in the user's global Dopbase configuration, not in an application repository. Login credentials are stored separately in the encrypted local session file. An optional dopbase run default is saved as an immutable environment ID scoped to this server.

Use dopbase client status to inspect the effective endpoint and authentication status without displaying token contents. Read client configuration for the file format, precedence rules, and multi-instance behavior.

Safety behavior ​

Once a remote endpoint is configured, an outage causes client commands to fail. Dopbase does not silently switch to localhost, another self-hosted server, or Cloud. The implicit local default applies only when no server is configured or overridden.

Open-source secrets management for developers.