Skip to main content

How to Connect and Manage a Database for Your Cloudways Velocity Application

Learn how to connect Database to your Cloudways Velocity application, access database credentials, and launch the built-in Database Manager.

Written by Syed Abuzar Mehdi

The Database section in Cloudways Velocity allows you to connect a database to your application.

You can choose between:

  • PostgreSQL: Install a PostgreSQL database directly in your Cloudways environment.

  • Supabase: Connect your application to a PostgreSQL database hosted and managed through Supabase.

After PostgreSQL is installed, Cloudways displays the database credentials and provides access to the built-in Database Manager.

Important: Installing PostgreSQL only creates the database. It does not automatically update your application code. Your application must already be configured to connect to and use PostgreSQL.


Before You Begin

Make sure that:

  • You have an active Cloudways Velocity application.

  • Your application supports PostgreSQL.

  • You understand how your application uses database connection details.

  • You create an on-demand backup before making important database or application changes.

  • You do not share database credentials publicly.


Connect a Database to a Cloudways Velocity Application

The Database section allows you to connect PostgreSQL or Supabase to your Cloudways Velocity application.

Use the PostgreSQL option to install a database within the Cloudways environment, view its credentials, and access the built-in Database Manager. Use the Supabase option when you prefer to host and manage the database externally.

Access the Database Section

  • Log in to the Cloudways Platform.

  • From the left navigation menu, select Velocity.

  • Select My Applications.

  • Choose the required application.

  • From the application management menu, select Database.

The Connect Database section displays the supported database options.


Understand the Available Database Options

PostgreSQL

PostgreSQL is a database system that stores and organizes application data.

Selecting this option installs PostgreSQL directly within your Cloudways environment.

After installation, you can:

  • View the database name.

  • View the database username.

  • Copy the database password.

  • Open the built-in Database Manager.

Supabase

Supabase is an external platform that provides a hosted PostgreSQL database.

This option allows you to continue hosting your Velocity application on Cloudways while managing the database through Supabase.

Note: The connection steps and required credentials for Supabase may differ from the Cloudways-managed PostgreSQL setup. Follow the instructions displayed after selecting Connect under Supabase.


Install PostgreSQL

Step #1 - Select PostgreSQL:

  • On the Database page, locate the PostgreSQL card and select Connect.

  • A confirmation window appears.

Step #2 - Review the Confirmation Message:

The confirmation window explains that:

  • PostgreSQL will be installed in the Cloudways environment.

  • The action only creates the database.

  • No changes are made to your application code.

  • The application must already be configured to use PostgreSQL.

  • The installation cannot be reversed or removed after completion.

Warning:

PostgreSQL cannot be uninstalled after it is installed for the environment. Confirm that your application requires it before continuing.

Step #3 - Proceed with Installation:

  • Select Proceed.

  • Wait while Cloudways installs PostgreSQL.

  • A success notification appears when the installation is complete:

  • PostgreSQL installed successfully!

Understand Automatically Added Environment Variables

  • After PostgreSQL is installed, Cloudways automatically creates and adds the required database environment variables.

  • Environment variables are saved settings that provide your application with information such as database connection details.

  • These variables are applied during the next deployment.

Important: Redeploy the application after PostgreSQL installation so the newly generated environment variables can be applied.

You can review deployment settings from:

Deployment Management → Settings → Environment Variables


View the PostgreSQL Connection Details

After installation, the PostgreSQL card displays a Connected status.

The page also shows the following credentials.

DB Name

The DB Name identifies the database assigned to the application.

Use the copy icon to copy it.

Username

The username identifies the account used by the application to access the database.

Use the copy icon to copy it.

Password

The password protects access to the database.

It is hidden on the screen. Use the copy icon when you need to add it to a supported configuration.

Security Note:

Store database credentials securely. Do not add passwords directly to publicly accessible code, support messages, screenshots, or Git repositories.

Apply the Database Configuration

After PostgreSQL has been installed:

  1. Confirm that your application supports PostgreSQL.

  2. Review the automatically added environment variables.

  3. Update your application code if it does not already read the required database variables.

  4. Open Deployment Management.

  5. Redeploy the application.

  6. Test all application features that read or write database data.

The database connection will not work correctly if the application expects different variable names or does not contain the required PostgreSQL setup.


Launch the Database Manager

The built-in Database Manager allows you to access and manage the connected PostgreSQL database from the Cloudways Platform.

Open the Database Manager

  1. Navigate to Velocity → My Applications.

  2. Select the required application.

  3. Open Database.

  4. Confirm that PostgreSQL shows Connected.

  5. Select Launch Database Manager.

The Database Manager opens and uses the connected database details.

Depending on the available controls, you may be able to:

  • Review database tables.

  • View stored records.

  • Run supported database queries.

  • Add or update data.

  • Review the database structure.

Warning:

Changes made through the Database Manager can affect the live application immediately. Avoid deleting or changing data unless you understand the impact.


Connect to Supabase

To use an externally managed Supabase database:

  1. Open the Database section.

  2. Locate the Supabase card.

  3. Select Connect.

  4. Follow the setup instructions displayed by the Platform.

  5. Obtain the required database details from your Supabase project.

  6. Add the required values to the application’s environment variables.

  7. Redeploy the application.

  8. Test the database connection.

With this option, the application remains hosted on Cloudways, while the database is hosted and managed through Supabase.


PostgreSQL or Supabase: Which Option Should You Use?

Use Cloudways PostgreSQL When

  • You want the database installed within your Cloudways environment.

  • You want to use the built-in Database Manager.

  • You prefer Cloudways to generate the required environment variables.

  • You want the application and database managed from the same Platform area.

Use Supabase When

  • Your application already uses Supabase.

  • You want to manage the database through the Supabase Platform.

  • You need Supabase-specific features.

  • You want the database hosted separately from the Velocity environment.


Recommended Practices

  • Confirm database compatibility before installing PostgreSQL.

  • Create an on-demand backup before changing database data or application configuration.

  • Redeploy after PostgreSQL installation so the generated environment variables are applied.

  • Keep database credentials private.

  • Do not store database passwords directly in the source-code repository.

  • Use sensitive environment variables for private connection details.

  • Test database-connected features after every deployment.

  • Be careful when using the Database Manager because changes may affect the live application.

  • Maintain application-level validation before saving data to the database.


Frequently Asked Questions

Does installing PostgreSQL automatically connect my application?

No. Cloudways creates the database and adds the required environment variables, but your application code must already support PostgreSQL and use the correct settings.

Can PostgreSQL be removed after installation?

No. The confirmation message states that the installation is irreversible and PostgreSQL cannot be uninstalled from the environment.

When are the generated environment variables applied?

They are applied during the next deployment.

Do I need to redeploy the application after installation?

Yes. Redeploy the application so the generated database variables can be applied.

Where can I find the database credentials?

After installation, open the Database section. The database name, username, and password are displayed there.

Why is the password hidden?

The password is hidden to protect the database credentials. Use the copy icon when you need to use it.

What is the Database Manager?

It is a built-in tool that allows you to access and manage the PostgreSQL database from the Cloudways Platform.

Can I use Supabase instead of Cloudways PostgreSQL?

Yes. The Database section provides a Supabase connection option for customers who want to manage their PostgreSQL database externally.

Does Cloudways manage a connected Supabase database?

The application remains hosted on Cloudways, but the external database is managed through Supabase.

Will database changes affect the live application?

They may. Applications can immediately use data added, changed, or deleted from the connected database.


That's it! We hope this article was helpful!

Did this answer your question?