An AI-powered email client that helps you manage your inbox intelligently.
Want to contribute? Check out our Contributing Guide for setup instructions and development workflows.
This project supports production deployment using Docker and Docker Compose.
- Docker and Docker Compose installed on your deployment server
- Environment variables configured (see Environment Configuration below)
- Build and start all services:
docker-compose -f docker-compose.prod.yml up --build -d- View logs:
docker-compose -f docker-compose.prod.yml logs -f- Stop all services:
docker-compose -f docker-compose.prod.yml downThe production deployment includes:
- postgres: PostgreSQL 16 database with persistent storage
- redis: Redis cache with persistent storage
- web: Main Astro application (port 3000)
- sync: WebSocket synchronization service (port 3001)
- mail-ingester: Email processing service (port 3002)
All services include health checks and proper dependency management. The web service will automatically run database migrations on startup.
Each service requires different environment variables. The following breakdown shows what each service needs:
OAuth and Authentication:
OAUTH_ENCRYPTION_KEY- Encryption key for OAuth tokensAUTH_SECRET- Secret for authentication sessionsSYNC_AUTH_SECRET- Secret for sync service authentication
Google Services:
GOOGLE_CLIENT_ID- Google OAuth client IDGOOGLE_CLIENT_SECRET- Google OAuth client secretGOOGLE_GMAIL_TOPIC- Google Pub/Sub topic for Gmail notificationsGOOGLE_GENERATIVE_AI_API_KEY- Google Generative AI API key
Stripe Payment Processing:
STRIPE_SECRET_KEY- Stripe API secret key (optional, Stripe features disabled if omitted)STRIPE_SIGNING_SECRET- Stripe webhook signing secret (required if Stripe enabled)STRIPE_DEFAULT_PRICE_ID- Default Stripe price ID for subscriptions (required if Stripe enabled)
Storage (S3):
BUCKET_NAME- S3 bucket nameAWS_ACCESS_KEY_ID- AWS access key for S3 bucket accessAWS_SECRET_ACCESS_KEY- AWS secret key for S3 bucket access
Monitoring and Logging:
SENTRY_DSN- Sentry DSN for server-side error tracking (optional, disables if omitted)SENTRY_CLIENT_DSN- Sentry DSN for client-side error tracking (optional, disables if omitted)AXIOM_TOKEN_WEB- Axiom token for web service loggingAXIOM_DATASET- Axiom dataset name (optional, defaults tomarlo-web)
Desktop App:
GH_FETCH_RELEASE_TOKEN- GitHub token for fetching desktop app releases (optional)
Service URLs:
PUBLIC_BACKEND_URL- Backend URL (e.g., https://marlo.example.com)PUBLIC_SYNC_ENGINE_URL- Sync engine WebSocket URL (e.g., wss://marlo-sync.example.com)
Build Configuration:
NPM_TASKFORCESH_TOKEN- NPM token for BullMQ Pro access (optional)
SYNC_AUTH_SECRET- Secret for authenticating with sync serviceDIRECT_DATABASE_URL- Direct PostgreSQL connection string for listening to notificationsSENTRY_DSN- Sentry DSN for error tracking (optional, disables if omitted)AXIOM_TOKEN_SYNC- Axiom token for sync service loggingAXIOM_DATASET- Axiom dataset name (optional, defaults tomarlo-sync)NPM_TASKFORCESH_TOKEN- NPM token for BullMQ Pro access (optional)
BULL_BOARD_USERNAME- Username for Bull Board dashboard authentication (optional)BULL_BOARD_PASSWORD- Password for Bull Board dashboard authentication (optional)GOOGLE_SERVICE_ACCOUNT- Google service account credentials JSONOAUTH_ENCRYPTION_KEY- Encryption key for OAuth tokensSENTRY_DSN- Sentry DSN for error tracking (optional, disables if omitted)BUCKET_NAME- S3 bucket nameAWS_ACCESS_KEY_ID- AWS access key for S3 bucket accessAWS_SECRET_ACCESS_KEY- AWS secret key for S3 bucket accessAXIOM_TOKEN_INGEST- Axiom token for mail ingester loggingAXIOM_DATASET- Axiom dataset name (optional, defaults tomarlo-ingest)NPM_TASKFORCESH_TOKEN- NPM token for BullMQ Pro access (optional)
DATABASE_URL- PostgreSQL connection stringREDIS_URL- Redis connection stringAXIOM_ENABLED- Enable Vector logging for Axiom (set to "true" to enable, defaults to false)
For production deployments, configure these environment variables through your deployment platform or use a secrets management tool.
For local development, see the Contributing Guide for setup instructions.
Marlo requires a Google Cloud project to access Gmail and Google Contacts APIs. Follow these steps to configure your project:
If you don't already have one, create a new project in the Google Cloud Console.
Enable the following APIs in your project:
- Gmail API
- Cloud Pub/Sub API
- Google OAuth2 API
- Navigate to APIs & Services > Credentials in the Google Cloud Console
- Click Create Credentials > OAuth client ID
- Choose Web application as the application type
- Configure the OAuth consent screen if prompted
- Add authorized redirect URIs (e.g.,
https://yourdomain.com/auth/google/callback) - Save and copy your Client ID and Client Secret
Set these values as environment variables:
GOOGLE_CLIENT_ID- Your OAuth client IDGOOGLE_CLIENT_SECRET- Your OAuth client secret
When users authenticate, Marlo requests the following OAuth scopes:
openid- OpenID Connect authenticationprofile- Basic profile informationemail- User's email addresshttps://www.googleapis.com/auth/gmail.readonly- Read Gmail messageshttps://www.googleapis.com/auth/gmail.modify- Modify Gmail messages (labels, etc.)https://www.googleapis.com/auth/gmail.compose- Create draft messageshttps://www.googleapis.com/auth/gmail.send- Send emailshttps://www.googleapis.com/auth/pubsub- Subscribe to Gmail push notificationshttps://www.googleapis.com/auth/contacts.readonly- Read contacts
These scopes are configured automatically by Marlo, but you should be aware of them when setting up your OAuth consent screen.
Marlo uses a service account email to verify webhook authenticity:
- Navigate to APIs & Services > Credentials
- Click Create Credentials > Service account
- Name your service account (e.g.,
marlo-ingest) and create it - Grant it appropriate permissions (if needed for your organization)
- Copy the service account email (format:
name@project-id.iam.gserviceaccount.com)
Set the service account email as the GOOGLE_SERVICE_ACCOUNT environment variable.
Marlo uses Google Cloud Pub/Sub to receive real-time Gmail notifications:
- Navigate to Pub/Sub > Topics in the Google Cloud Console
- Click Create Topic
- Name your topic (e.g.,
gmail-notifications) - Note the full topic name (format:
projects/YOUR_PROJECT_ID/topics/TOPIC_NAME) - Grant Gmail API permission to publish to this topic by adding
gmail-api-push@system.gserviceaccount.comas a principal with the Pub/Sub Publisher role
Set the full topic name as the GOOGLE_GMAIL_TOPIC environment variable.
Marlo uses Google's Generative AI for AI-powered features:
- Visit the Google AI Studio
- Create a new API key
- Copy the API key
Set this as the GOOGLE_GENERATIVE_AI_API_KEY environment variable.
See LICENSE.md.