Skip to content
Docs
strackt.io Open app

Manage a database service

Open a temporary connection from your own machine, see the databases on a MariaDB or PostgreSQL service, add another one, and tune its capacity.

Manage a database service

A database service is a MariaDB or PostgreSQL database running on one of your servers, shared by the applications you connect to it. strackt creates each application's database and login for you (see Add a service). This page covers what you can do with the service itself once it's running.

Open the service from your server or from Services. There are two places to work from:

Where What you do there
The service page (Summary) See where it runs and which applications use it, and Connect from your own machine.
Settings See the full list of databases, add one, and tune capacity. You can also remove the service here.

Some actions are only for the workspace owner. Each section below says which.

Using Valkey instead? Most of this page doesn't apply to it. See Connect to Valkey.

At a glance

The service page opens with three cards:

  • Where it lives: the type, the version, and the server it runs on.
  • Used by: every application and environment connected to it. Select one to open it.
  • Connection: the host and type, plus the Connect action.

The version is shown for reference. There's no control here to change it.

Connect from your own machine

Connect gives you a temporary login so you can open the database in a desktop client or on the command line. Any member of the workspace can use it.

Before you start: you need the strackt CLI installed and connected, with SSH access turned on for your workspace. See SSH into a server from the CLI for what that takes. The service must be active. If it isn't, Connect is disabled and tells you why.

  1. On the service page, choose Connect on the Connection card. You can also open the command palette and run Connect to database.
  2. The Remote database access dialog shows:
    • SSH command: run this in a terminal and leave it running. It opens a secure tunnel from your machine to the database.
    • Connection URL: paste this into your database client. It points at the tunnel on your own machine, so it only works while the SSH command is running.
    • Temp username and Password for this session.
    • Expires: when the session ends.
  3. If you use TablePlus, choose Open TablePlus to open the connection there directly.

The SSH command and the connection URL each have a copy button.

Good to know:

  • The login is temporary. The session lasts four hours, and strackt removes the login shortly after it ends. To keep working after that, choose Connect again for a fresh one.
  • It opens one database. If several applications share the service, the session opens one of their databases, and you can't choose which from here.
  • Your applications aren't affected. The temporary login is separate from the logins your applications use.

See the databases on the service

Go to Settings, then Databases.

Inventory lists every database on the service with its size, its number of tables, and which applications use it. The time of the last check is shown next to the heading. When you open the page and that check is more than a few minutes old, strackt starts a new one, and the list shows Updating... until it's done. If the check can't run, you see the last known list with a note saying so.

Connection details lists each connected application and environment with its database name and username. Copy URL copies a connection URL for that application. The URL doesn't include a password.

Add another database

When an application needs a second database on the same service (for analytics, say), you can create one here instead of changing its requirements. Only the workspace owner can add a database.

  1. In Settings, then Databases, choose Add database.
  2. Under Application environment, pick the application and environment the database is for.
  3. Enter a Label. Use letters, numbers, dashes and underscores. It must start with a letter or number and be no longer than 32 characters. The new database is named after your application and this label.
  4. Choose Add database.

strackt creates the database and a login for that environment and gives the connection details to the application. If that environment is already deployed, strackt updates it so your application picks up the new connection. If the credentials don't go through, see If a service's credentials don't apply.

Tune capacity

Go to Settings, then Tuning. This page shows how the database is sized for its server and suggests better values. Anyone in the workspace can view it. Only the workspace owner can save changes.

The top of the page shows the engine, the server's memory, how many applications use the service, and whether it follows a profile or your own custom values.

Pick a capacity profile

Under Automatic capacity, pick one of Automatic, Light, Balanced, High-traffic, or Custom. Picking any of them except Custom saves it right away. Recommended limit shows the connection limit strackt suggests for this server, engine, and set of applications.

Check how busy it is

Live capacity shows connection use over the last 24 hours: Current, Peak 24h, Max connections (the configured limit), Queued, and Ceiling reached (how many times use hit the limit). If Ceiling reached keeps going up, look at a heavier profile or the recommendations below.

Apply the recommendations

Recommendations lists each setting with its Current and Recommended value and the reason for the recommendation. To take all of them, choose Apply recommended at the top of the page and confirm.

Set your own values

To set values yourself, pick Custom. The Manual overrides form opens with a field for each setting. Edit the ones you want and choose Save overrides. strackt caps each value so one service can't reserve more than its server can safely spare. Reset puts the recommended values back into the form. To go back to automatic sizing later, choose Use automatic sizing.

When changes take effect

Tuning changes don't take effect straight away. strackt saves them and applies them the next time the server updates. Until then, the Tuning page shows how many are waiting. See Server pending changes.

Remove the service

Only the workspace owner can remove a service. The Remove service row is at the bottom of the Settings overview. What has to be true first, and what happens to the data, is covered in Remove a service.

To list or retire services from the terminal, see Manage services from the CLI.

Was this helpful?