Documentation Index
Fetch the complete documentation index at: https://docs.insforge.dev/llms.txt
Use this file to discover all available pages before exploring further.
Deploy InsForge to Google Cloud Compute Engine
This guide will walk you through deploying InsForge on Google Cloud Compute Engine using Docker Compose.This cloud walkthrough is community-maintained and can lag the latest InsForge release. The canonical, always-current setup is the
deploy/docker-compose/ directory in the InsForge repo.π Prerequisites
- Google Cloud Account with billing enabled
- Basic knowledge of SSH and command-line operations
- Domain name (optional, for custom domain setup)
π Deployment Steps
1. Create and Configure Compute Engine Instance
1.1 Create Google Cloud Project
- Log into Google Cloud Console at console.cloud.google.com
- Click βSelect a projectβ in the top navigation bar
- Click βNew Projectβ
- Enter project name (e.g.,
insforge-deployment) - Click βCreateβ
- Wait for project creation to complete
1.2 Enable Required APIs
- In your project, navigate to APIs & Services β Library
- Search for and enable these APIs:
- Compute Engine API
- Cloud Storage API (if using for backups)
- Cloud SQL Admin API (if using Cloud SQL)
1.3 Create Compute Engine Instance
- Navigate to Compute Engine β VM instances
- Click βCreate Instanceβ
- Configure your instance:
- Name:
insforge-server(or your preferred name) - Region: Choose a region close to your users
- Zone: Select an availability zone (e.g., us-central1-a)
- Machine configuration:
- Series: N2 or E2
- Machine type:
e2-mediumor larger (minimum 2 vCPU, 4 GB RAM)- For production:
e2-standard-2(2 vCPU, 8 GB RAM) recommended - For testing:
e2-small(2 vCPU, 2 GB RAM) minimum
- For production:
- Boot disk:
- Operating system: Ubuntu LTS (Ubuntu 22.04 LTS or newer)
- Boot disk type: Balanced persistent disk
- Size: 30 GB (minimum 20 GB recommended)
- Firewall:
- Allow HTTP traffic: Checked
- Allow HTTPS traffic: Checked
- Name:
1.4 Configure Firewall Rules
- Navigate to VPC network β Firewall
- Create or modify firewall rules to allow the following ports:
| Name | Direction | Targets | Protocols/ports | Source filters |
|---|---|---|---|---|
| insforge-ssh | Ingress | insforge-server | tcp:22 | Your IP address |
| insforge-http | Ingress | insforge-server | tcp:80 | 0.0.0.0/0 |
| insforge-https | Ingress | insforge-server | tcp:443 | 0.0.0.0/0 |
| insforge-app | Ingress | insforge-server | tcp:7130 | 0.0.0.0/0 |
| insforge-deno | Ingress | insforge-server | tcp:7133 | 0.0.0.0/0 |
| insforge-postgrest | Ingress | insforge-server | tcp:5430 | 0.0.0.0/0 |
| insforge-postgres | Ingress | insforge-server | tcp:5432 | 0.0.0.0/0 (only if needed externally) |
β οΈ Security Note: For production, restrict PostgreSQL (5432) to specific IP addresses or remove external access entirely. Consider using a reverse proxy (nginx) and exposing only ports 80/443.
2. Connect to Your Compute Engine Instance
- In the Google Cloud Console, go to Compute Engine β VM instances
- Find your instance and click the SSH button in the same row, or:
3. Install Dependencies
3.1 Update System Packages
3.2 Install Docker
3.3 Add Your User to Docker Group
After installing Docker, you need to add your user to thedocker group to run Docker commands without sudo:
π‘ Note: If docker ps doesnβt work immediately, log out and log back in via SSH, then try again.
β οΈ Security Note: Adding a user to the docker group grants them root-equivalent privileges on the system. This is acceptable for single-user environments like your Compute Engine instance, but be cautious on shared systems.
3.4 Install Git
4. Deploy InsForge
4.1 Clone Repository
4.2 Create Environment Configuration
Create your.env file with production settings:
deploy/docker-compose/.env.example. Copy it and edit the values:
deploy/docker-compose/.env.example for the full list of supported variables.
Generate Secure Secrets:
π‘ Important: Save these secrets securely. Youβll need them if you ever migrate or restore your instance.
4.3 Start InsForge Services
Ctrl+C to exit log view.
4.4 Verify Services
5. Access Your InsForge Instance
5.1 Test Backend API
5.2 Access Dashboard
Open your browser and navigate to:6. Configure Domain (Optional but Recommended)
6.1 Reserve a Static External IP
- In Google Cloud Console, go to VPC network β External IP addresses
- Click Reserve Static Address
- Name:
insforge-ip - Type: Regional or Global (Regional for VM instances)
- Region: Same as your VM instance
- Click Reserve
6.2 Update DNS Records
Point your domainβs DNS records to the reserved static IP:6.3 Install Nginx Reverse Proxy
6.4 Install SSL Certificate (Recommended)
.env file with HTTPS URLs:
π§ Management & Maintenance
View Logs
Stop Services
Restart Services
Update InsForge
Backup Database
Monitor Resources
π Troubleshooting
Services Wonβt Start
Cannot Connect to Database
Port Already in Use
Out of Memory
Consider upgrading to a larger instance type:SSL Certificate Issues
π Performance Optimization
For Production Workloads
- Upgrade Instance Type: Use
e2-standard-2ore2-standard-4 - Use Cloud SQL: Migrate from containerized PostgreSQL to Google Cloud SQL for better reliability
- Enable Cloud Monitoring: Monitor metrics and set up alerts
- Configure Backups: Set up automated daily backups
- Use Cloud Storage: Configure Google Cloud Storage for file uploads instead of local storage
Database Optimization
π Security Best Practices
- Change Default Passwords: Update admin and database passwords
- Enable Firewall: Use Google Cloud Firewall rules effectively
- Regular Updates: Keep system and Docker images updated
- SSL/TLS: Always use HTTPS in production
- Backup Regularly: Automate database backups
- Monitor Logs: Set up log monitoring and alerts
- Limit SSH Access: Restrict SSH to specific IP addresses
- Use Service Accounts: Instead of API keys where possible
π Support & Resources
- Documentation: https://docs.insforge.dev
- GitHub Issues: https://github.com/insforge/insforge/issues
- Discord Community: https://discord.com/invite/MPxwj5xVvW
π Cost Estimation
Monthly Google Cloud Costs (approximate):| Component | Type | Monthly Cost |
|---|---|---|
| Compute Engine | e2-medium (2 vCPU, 4 GB RAM) | ~$29 |
| Persistent Disk (30 GB) | Standard | ~$3 |
| Network Egress | First 1GB free | Variable |
| Total | ~$32/month |
π‘ Cost Optimization: Use sustained use discounts for 24/7 running instances to save up to 30%. Consider preemptible instances for development/testing environments.
Congratulations! π Your InsForge instance is now running on Google Cloud Compute Engine. You can start building applications by connecting AI agents to your backend platform. For other production deployment strategies, check out our deployment guides.