Swiftgum requires very little setup in the cloud environment: typically, you only need an API key. If you choose to run Swiftgum on-prem, you can customize environment variables and settings for your local deployment.

1. Cloud Configuration

For most teams using Swiftgum Cloud:

  • No Environment Variables: Simply include your x-api-key in the header when calling Swiftgum’s API (e.g., https://api.swiftgum.com).
  • Dashboard Settings: Manage provider credentials (like Google OAuth secrets) and advanced configurations directly in the Swiftgum admin UI.

Tip: If you need to rotate your API key, do so from the Swiftgum Cloud dashboard. Make sure to update your applications accordingly.

2. On-Prem Environment Variables

If you have an on-prem Swiftgum license, you can set the following environment variables to tailor your deployment:

VariableRequiredDescription
DATABASE_URLOptionalIf self-hosting with Postgres/SQLite, specify the DB connection string.
ENCRYPTION_KEYOptionalUsed for encrypting credentials at rest. If not provided, a default is used (not recommended for prod).
PORTOptionalThe local port Swiftgum listens on (e.g., 3000).
LOG_LEVELOptionalSet to info, warn, error, or debug for logging verbosity.
SESSION_TIMEOUTOptionalHow long a portal session remains valid (e.g., 3600 for one hour).
COOKIE_SECRETOptionalUsed to sign session cookies if running Swiftgum behind a custom domain.

Example .env

DATABASE_URL=postgres://user:password@localhost:5432/swiftgum ENCRYPTION_KEY=something-secure PORT=3000 LOG_LEVEL=info SESSION_TIMEOUT=3600 COOKIE_SECRET=my_cookie_secret

Avoid committing your .env file to source control. Use secure secret management (e.g., GitHub Actions secrets, AWS Parameter Store).

3. Additional Settings

Provider Credentials

If using OAuth integrations (e.g., Google Drive), store client IDs/secrets in environment variables or a secrets manager. Then reference them in Swiftgum’s admin UI under Integrations.

Debug & Logging

  • LOG_LEVEL: Change verbosity (info, warn, error, or debug).
  • ENABLE_DEBUG: For more verbose logs, set this to true.

Session & Portal

  • SESSION_TIMEOUT: Dictates how long a portal session is valid.
  • COOKIE_SECRET: If running behind a custom domain, helps sign session cookies securely.

4. Testing Your Configuration

4.1 On-Prem

  • Spin up Swiftgum: Run via Docker Compose or your custom deployment.
  • Check Logs: Look for any missing variables or config errors.
  • Access Admin UI: Visit http://localhost:3000/admin (or your chosen port) and log in with your admin credentials.

4.2 Cloud

  • Dashboard Confirmation: Use the Swiftgum Cloud dashboard to confirm that your integrations, OAuth credentials, and advanced settings are correct.
  • API Calls: Verify that your x-api-key is working by calling the Portal Session endpoint.

With these configurations in place, you’re ready to manage integrations, tokens, and user sessions confidently.