Docs/Connect/SSL Setup

SSL Setup

All PhoenixDB connections are encrypted with SSL by default.

SSL is Always Enabled

PhoenixDB uses wildcard Let's Encrypt certificates for all database connections. SSL is automatically configured — no manual setup required.

SSL Modes

PostgreSQL supports several SSL modes. Here's how they work with PhoenixDB:

ModeDescriptionRecommended
requireEncrypt connection, don't verify certificate
preferUse SSL if available, fallback to plain
verify-caVerify server certificate is signed by trusted CA
verify-fullVerify certificate and hostname match
disableNo encryption (not supported)

Recommendation: Use sslmode=require for the best balance of security and compatibility.

Connection Examples with SSL

Node.js (pg)

Using node-postgres

const { Pool } = require('pg');

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

Python (psycopg2)

Using psycopg2-binary

import psycopg2
import os

conn = psycopg2.connect(
    os.environ['DATABASE_URL'],
    sslmode='require'
)

Laravel

config/database.php

'pgsql' => [
    'driver' => 'pgsql',
    'url' => env('DATABASE_URL'),
    'sslmode' => 'require',
],

Certificate Information

Let's Encrypt Certificates

All PhoenixDB servers use wildcard Let's Encrypt certificates for the*.phoenixdb.space domain.

Automatic Renewal

Certificates are automatically renewed before expiration. No action required on your part.