Project Settings

Configure storage, SMTP, auth, and other project settings.

Each project has configurable settings for storage, email, authentication, and more. Changes require a project restart.

Accessing Settings

Via Web UI

  1. Click on a project
  2. Go to Settings tab
  3. Select the category
  4. Make changes
  5. Click Save and restart

Via API

# Get all settings
curl https://supascale.example.com/api/v1/projects/my-project/settings \
  -H "X-API-Key: your-api-key"

# Get specific category
curl "https://supascale.example.com/api/v1/projects/my-project/settings?category=smtp" \
  -H "X-API-Key: your-api-key"

Storage Settings

Configure file storage behavior:

SettingDescriptionDefault
File Size LimitMaximum upload size50MB
Image TransformationEnable imgproxyDisabled

Update via API

curl -X PUT https://supascale.example.com/api/v1/projects/my-project/settings \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "storage",
    "settings": {
      "fileSizeLimit": "100MB"
    }
  }'

SMTP Settings

Configure email delivery for authentication:

SettingDescriptionExample
HostSMTP serversmtp.sendgrid.net
PortSMTP port587
UserSMTP usernameapikey
PasswordSMTP passwordSG.xxx
Sender NameFrom nameMy App
Sender EmailFrom addressnoreply@example.com

Example Configurations

SendGrid

{
  "category": "smtp",
  "settings": {
    "host": "smtp.sendgrid.net",
    "port": 587,
    "user": "apikey",
    "password": "your-sendgrid-api-key",
    "senderName": "My Application",
    "senderEmail": "noreply@myapp.com"
  }
}

Mailgun

{
  "category": "smtp",
  "settings": {
    "host": "smtp.mailgun.org",
    "port": 587,
    "user": "postmaster@mg.yourdomain.com",
    "password": "your-mailgun-password",
    "senderName": "My Application",
    "senderEmail": "noreply@mg.yourdomain.com"
  }
}

Gmail

{
  "category": "smtp",
  "settings": {
    "host": "smtp.gmail.com",
    "port": 587,
    "user": "your-email@gmail.com",
    "password": "your-app-password",
    "senderName": "My Application",
    "senderEmail": "your-email@gmail.com"
  }
}

For Gmail, use an App Password instead of your regular password.

Auth Settings

Configure authentication behavior:

SettingDescriptionDefault
Site URLRedirect URL after authProject URL
JWT ExpiryToken lifetime (seconds)3600
Disable SignupPrevent new registrationsfalse
Email ConfirmRequire email verificationtrue

Update via API

curl -X PUT https://supascale.example.com/api/v1/projects/my-project/settings \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "auth",
    "settings": {
      "siteUrl": "https://myapp.com",
      "jwtExpiry": 7200,
      "disableSignup": false,
      "emailConfirmRequired": true
    }
  }'

Connection Pooler Settings

Configure PgBouncer (requires pooler service enabled):

SettingDescriptionDefault
Pool ModeConnection pooling modetransaction
Default Pool SizeConnections per user/db20
Max Client ConnectionsMaximum client connections100

Pool Modes:

  • session - Connection held for entire session
  • transaction - Connection released after transaction
  • statement - Connection released after each statement

Update via API

curl -X PUT https://supascale.example.com/api/v1/projects/my-project/settings \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "pooler",
    "settings": {
      "poolMode": "transaction",
      "defaultPoolSize": 25,
      "maxClientConnections": 200
    }
  }'

API Settings

Configure REST API behavior:

SettingDescriptionDefault
Max RowsMaximum rows returned1000
DB SchemaExposed schemaspublic

Update via API

curl -X PUT https://supascale.example.com/api/v1/projects/my-project/settings \
  -H "X-API-Key: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "category": "api",
    "settings": {
      "maxRows": 2000,
      "dbSchema": "public,api"
    }
  }'

Applying Changes

After modifying settings:

  1. Click Save Changes (UI) or make API call
  2. Restart the project for changes to take effect
# Via API
curl -X POST https://supascale.example.com/api/v1/projects/my-project/stop \
  -H "X-API-Key: your-api-key"

curl -X POST https://supascale.example.com/api/v1/projects/my-project/start \
  -H "X-API-Key: your-api-key"

Viewing Current Settings

Settings are returned with sensitive values masked:

curl https://supascale.example.com/api/v1/projects/my-project/settings \
  -H "X-API-Key: your-api-key"

Response:

{
  "storage": {
    "fileSizeLimit": "50MB"
  },
  "smtp": {
    "host": "smtp.sendgrid.net",
    "port": 587,
    "user": "apikey",
    "password": "********",
    "senderName": "My App",
    "senderEmail": "noreply@example.com"
  },
  "auth": {
    "siteUrl": "https://myapp.com",
    "jwtExpiry": 3600
  }
}

Best Practices

  1. Test SMTP before enabling email confirmation
  2. Use environment-specific settings for dev/staging/prod
  3. Document your configuration for team reference
  4. Backup settings before major changes