Environment configuration
Basedash requires several environment variables to be configured before deployment. The fastest way to get started is using our environment file generator.Quick start: Generate environment file
Visit https://proud-dog-65.deno.dev/ to generate a ready-to-use.env file with securely generated secrets.
- Fresh secrets every time: Refresh the page to generate a new set of random values
- Copy and customize: Download the file and customize it for your deployment
- Secure by default: All encryption keys, secrets, and passwords are randomly generated
Required core variables
These variables must be set for Basedash to function: Database connection:Optional configuration
Application settings:BASE_URL is highly recommended for production deployments as it’s used for:
- Email links - Ensures invitation emails, password resets, and notifications contain the correct URL to access your Basedash instance
- OAuth callbacks - Required for SSO and third-party integrations to redirect users back to your deployment
- Shared dashboard links - Generated share links will use this URL so recipients can access dashboards
- Webhooks and API callbacks - External services need the correct URL to communicate with your instance
- CORS configuration - Helps ensure proper cross-origin request handling
https://basedash.your-company.com- Production deployment with custom domainhttps://analytics.acme.io- Custom branded URLhttp://localhost:3000- Local development only (not recommended for production)
PostgreSQL database
PostgreSQL is the only database dependency required by Basedash.Automatic PostgreSQL setup
When using Agent deployment or our provided docker-compose file, PostgreSQL is automatically included and configured:- PostgreSQL 16 Alpine container is deployed alongside Basedash
- Automatic migrations run on startup
- Health checks ensure the database is ready before the app starts
- Persistent storage via Docker volumes
PostgreSQL configuration
The following environment variables configure the PostgreSQL instance:Using an external PostgreSQL instance
If you prefer to use an existing PostgreSQL instance instead of the bundled one:-
Point DATABASE_URL to your external instance:
- Ensure your PostgreSQL version is 16 or higher
-
Create the database:
- Migrations will run automatically on first startup
Database backups
For production deployments, we recommend regular backups:AI configuration
Basedash’s AI features require an AI provider. You can use OpenAI, Azure OpenAI, or other OpenAI-compatible providers.OpenAI (default)
To use OpenAI’s API:Azure OpenAI
To use Azure OpenAI Service:Alternative AI providers
Any OpenAI-compatible API can be used by setting a customOPENAI_BASE_URL:
AI feature considerations
When using custom AI models or providers:- SQL generation quality may vary from our tested models
- Performance benchmarks are maintained for default OpenAI models only
- New features may require specific model capabilities
- Token limits and pricing vary by provider
Email configuration
Email is used for notifications, alerts, and user invitations. Basedash supports SMTP for outbound email.SMTP configuration
Configure your SMTP server:- Resend: smtp.resend.com:587
- SendGrid: smtp.sendgrid.net:587
- Mailgun: smtp.mailgun.org:587
- AWS SES: email-smtp.us-east-1.amazonaws.com:587
- Gmail: smtp.gmail.com:587 (requires app password)
Amazon SES configuration
Configure Amazon Simple Email Service (SES) directly:SES_FROM_EMAIL address is verified in your SES configuration.
Email features
With email configured, users can:- Receive dashboard sharing invitations
- Get alert notifications
- Access password reset functionality
- Receive scheduled report deliveries
Authentication and access control
- SSO integration - Connect to your existing identity providers (see our SSO documentation for details)
- Custom auth providers - We can add support for specific providers as needed
- Multi-organization support - Deploy multiple workspaces or organizations
- Granular permissions - Maintain the same access control features as cloud
Disable public signups
For private deployments where you want to restrict who can create accounts, you can disable public signups:- First user signup - Automatically allowed to bootstrap the instance
- User invitations - Team members can still be invited via magic links
- JWT SSO - Embedded authentication continues to work
- Enterprise SSO - SAML/OIDC authentication is unaffected
- Existing users - Login for users who already have accounts
License key
Self-hosted Basedash instances require a license key for proper operation. The license key enables license validation, usage tracking, and ensures you receive ongoing support and updates.Obtaining a license key
Contact Basedash at [email protected] to obtain your license key. Once you have it, add it to your environment configuration:License behavior
Without a license key:- The application functions normally
- An info banner is displayed prompting you to add a license key
- No heartbeats are sent to the license server
- The application sends periodic heartbeats (every 6 hours) to the Basedash license server
- Heartbeats report basic usage metrics (organization and user counts) for billing purposes
- No banner is displayed when your license is active and valid
Grace periods
Basedash includes grace periods to ensure your deployment remains operational during temporary issues:- License expiration: 14-day grace period after expiration. During this time, a warning banner is displayed but all features remain available. After the grace period, new organization creation is disabled.
- Network issues: 7-day grace period if the license server cannot be reached. This ensures your deployment continues working during network outages or maintenance windows.
Troubleshooting license issues
“License key not configured” banner: Add yourLICENSE_KEY to your environment configuration and restart the application.
“Unable to verify license” warning:
- Check that your deployment has outbound network access to
charts.basedash.com - Verify no firewall rules are blocking HTTPS traffic
- The application will continue working during network issues (7-day grace period)
Update management
Agent deployment updates
With Agent deployment, updates are managed through the Distr customer portal:- Automatic updates - Enable automatic updates for the latest features and fixes
- Version pinning - Lock to a specific version for stability and testing
- Update scheduling - Control when updates are applied
- Rollback support - Revert to previous versions if needed
Container deployment updates
When using container deployment, you control the update process:- Check for new versions in the Distr customer portal
- Pull the new image from the registry:
- Restart services to apply the update:
- Verify deployment health after updating
Version locking for compliance
For organizations with strict change control:- Lock to specific versions for training periods or audits
- Test updates in a staging environment before production
- Coordinate updates with your internal release schedule
Advanced configuration
Storage (optional)
For avatar and icon uploads, configure S3-compatible storage:https://{S3_BUCKET_NAME}.{S3_BUCKET_ENDPOINT_HOST}. If your CDN uses a different URL pattern (e.g., a custom domain or path-style URLs), set the CDN base URL explicitly:
Google Cloud Storage setup
Google Cloud Storage setup
Follow these steps to configure Google Cloud Storage (GCS) as your S3-compatible storage backend.Apply the CORS configuration using the Or via the Console:Note about the CDN URL: If you don’t set up a CDN, Basedash will automatically construct the public URL using
Step 1: Create a Google Cloud Storage Bucket
- Go to the Google Cloud Console
- Navigate to Cloud Storage → Buckets
- Click Create bucket
- Configure the bucket:
- Name: Choose a globally unique name (e.g.,
basedash-uploads-yourcompany) - Location type: Choose based on your needs (Regional is typically fine)
- Region: Select a region close to your users
- Storage class: Standard
- Access control: Choose Fine-grained (required for ACL-based public-read access)
- Public access prevention: Uncheck “Enforce public access prevention on this bucket” (since Basedash uploads files with
public-readACL)
- Name: Choose a globally unique name (e.g.,
- Click Create
Step 2: Configure Bucket Permissions
- Go to your bucket → Permissions tab
- Click Grant Access
- Add
allUsersas a principal with the role Storage Object Viewer (this allows public read access to uploaded files)
Step 3: Enable Interoperability (S3-Compatible Access)
- Go to Cloud Storage → Settings (gear icon in the left sidebar)
- Click the Interoperability tab
- Under “Access keys for service accounts,” click Create a key for a service account
- Select or create a service account with Storage Admin permissions for your bucket
- Click Create key
- Save both values:
- Access key (this is your
S3_BUCKET_ACCESS_KEY_ID) - Secret (this is your
S3_BUCKET_SECRET_ACCESS_KEY)
- Access key (this is your
Step 4: Configure CORS
Since Basedash uploads files directly from the browser using pre-signed URLs, you need to configure CORS. Create a file calledcors.json:gcloud CLI:- Install Google Cloud SDK if not already installed
- Run the command above
Step 5: Set Environment Variables
Add these environment variables to your Basedash deployment:S3_BUCKET_NAME and S3_BUCKET_ENDPOINT. Only set S3_CDN_BASE_URL if you have configured a CDN (like Google Cloud CDN) to serve files from your bucket.Step 6: Verify the Setup
After deploying with the new environment variables:- Try uploading a user avatar or organization icon
- Check that the file appears in your GCS bucket
- Verify the public URL works by accessing it directly
Summary of Environment Variables
| Variable | Value | Description |
|---|---|---|
S3_BUCKET_NAME | your-bucket-name | The GCS bucket name |
S3_BUCKET_ENDPOINT | https://storage.googleapis.com | GCS S3-compatible endpoint |
S3_BUCKET_REGION | auto | Can be auto or your bucket’s region |
S3_BUCKET_ACCESS_KEY_ID | Your HMAC access key | From Interoperability settings |
S3_BUCKET_SECRET_ACCESS_KEY | Your HMAC secret | From Interoperability settings |
S3_CDN_BASE_URL | https://your-cdn-domain.com | (Optional) Only set if using a CDN |
Slack integration (optional) - ALPHA
Note: Slack integration is currently in alpha and not fully supported for self-hosted deployments.Enable Slack notifications and alerts:
Logging
Control application verbosity:fatal, error, warn, info, debug, trace
Support and troubleshooting
Getting help
- Distr customer portal - Monitor deployment health and access support resources
- Email support - Reach out to [email protected] for configuration assistance
- Documentation - Refer to deployment-specific guides in the portal
Health monitoring
Check application health:Common configuration issues
Application won’t start:- Verify all required environment variables are set
- Check DATABASE_URL format and accessibility
- Ensure CRYPTO_KEY is exactly 64 hex characters
- Review logs:
docker compose logs app
- Verify OPENAI_API_KEY is set correctly
- Check API key has sufficient credits/quota
- Test connectivity to AI provider endpoint
- Verify SMTP credentials and host
- Check SMTP_PORT matches your provider (usually 587 or 465)
- Ensure firewall allows outbound connections on SMTP port
- Test with a simple SMTP client to verify credentials