Overview
This deployment includes:- EC2 Instance: ARM64-based t4g.small instance running Ubuntu 22.04
- EBS Storage: 10GB persistent volume for application data
- Built-in Authentication: Uses Oxy’s native authentication with email/password
- Direct Access: No load balancer required, direct access to EC2 instance
Prerequisites
Before starting, ensure you have:- AWS CLI configured with appropriate permissions
- SSH key pair created in AWS (or create one during setup)
- Basic familiarity with AWS Console and CLI
Step 1: Network Infrastructure Setup
1.1 Create VPC and Subnets
1.2 Create Security Group
1.3 Create SSH Key Pair (if needed)
Step 2: Create Configuration Files
2.1 Create Oxy Configuration
Create a local configuration file that will be copied to the server:2.2 Create Environment Variables File
2.3 Create Setup Script
Step 3: Launch EC2 Instance
3.1 Get Latest Ubuntu ARM64 AMI
3.2 Launch EC2 Instance
3.3 Create and Attach EBS Volume
Step 4: Configure and Start Application
4.1 Get Instance IP and Connect
4.2 Upload Configuration Files
Step 5: Access Your Oxy Instance
5.1 Access the Application
5.2 First-Time Setup
- Open your browser and navigate to
http://$INSTANCE_IP:3000
- You’ll be prompted to create an admin account
- Enter your email and password to create the first user
- The application will send a verification email (if SMTP is configured)
5.3 Authentication Configuration
With built-in authentication, you can configure:- Basic Email/Password: Users register with email and password
- SMTP Integration: For email verification and password reset
- Google OAuth (optional): Add Google authentication alongside basic auth
config.yml
:
Step 6: Monitoring and Maintenance
6.1 Check Service Status
6.2 Application Logs
6.3 Data Backup
Troubleshooting
Common Issues
1. Service fails to start
2. Database connection issues
3. Cannot access application
4. Email authentication not working
Security Best Practices
- Restrict SSH access: Update security group to only allow SSH from your IP
- Use HTTPS: Set up SSL certificate and nginx proxy for production
- Regular updates: Keep the system and Oxy updated
- Backup strategy: Implement automated EBS snapshots
- Monitor logs: Set up log monitoring and alerting
Scaling Up
When you need more features or scale:- Add Load Balancer: Implement ALB for high availability
- Database Migration: Move from DuckDB to PostgreSQL or other production database
- Container Migration: Consider moving to the ECS deployment
- Authentication Upgrade: Add SSO or move to managed authentication
Cleanup
To destroy the infrastructure:Next Steps
- ECS Deployment with Built-in Auth - For container-based scaling
- Production Hardening Guide - Security and performance optimizations
- Monitoring Setup - Comprehensive monitoring and alerting