π Advanced Features Guide¶
This guide covers security, isolated networks, deployment, debugging, auto-scaling, and how to use EasyPanel MCP with Antigravity IDE and other AI-powered development tools.
π Security Features¶
Available Security Tools¶
EasyPanel MCP provides the following security-related capabilities:
| Feature | Status | Description |
|---|---|---|
| API Key Authentication | β Available | Secure Bearer token authentication |
| Email/Password Auth | β Available | Alternative authentication method |
| Session Management | β Available | Automatic session token handling |
| SSL/TLS Verification | β Available | Configurable SSL verification |
| Internal Networks | β οΈ Via Service Config | Isolated networks via service configuration |
| Basic Auth | β Available | HTTP basic auth for services |
| Domain Management | β Available | Custom domain configuration |
| Port Exposure Control | β Available | Manage exposed ports |
Security Best Practices¶
1. Use API Keys (Recommended)¶
# Generate API key in EasyPanel Dashboard
# Settings β API Keys β Create New Key
# Use in .env
EASYPANEL_API_KEY=ep_live_xxxxxxxxxxxxx
Advantages: - More secure than password - Can be rotated easily - Can be revoked without changing password - No plaintext password storage
2. Isolated Networks (Internal Services)¶
EasyPanel manages networks automatically. To create isolated services:
// Ask your AI agent:
"Create a PostgreSQL service in an isolated network"
// The AI will configure:
{
"name": "postgres-db",
"projectId": "your-project",
"sourceImage": "postgres:15",
"internal": true // β Isolated from internet
}
What happens: - EasyPanel creates an internal Docker network - Service is only accessible by other services in the same network - No public exposure
3. Environment Variables Security¶
# Ask AI to set sensitive env vars:
"Set DATABASE_URL environment variable for my-api service"
// The AI will use:
services.app.updateEnv with encrypted values
4. Port Management¶
Control which ports are exposed:
// Ask your AI:
"Expose port 8080 for my-api service but keep database internal"
// Configuration:
{
"ports": [
{"public": 80, "private": 8080, "protocol": "http"}
]
}
π Isolated Networks¶
How EasyPanel Handles Networks¶
EasyPanel automatically manages Docker networks. You don't need to create networks manually.
Network Types:
| Type | Description | Use Case |
|---|---|---|
| Public Network | Services accessible from internet | Web apps, APIs |
| Internal Network | Services only accessible internally | Databases, caches |
| Project Network | Services within same project can communicate | Microservices |
Creating Isolated Services¶
Method 1: Ask Your AI Agent¶
User: "Create a Redis database that's only accessible internally"
AI: π¦ Creating Redis service...
π Configuring internal network...
β
Service 'redis-cache' created (internal only)
π Not exposed to internet
Method 2: Manual Configuration¶
{
"name": "redis-internal",
"projectId": "proj_xxx",
"sourceImage": "redis:7",
"env": {
"REDIS_PASSWORD": "secure_password"
},
"ports": [], // β No public ports = internal only
"internal": true
}
Service-to-Service Communication¶
Services in the same project can communicate automatically:
βββββββββββββββ ββββββββββββββββ
β API App β βββββββΊ β PostgreSQL β
β (Public) β Internalβ (Private) β
βββββββββββββββ Networkββββββββββββββββ
Example:
# API can connect to database via:
DATABASE_URL=postgres://user:pass@postgres-db:5432/mydb
# But database is NOT accessible from internet
π Deployment Features¶
Available Deployment Tools¶
| Tool | Description | Example |
|---|---|---|
create_service |
Create and deploy a service | Deploy Docker image |
deploy_service |
Redeploy existing service | Apply new configuration |
update_source_image |
Update Docker image | Deploy new version |
update_source_github |
Connect GitHub repo | Auto-deploy from Git |
update_source_git |
Connect Git repository | Deploy from Git URL |
update_env |
Update environment variables | Change config |
update_resources |
Update CPU/Memory | Scale resources |
restart_service |
Restart service | Apply changes |
start_service / stop_service |
Control service state | Maintenance mode |
Deployment Methods¶
1. Docker Image Deployment¶
User: "Deploy nginx latest version in my project"
AI: π Deploying nginx:latest...
β
Service created
π Available at: https://nginx.your-domain.com
2. GitHub Deployment¶
User: "Deploy my GitHub repository myuser/myapp"
AI: π Connecting to GitHub...
π¦ Cloning repository...
ποΈ Building from Dockerfile...
β
Deployed successfully!
3. Git URL Deployment¶
User: "Deploy from https://gitlab.com/user/repo.git"
AI: π₯ Fetching from GitLab...
π¨ Building...
β
Deployment complete!
Deployment Workflow¶
1. Create Service
β
2. Configure Source (Image/Git/GitHub)
β
3. Set Environment Variables
β
4. Configure Ports
β
5. Deploy
β
6. Monitor Logs
π Debugging Features¶
Available Debugging Tools¶
| Tool | Description | Usage |
|---|---|---|
get_service_logs |
Get service logs | Debug issues |
inspect_service |
Get service details | View configuration |
get_system_stats |
System monitoring | Check resources |
get_service_stats |
Service metrics | Performance data |
Debugging with AI¶
Example 1: Service Not Starting¶
User: "My API service won't start, what's wrong?"
AI: π Inspecting service...
π Checking logs...
β Error found:
- Port 3000 already in use
- Another service is using this port
π‘ Solution:
Would you like me to:
1. Change the port to 3001?
2. Stop the conflicting service?
Example 2: Database Connection Failed¶
User: "My app can't connect to the database"
AI: π Checking configuration...
π Testing connection...
β Error: Connection refused
π Root cause: DATABASE_URL is incorrect
Current: postgres://localhost:5432/db
Should be: postgres://postgres-db:5432/db
π‘ Fix: Update DATABASE_URL environment variable?
Example 3: High Memory Usage¶
User: "Is my service running okay?"
AI: π Checking system stats...
β οΈ Warning detected:
- Memory usage: 95% (1.9GB / 2GB)
- CPU usage: 45%
π‘ Recommendations:
1. Increase memory limit to 4GB
2. Check for memory leaks
3. Enable horizontal scaling
Would you like me to increase resources?
Log Analysis¶
User: "Show me the last 100 lines of logs for my-api"
AI: π Retrieving logs...
2026-03-14 10:30:15 INFO Starting API server...
2026-03-14 10:30:16 INFO Connected to database
2026-03-14 10:30:17 INFO Server listening on port 8080
2026-03-14 10:31:00 ERROR Request timeout for /api/users
2026-03-14 10:31:01 WARN High latency detected
π Analysis:
- 2 errors in last hour
- Timeout issues on /api/users endpoint
- Possible database performance issue
π Auto-Scaling Features¶
Scaling Options in EasyPanel¶
| Type | Description | Status |
|---|---|---|
| Vertical Scaling | Increase CPU/Memory | β Available |
| Horizontal Scaling | Multiple replicas | β οΈ Via Service Config |
| Auto-Scaling | Scale based on metrics | β οΈ Manual trigger |
Vertical Scaling (Resources)¶
User: "My service needs more resources, scale it up"
AI: π Current resources:
- CPU: 1 core
- Memory: 2GB
π Scaling up to:
- CPU: 2 cores
- Memory: 4GB
β
Resources updated!
π Service restarting with new limits...
Horizontal Scaling (Replicas)¶
User: "I need 3 replicas of my-api service"
AI: π Current replicas: 1
π Scaling to: 3 replicas
β
Replica 1: Running
β
Replica 2: Running
β
Replica 3: Running
π Load balancer configured
Monitoring-Based Scaling¶
User: "Check if my service needs scaling"
AI: π Analyzing metrics...
Current usage (last 24h):
- CPU: 85% average, 95% peak
- Memory: 78% average, 92% peak
- Requests: 1000/min average
β οΈ Recommendation: Scale up
Proposed configuration:
- CPU: 2 β 4 cores
- Memory: 4GB β 8GB
Proceed with scaling?
Manual Auto-Scaling Script¶
You can create automation scripts:
# Example: Check and scale based on CPU usage
async def auto_scale():
stats = await client.get_system_stats()
cpu_usage = stats['cpuInfo']['usedPercentage']
if cpu_usage > 80:
print("β οΈ High CPU usage, scaling up...")
await client.update_service(service_id, {
"cpu": current_cpu * 2
})
π οΈ Antigravity IDE Integration¶
What is Antigravity IDE?¶
Antigravity (also known as Cursor or similar AI-powered IDEs) is an AI-first code editor that can integrate with MCP servers to provide context-aware assistance.
Can You Use EasyPanel MCP in Antigravity?¶
Yes! If Antigravity supports MCP (like Cursor, Cline, and other AI IDEs), you can use EasyPanel MCP.
Configuration for Antigravity/Cursor¶
Step 1: Find Config File¶
# macOS
~/Library/Application Support/Cursor/User/settings.json
# Windows
%APPDATA%\Cursor\User\settings.json
# Linux
~/.config/Cursor/User/settings.json
Step 2: Add MCP Configuration¶
{
"mcpServers": {
"easypanel": {
"command": "python",
"args": ["/absolute/path/to/easypanel-mcp/src/server.py"],
"cwd": "/absolute/path/to/easypanel-mcp",
"env": {
"EASYPANEL_URL": "https://your-easypanel.com",
"EASYPANEL_API_KEY": "ep_live_xxxxxxxxxxxxx"
}
}
}
}
Step 3: Reload IDE¶
- Press
Ctrl+Shift+P(orCmd+Shift+Pon macOS) - Type "Reload Window"
- Press Enter
Using EasyPanel MCP in Antigravity¶
Example Workflow: Fix and Deploy¶
User: "My production service is failing, check the logs and fix it"
AI (in Antigravity):
π Connecting to EasyPanel...
π Retrieving logs for 'production-api'...
Analysis:
- Error: OutOfMemoryException
- Memory limit: 2GB
- Current usage: 1.98GB
π‘ Solution found:
1. Increase memory to 4GB
2. Deploy updated version
Proceeding with fix...
β
Memory updated: 2GB β 4GB
π Service redeployed
β
Service is now healthy!
Example: GitHub Fix and Deploy¶
User: "Fix the bug in my GitHub repo and deploy"
AI:
π₯ Cloning repository...
π Analyzing code...
π Bug found: Missing error handling in api/users.js
Fixing...
β
Applied fix: Added try-catch block
π Committing changes...
π Deploying to production...
β
Deployment successful!
π§ Solving Problems & Deploying to GitHub¶
Workflow: Fix Problem β Commit β Deploy¶
Scenario: Production Bug¶
1. User reports issue
β
2. AI checks logs via MCP
β
3. AI identifies root cause
β
4. AI fixes code (in IDE)
β
5. AI commits to GitHub
β
6. AI deploys via MCP
β
7. Issue resolved!
Example: Complete Fix Flow¶
User: "Users can't login, fix it and deploy"
AI (using MCP + Git):
π Checking service logs...
β Error found: Authentication service returning 500
π₯ Cloning repository...
π Analyzing auth.js...
π Bug found: Missing environment variable
π» Applying fix...
β
Added missing env check
β
Committed: "fix: Add missing env validation in auth"
π Deploying to production...
β
Build successful
β
Deployment complete
π§ͺ Testing login...
β
Login working!
Summary:
- Root cause: Missing env validation
- Fix: Added validation + error handling
- Deployed: v1.2.3
- Status: β
Resolved
GitHub Integration Setup¶
To enable GitHub deployments:
User: "Connect my GitHub repository"
AI:
π Connecting to GitHub...
π Repository: youruser/yourapp
π Generating deploy key...
β
GitHub connected!
Configuration:
- Branch: main
- Auto-deploy: Enabled
- Build command: docker build
π Feature Availability Summary¶
| Feature | Available | Notes |
|---|---|---|
| API Key Auth | β Yes | Recommended method |
| Email/Password Auth | β Yes | Alternative |
| Isolated Networks | β Yes | Via service config |
| Service Deployment | β Yes | Multiple methods |
| GitHub Deploy | β Yes | Via services.app.updateSourceGithub |
| Git Deploy | β Yes | Via services.app.updateSourceGit |
| Docker Image Deploy | β Yes | Via services.app.updateSourceImage |
| Log Retrieval | β οΈ Limited | Via service inspection |
| System Monitoring | β Yes | Full stats available |
| Resource Scaling | β Yes | CPU/Memory |
| Horizontal Scaling | β οΈ Via Config | Service configuration |
| Auto-Scaling | β οΈ Manual | Script-based |
| Domain Management | β Yes | Custom domains |
| Port Management | β Yes | Expose/hide ports |
| Environment Variables | β Yes | Secure management |
| Basic Auth | β Yes | HTTP auth |
| Service Restart | β Yes | Instant restart |
| Service Start/Stop | β Yes | Control state |
π Troubleshooting¶
Feature Not Available¶
Problem: AI says a feature is not available
Solution: 1. Check if EasyPanel supports it natively 2. Some features require specific EasyPanel plans 3. Verify API permissions
Network Isolation Not Working¶
Problem: Services are still accessible from internet
Solution: 1. Ensure no public ports are configured 2. Check service configuration 3. Verify project network settings
Deployment Fails¶
Problem: Service won't deploy
Common causes: - Invalid Docker image - Missing environment variables - Resource limits exceeded - Network configuration error
Solution:
User: "Deployment failed, check why"
AI: π Analyzing deployment...
β Error: Image not found
π‘ Fix: Update image name to 'nginx:latest'
π Related Documentation¶
- AI Agents Integration - Connect with Claude, Cursor, etc.
- Configuration Guide - Setup and configuration
- Tools Reference - Available MCP tools
- Security Guide - Security best practices
π Master advanced EasyPanel MCP features! Deploy, scale, and debug with AI assistance.