Skip to Content
Managed Databases

Managed Databases - Complete Guide

Deploy and manage production-ready PostgreSQL databases with automated backups, high availability, and performance monitoring.

Overview

Managed Databases provide fully-managed PostgreSQL database instances with automatic backups, security updates, and monitoring. Focus on your application while ScaleNodes handles database administration.

Access Path: /dashboard/storage/databases


Viewing Your Databases

Databases List Page

When you navigate to /dashboard/storage/databases, you’ll see:

Search & Filter

  • Search box at the top - Search by database name or type
  • Results filter as you type

Database Cards

Each database displays as a card showing:

  • Database Name - The identifier you assigned
  • Database Type - Platform (e.g., PostgreSQL 15, PostgreSQL 14)
  • Status Badge - Current state:
    • 🟢 Running - Database is operational
    • 🟡 Starting - Database is initializing
    • 🔴 Failed - Database encountered an error
    • Stopped - Database is not running
  • Plan - Resource allocation (vCPU, RAM, Storage)
  • Created - When the database was provisioned

Actions

  • New Database button (top right) - Create a new database
  • Click any card - Open the database details page

Use the search to quickly find databases by name or filter by database type.


Creating a New Database

Click New Database to start the creation wizard.

Step 1: Database Name

Database Name

  • Enter a unique identifier for your database
  • Use lowercase letters, numbers, and hyphens
  • Example: production-db, staging-postgres, app-database
  • This name appears in your dashboard and connection strings

Naming Best Practices

  • Use descriptive names that indicate purpose
  • Include environment (e.g., prod-, staging-)
  • Keep it short but meaningful

Step 2: Choose Database Platform

Available Platforms

Currently supported:

  • PostgreSQL 15 - Latest stable version (recommended)
  • PostgreSQL 14 - Previous stable version
  • PostgreSQL 13 - Older stable version

Selecting a Version

  • Choose the latest version unless you have specific compatibility requirements
  • Consider your application’s PostgreSQL version compatibility
  • Newer versions include performance improvements and security updates

Major version upgrades require manual migration. Choose your version carefully.

Step 3: Select Pricing Plan

Choose resources based on your database workload:

Plan Options

Starter - 0.5 vCPU, 1 GB RAM, 10 GB Storage

  • Small applications
  • Development and testing
  • Low query volume

Basic - 1 vCPU, 2 GB RAM, 25 GB Storage

  • Small production databases
  • Personal projects
  • Moderate query volume

Standard - 2 vCPU, 4 GB RAM, 50 GB Storage

  • Production applications
  • Medium traffic
  • Multiple concurrent connections

Pro - 4 vCPU, 8 GB RAM, 100 GB Storage

  • High-traffic applications
  • Large datasets
  • Many concurrent connections

Enterprise - Custom resources

  • Contact support for custom configurations
  • Dedicated resources
  • Advanced features

What’s Included

  • Automated daily backups (retained for 7 days)
  • Automatic security updates
  • High availability configuration
  • Performance monitoring
  • SSL/TLS encryption

Billing

  • Billed hourly while database is running
  • Upgrade or downgrade anytime
  • No long-term commitments

Step 4: Create Database

Click Create Database to provision your database.

Provisioning Process

  1. ScaleNodes allocates resources
  2. PostgreSQL is installed and configured
  3. Security settings are applied
  4. Initial database and user are created
  5. Connection credentials are generated

Wait Time

  • Typically 2-5 minutes
  • Status changes from “Starting” to “Running”
  • You’ll be redirected to the database list

Managing Your Database

Click on any database card to open the database details page.

Database Details Header

Database Name & Status

  • Large database name at the top
  • Status badge showing current state
  • Last updated timestamp

Primary Actions

  • Restart - Stop and start the database service
    • Use for applying configuration changes
    • Quick recovery from issues
    • Brief downtime (30-60 seconds)

Restarting your database will cause brief downtime. Active connections will be dropped.


Database Tabs

Details Tab

Status Information

  • Status: Current operational state
  • Last Updated: Most recent status change
  • Uptime: How long the database has been running

Plan & Resources

  • Plan Name: Current pricing tier
  • vCPU: Allocated CPU cores
  • RAM: Memory allocation
  • Storage: Disk space (used / total)
  • Upgrade Plan button - Scale to a higher tier

Environment Variables

Connection credentials needed for your application:

DATABASE_HOST

  • The database server hostname
  • Example: db-abc123.scalenodes.internal
  • Use this in your connection strings

DATABASE_PORT

  • PostgreSQL port number
  • Default: 5432

DATABASE_NAME

  • The default database name
  • Usually matches your database service name

DATABASE_USER

  • PostgreSQL username for authentication
  • Default: postgres or custom user

DATABASE_PASSWORD

  • Secure password for database access
  • Click the eye icon to reveal
  • Click copy icon to copy to clipboard
  • Keep this secret - never commit to Git

DATABASE_URL

  • Complete connection string
  • Format: postgresql://user:password@host:port/database
  • Use directly in most frameworks and ORMs

Using Connection Details

Node.js Example

const { Pool } = require('pg'); const pool = new Pool({ connectionString: process.env.DATABASE_URL, ssl: { rejectUnauthorized: false } });

Python Example

import psycopg2 conn = psycopg2.connect( host=os.environ['DATABASE_HOST'], port=os.environ['DATABASE_PORT'], database=os.environ['DATABASE_NAME'], user=os.environ['DATABASE_USER'], password=os.environ['DATABASE_PASSWORD'] )

Django Settings

DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql', 'NAME': os.environ['DATABASE_NAME'], 'USER': os.environ['DATABASE_USER'], 'PASSWORD': os.environ['DATABASE_PASSWORD'], 'HOST': os.environ['DATABASE_HOST'], 'PORT': os.environ['DATABASE_PORT'], } }

Store connection details as environment variables in your application. Never hardcode credentials.

Actions

  • Show/Hide - Toggle password visibility (eye icon)
  • Copy - Copy any value to clipboard (copy icon)

Settings Tab

Configure and manage your database.

Database Configuration

General Settings

  • View database version
  • Check creation date
  • Review resource allocation

Connection Limits

  • Maximum concurrent connections
  • Based on your plan tier
  • Starter: 20 connections
  • Basic: 50 connections
  • Standard: 100 connections
  • Pro: 200 connections

Backups

Automatic Backups

  • Daily automated backups
  • Retained for 7 days
  • Taken during low-traffic hours
  • Point-in-time recovery available

Manual Backup

  • Create on-demand backup
  • Useful before major changes
  • Click Create Backup button

Restore from Backup

  • Select backup from list
  • Click Restore to revert database
  • Warning: This overwrites current data

Danger Zone

Delete Database

  • Permanently delete this database
  • Click Delete Database button
  • Type the database name to confirm
  • Warning: This action cannot be undone
  • All data will be permanently lost
  • Backups will also be deleted

Critical: Deleting a database is permanent. Export your data first if you need to keep it.


Common Workflows

Connecting Your Application

Get Connection Details

  1. Open your database details page
  2. Go to Details tab
  3. Copy the DATABASE_URL or individual credentials

Add to Application

For Web Services

  1. Go to your web service settings
  2. Navigate to Variables tab
  3. Add environment variables:
    • DATABASE_URL = (paste the connection URL)
    • Or add individual variables (HOST, PORT, NAME, USER, PASSWORD)
  4. Click Save Changes
  5. Restart your web service

For Local Development

  1. Create .env file in your project
  2. Add connection variables
  3. Load with dotenv or similar
  4. Never commit .env to Git

Test Connection

Run your application and verify database connectivity:

  • Check application logs for connection success
  • Run a test query
  • Verify data can be read/written

Migrating Data

Export from Old Database

Using pg_dump:

pg_dump -h old-host -U old-user -d old-database > backup.sql

Or use a GUI tool like pgAdmin, DBeaver, or TablePlus.

Import to ScaleNodes Database

Using psql:

psql -h DATABASE_HOST -U DATABASE_USER -d DATABASE_NAME < backup.sql

Enter your DATABASE_PASSWORD when prompted.

Verify Migration

  1. Connect to your new database
  2. Check table counts match
  3. Verify data integrity
  4. Test application functionality

Update Application

  1. Update connection strings to point to new database
  2. Restart your application
  3. Monitor for any connection issues

Scaling Your Database

Monitor Performance

Watch for signs you need more resources:

  • Slow query performance
  • High CPU usage
  • Memory warnings
  • Connection limit reached
  • Storage nearly full

Upgrade Plan

  1. Go to Details tab
  2. Click Upgrade Plan
  3. Select a higher-tier plan
  4. Review pricing changes
  5. Confirm upgrade

Automatic Migration

ScaleNodes handles the upgrade:

  • Brief downtime (1-2 minutes)
  • Data is preserved
  • Connections are restored
  • New resources are available

Verify Performance

  • Monitor query speeds
  • Check resource usage
  • Ensure connections are stable

Best Practices

Security

  • ✅ Use SSL/TLS for all connections
  • ✅ Store credentials as environment variables
  • ✅ Rotate passwords regularly
  • ✅ Use least-privilege database users
  • ✅ Never expose database ports publicly
  • ✅ Enable connection limits

Performance

  • ✅ Create indexes on frequently queried columns
  • ✅ Use connection pooling in your application
  • ✅ Monitor slow queries
  • ✅ Optimize table structures
  • ✅ Regular VACUUM and ANALYZE operations
  • ✅ Keep PostgreSQL statistics up to date

Backups

  • ✅ Test backup restoration regularly
  • ✅ Create manual backups before major changes
  • ✅ Export critical data for long-term storage
  • ✅ Document your backup schedule
  • ✅ Keep backups in multiple locations

Monitoring

  • ✅ Monitor connection counts
  • ✅ Track query performance
  • ✅ Watch storage usage
  • ✅ Set up alerts for issues
  • ✅ Review logs regularly

Troubleshooting

Cannot Connect to Database

Symptoms: Connection refused or timeout errors

Solutions:

  1. Verify database status is “Running”
  2. Check connection credentials are correct
  3. Ensure your application has the right environment variables
  4. Verify SSL settings in your connection string
  5. Check if connection limit is reached

Slow Query Performance

Symptoms: Queries taking longer than expected

Solutions:

  1. Check if you need to upgrade your plan
  2. Review and optimize slow queries
  3. Add indexes to frequently queried columns
  4. Use EXPLAIN ANALYZE to understand query plans
  5. Consider connection pooling

Storage Full

Symptoms: Cannot write data, errors about disk space

Solutions:

  1. Upgrade to a plan with more storage
  2. Delete unnecessary data
  3. Archive old records
  4. Optimize table storage with VACUUM FULL

Connection Limit Reached

Symptoms: “Too many connections” error

Solutions:

  1. Implement connection pooling in your application
  2. Close idle connections
  3. Upgrade to a plan with higher connection limits
  4. Review application for connection leaks

Database Won’t Start

Symptoms: Status stuck on “Starting” or shows “Failed”

Solutions:

  1. Check if there’s a platform issue (status page)
  2. Try restarting the database
  3. Contact support with your database ID
  4. Review any recent configuration changes

PostgreSQL Tips

Useful Commands

Connect via psql

psql postgresql://USER:PASSWORD@HOST:PORT/DATABASE

List Databases

\l

List Tables

\dt

Describe Table

\d table_name

Show Table Size

SELECT pg_size_pretty(pg_total_relation_size('table_name'));

Show Database Size

SELECT pg_size_pretty(pg_database_size('database_name'));

Performance Queries

Find Slow Queries

SELECT query, calls, total_time, mean_time FROM pg_stat_statements ORDER BY mean_time DESC LIMIT 10;

Check Index Usage

SELECT schemaname, tablename, indexname, idx_scan FROM pg_stat_user_indexes ORDER BY idx_scan ASC;

Monitor Connections

SELECT count(*) FROM pg_stat_activity;

Next Steps

Need help with database optimization or migration? Contact our support team for assistance.