Skip to content

Services

Configure external services that SPEAR relies on for email delivery, file storage, and other functionality.


ServicePurposeRequired
SMTPEmail deliveryOptional
S3 StorageBackup storageOptional
File StorageLocal file settingsConfigured

SMTP enables email functionality for password resets, notifications, and report sharing.

🖥️ SMTP Configuration Settings Screenshot

Navigate to Admin > Services > SMTP

SettingDescriptionExample
HostSMTP server hostnamesmtp.gmail.com
PortSMTP port587
UsernameAuthentication username[email protected]
PasswordAuthentication passwordapp-password
Sender NameDisplay name for emailsSPEAR Notifications
Sender EmailFrom address[email protected]
EncryptionTLS/STARTTLS/NoneSTARTTLS

Gmail / Google Workspace:

Host: smtp.gmail.com
Port: 587
Encryption: STARTTLS
Password: App Password (not regular password)

Microsoft 365:

Host: smtp.office365.com
Port: 587
Encryption: STARTTLS
Password: App Password or OAuth token

Amazon SES:

Host: email-smtp.us-east-1.amazonaws.com
Port: 587
Encryption: STARTTLS
Username: SMTP credentials from SES console
Password: SMTP credentials from SES console

SendGrid:

Host: smtp.sendgrid.net
Port: 587
Encryption: STARTTLS
Username: apikey
Password: Your SendGrid API key
  1. Configure all settings
  2. Click Test Connection
  3. Enter a test email address
  4. Click Send Test
  5. Verify email received

Connection timeout:

  • Verify hostname and port
  • Check firewall rules
  • Try alternate ports (465, 25)

Authentication failed:

  • Verify username and password
  • For Gmail, use App Password
  • Check if account allows SMTP access

SSL/TLS errors:

  • Try different encryption options
  • Verify certificate is valid
  • Check for proxy interference

Configure external storage for backups and large file storage.

🖥️ S3 Storage Configuration Screenshot

Navigate to Admin > Services > Storage

SettingDescription
ProviderS3, MinIO, Backblaze B2, etc.
EndpointS3-compatible endpoint URL
RegionStorage region
BucketBucket name
Access KeyAccess key ID
Secret KeySecret access key
Path PrefixOptional folder prefix

AWS S3:

Endpoint: https://s3.amazonaws.com
Region: us-east-1
Bucket: your-bucket-name
Access Key: AKIAIOSFODNN7EXAMPLE
Secret Key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY

MinIO (Self-hosted):

Endpoint: https://minio.yourserver.com
Region: us-east-1
Bucket: spear-backups
Access Key: minioadmin
Secret Key: minioadmin

Backblaze B2:

Endpoint: https://s3.us-west-002.backblazeb2.com
Region: us-west-002
Bucket: your-bucket-name
Access Key: keyID from B2
Secret Key: applicationKey from B2

DigitalOcean Spaces:

Endpoint: https://nyc3.digitaloceanspaces.com
Region: nyc3
Bucket: your-space-name
Access Key: Spaces access key
Secret Key: Spaces secret key

Cloudflare R2:

Endpoint: https://your-account-id.r2.cloudflarestorage.com
Region: auto
Bucket: your-bucket-name
Access Key: R2 access key
Secret Key: R2 secret key
  1. Configure all settings
  2. Click Test Connection
  3. System uploads a small test file
  4. Verify test succeeds
  5. Save configuration

S3 storage is used for:

  • Automated backups (if configured)
  • Large file offloading (optional)
  • Backup export destination

Configure local file storage behavior.

Navigate to Admin > Services > Files

SettingDescriptionDefault
Max Upload SizeMaximum file upload size50MB
Allowed TypesPermitted file extensionsimages, documents
Storage PathLocal storage directory./pb_data/storage

Configure allowed file types by category:

CategoryExtensions
Images.jpg, .jpeg, .png, .gif, .svg, .webp
Documents.pdf, .doc, .docx, .xls, .xlsx
Archives.zip, .tar, .gz
Data.json, .xml, .csv

Configure automatic cleanup of temporary files:

SettingDescription
PDF Export RetentionDays to keep exported PDFs
Upload Temp RetentionDays to keep temporary uploads
Orphaned File CleanupRemove unreferenced files

🖥️ Service Health Status Dashboard Screenshot

View service health at Admin > Services > Status

ServiceIndicators
SMTPLast successful send, error rate
S3 StorageConnection status, last backup
DatabaseSize, connection count
Background JobsQueue length, processing rate

Configure alerts for service issues:

  1. Navigate to Admin > Services > Alerts
  2. Enable alerts for critical services
  3. Set notification threshold
  4. Configure notification method (email if SMTP configured)

Services can also be configured via environment variables:

Terminal window
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USERNAME=[email protected]
SMTP_PASSWORD=password
SMTP_SENDER_NAME="SPEAR"
SMTP_SENDER_EMAIL=[email protected]
Terminal window
S3_ENDPOINT=https://s3.amazonaws.com
S3_REGION=us-east-1
S3_BUCKET=your-bucket
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key

Environment variables override database configuration.


  • Use dedicated email service (SendGrid, SES) for production
  • Create application-specific passwords
  • Set up SPF/DKIM/DMARC for deliverability
  • Monitor bounce and complaint rates
  • Use separate bucket for SPEAR
  • Enable versioning for backup protection
  • Set up lifecycle policies for cost management
  • Use IAM with minimal required permissions
  • Never commit credentials to version control
  • Use environment variables for sensitive settings
  • Rotate access keys regularly
  • Audit service access logs