This comprehensive guide covers deploying Clipron AI to production servers using our automated deployment scripts and manual configuration options.
Production deployment requires system administration expertise. Ensure you understand server security, SSL certificates, and database management before proceeding.
# Database ConfigurationDATABASE_URL=postgresql://clipron:password@localhost/clipron_db# or for SQLite: sqlite:///./clipron.db# Security SettingsSECRET_KEY=your-super-secret-key-min-32-charsALGORITHM=HS256ACCESS_TOKEN_EXPIRE_MINUTES=30# Production SettingsENVIRONMENT=productionDEBUG=falseFRONTEND_URL=https://yourdomain.com# AI API KeysGOOGLE_GEMINI_API_KEY=your_google_gemini_api_keyDEEPSEEK_API_KEY=your_deepseek_api_keyANTHROPIC_API_KEY=your_anthropic_api_keyOPENAI_API_KEY=your_openai_api_key# OAuth ConfigurationGOOGLE_CLIENT_ID=your_google_client_id.apps.googleusercontent.comGOOGLE_CLIENT_SECRET=GOCSPX-your_google_client_secretGITHUB_CLIENT_ID=your_github_client_idGITHUB_CLIENT_SECRET=your_github_client_secret# Stripe ConfigurationSTRIPE_SECRET_KEY=sk_live_your_stripe_secret_keySTRIPE_WEBHOOK_SECRET=whsec_your_webhook_secret# Email Configuration (optional)SMTP_SERVER=smtp.gmail.comSMTP_PORT=587SMTP_USERNAME=[email protected]SMTP_PASSWORD=your_app_password
# Switch to postgres usersudo -u postgres psql# Create database and userCREATE DATABASE clipron_db;CREATE USER clipron WITH PASSWORD 'secure_password';GRANT ALL PRIVILEGES ON DATABASE clipron_db TO clipron;\q# Update pg_hba.conf for local connectionssudo nano /etc/postgresql/13/main/pg_hba.conf# Add: local clipron_db clipron md5# Restart PostgreSQLsudo systemctl restart postgresql
Copy
# SQLite requires no additional setup# Database file will be created automatically# Ensure proper permissions on data directorysudo mkdir -p /opt/clipron/datasudo chown clipron:clipron /opt/clipron/data
[Unit]Description=Clipron AI BackendAfter=network.target[Service]Type=simpleUser=clipronGroup=clipronWorkingDirectory=/opt/clipron/backendEnvironment=PATH=/opt/clipron/backend/venv/binExecStart=/opt/clipron/backend/venv/bin/python main.pyRestart=alwaysRestartSec=3[Install]WantedBy=multi-user.target
# Backup configuration and uploadstar -czf clipron_backup_$(date +%Y%m%d).tar.gz /opt/clipron/backend/.env /opt/clipron/uploads/
3
Automated Backups
Copy
# Add to crontab0 2 * * * /opt/clipron/scripts/backup.sh
Production Tip: Always test your deployment on a staging server first. Use the same configuration and data to ensure everything works correctly before going live.