Deployment
Deploy and manage Semaphor on your own infrastructure
Overview
Semaphor Self-Hosted Edition gives you complete control over your analytics infrastructure. Run the entire Semaphor stack on your own servers, maintain data sovereignty, and customize to your needs.
Why Self-Host?
- Data Sovereignty: Keep all data within your infrastructure
- Compliance: Meet regulatory requirements for data residency
- Customization: Configure for your specific security and network needs
- Performance: Optimize for your workload and geographic distribution
- Cost Control: Predictable infrastructure costs at scale
Architecture
Semaphor's self-hosted edition consists of three core services:
- API Service: Main application container running on port 3000, handles authentication, Semaphor Console UI, and API endpoints
- Data Service: Responsible for connecting to your databases and executing queries
- Data Service Sidecar: Runs custom code (Python) in a secure sandbox environment
Database Options:
- Testing & Development: Use the embedded PostgreSQL and Redis that start automatically inside the API container - perfect for trying out Semaphor with zero database setup
- Production Deployment: Connect to your existing dedicated PostgreSQL and Redis instances for better performance, scalability, and integration with your infrastructure
The embedded databases make it incredibly easy to test Semaphor, while the external database option ensures you can scale to production workloads using your existing database infrastructure.
Prerequisites
Before you begin, you'll need:
1. Docker
- Docker 20.10+ and Docker Compose 2.0+
- Verify installation:
docker --version
anddocker-compose --version
- Install Docker if needed
2. Semaphor License
- Get your license key from support.semaphor.cloud
- Format:
SEMA-<payload>.<signature>
- Note: You can request a free 60-day evaluation license to test Semaphor
3. Kinde Authentication
Semaphor requires Kinde for user authentication and access control.
Quick Setup:
- Sign up at kinde.com
Required Credentials:
- Client ID
- Client Secret
- Issuer URL (format:
https://your-subdomain.kinde.com
)
→ See Kinde Authentication Setup for detailed instructions
Quick Start (Docker Compose)
1. Get Setup Files
First, create a new directory for your Semaphor deployment:
Create a docker-compose.yml
file with the following content:
Then generate your configuration file:
2. Configure
Edit semaphor.env
and configure the required fields:
Leave the rest of the configuration as-is. The default values are pre-configured for local testing.
3. Start
Wait for all 3 services to start - api-service, data-service, and data-service-sidecar. You should see output similar to:
Once you see "Ready" from all services, Semaphor is running. You can now stop the services with Ctrl+C
and restart them in the background:
To shut down the services later:
Your data remains safe in the semaphor-data
volume even after shutdown.
4. Access
Open http://localhost:3000/project
Deploy as Independent Containers
To run Semaphor services as individual containers instead of using docker-compose:
1. API Service
2. Data Service
3. Data Service Sidecar
Monitoring
Optional: Report Generation and Scheduling
Semaphor supports automated report generation and email delivery through an AWS-based scheduling service that you deploy in your own AWS account.
Architecture
The service consists of three Lambda functions:
- Schedule Processor: Triggered by CloudWatch Events every 60 minutes (configurable), polls Semaphor APIs to check for active schedules
- PDF Generator: Creates PDFs of dashboards and paginated reports
- Email Sender: Handles email delivery through AWS SES
What It Enables
- Manual PDF export of visuals and dashboards
- Automated report generation on schedules
- Email delivery of generated reports
Prerequisites
- AWS account with appropriate permissions
- AWS CLI and SAM CLI installed locally
- AWS SES configured for sending emails
Deployment
-
Deploy the report scheduler to your AWS account:
Follow the instructions at: github.com/semaphor-analytics/report-scheduler
-
Get your Lambda function URL after deployment completes
-
Add the Lambda URL to your
semaphor.env
:Example:
Note: This environment variable is required for users to export visuals as PDFs or generate reports.
-
Restart Semaphor to apply the configuration:
Once configured, users can create and manage scheduled reports directly from the Semaphor console.
Support
- Email: support@semaphor.cloud