ACLClouds
ACLClouds

How do I connect my bot to a database?

Create the database in the panel, restrict the allowed hosts and set up a secure connection.

Use the service’s Databases page when your plan includes this quota. The credentials shown are separate from your ACLClouds account.

Step-by-step procedure

  1. Create the database

    Open Databases, enter a name and restrict connections to the required host.

  2. Copy the settings

    Note the host, port, database name, user and password from the panel.

  3. Create variables

    Store settings in separate variables or a DATABASE_URL, never in Git.

  4. Test the connection

    Run a simple query at startup and handle reconnections without an aggressive retry loop.

  5. Back up

    Regularly export data with the appropriate tool before migration or deletion.