15 KiB
Oracle Cloud iPad Development Environment - Implementation Plan
Last Updated: 2025-10-25 Status: Ready to Build
What We're Building
A cloud-based development environment accessible from iPad, hosted on Oracle Cloud Free Tier:
- Git Server (Gitea) - Host your knowledge repository with web UI
- VS Code Server (code-server) - Full VS Code in browser with Claude Code extension
- Container Management (CapRover) - One-click deployment platform for additional apps
Architecture
Oracle Cloud Free Tier - ARM VM (4 cores, 24GB RAM)
├── Ubuntu 22.04 LTS (ARM64)
├── Docker Engine
└── CapRover PaaS Platform
├── captain.yourdomain.com → CapRover dashboard
├── git.yourdomain.com → Gitea (Git server)
└── code.yourdomain.com → code-server (VS Code + Claude Code)
Tech Stack
| Component | Technology | Purpose | Resources |
|---|---|---|---|
| Infrastructure | Oracle Cloud (ARM VM) | Free hosting | 4 cores, 24GB RAM, 200GB storage |
| OS | Ubuntu 22.04 LTS ARM64 | Server operating system | ~2GB |
| Container Runtime | Docker Engine | Run containers | Required by CapRover |
| Platform | CapRover | PaaS + app deployment | ~300MB RAM |
| Git Server | Gitea v1.21.1 | Self-hosted GitHub alternative | ~200MB RAM |
| Code Editor | code-server | VS Code in browser | ~500MB RAM |
| AI Assistant | Claude Code extension | AI-powered coding | VS Code extension |
| DNS | Cloudflare | Domain management | Existing domain |
| SSL | Let's Encrypt (via CapRover) | Automatic HTTPS | Free |
Total base resource usage: ~1GB RAM, ~10GB storage Remaining available: ~23GB RAM, ~190GB storage
Implementation Phases
Phase 1: Oracle Cloud Setup (1-2 hours)
Objective: Provision and secure the ARM VM
- Create Oracle Cloud account (if needed)
- Provision ARM VM instance:
- Shape: VM.Standard.A1.Flex
- OCPU: 4
- RAM: 24GB
- Boot volume: 50GB (default)
- Image: Ubuntu 22.04 LTS (ARM64)
- Region: Choose based on availability
- Configure Oracle Security Lists (firewall):
- Allow inbound: 22 (SSH), 80 (HTTP), 443 (HTTPS), 3000 (CapRover initial setup)
- Allow inbound: 996, 7946, 4789, 2377 (CapRover/Docker Swarm)
- Note public IP address
- Set up SSH key authentication
- SSH into VM and verify access
Deliverable: Accessible Ubuntu VM with public IP
Phase 2: Server Foundation (30 minutes)
Objective: Install Docker and prepare for CapRover
# Update system
sudo apt update && sudo apt upgrade -y
# Install Docker Engine
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add user to docker group
sudo usermod -aG docker $USER
newgrp docker
# Verify Docker installation
docker --version
docker run hello-world
# Configure firewall (UFW)
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 3000/tcp
sudo ufw allow 996/tcp
sudo ufw allow 7946/tcp
sudo ufw allow 4789/tcp
sudo ufw allow 2377/tcp
sudo ufw enable
# Enable automatic security updates
sudo apt install unattended-upgrades -y
sudo dpkg-reconfigure -plow unattended-upgrades
Deliverable: VM with Docker installed and firewall configured
Phase 3: DNS Configuration (10 minutes)
Objective: Point domain to Oracle VM
In Cloudflare DNS:
-
Add A record for wildcard subdomain:
- Type:
A - Name:
*(wildcard) or*.oracle(if you want subdomain) - Content:
YOUR_ORACLE_VM_PUBLIC_IP - Proxy status: DNS only (orange cloud OFF)
- TTL: Auto
- Type:
-
Verify DNS propagation:
# From your local machine nslookup captain.yourdomain.com nslookup git.yourdomain.com nslookup code.yourdomain.com
Deliverable: DNS records pointing to Oracle VM
Phase 4: CapRover Installation (15 minutes)
Objective: Install and configure CapRover PaaS platform
# Install CapRover
docker run -p 80:80 -p 443:443 -p 3000:3000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /captain:/captain \
-e ACCEPTED_TERMS=true \
caprover/caprover
# Wait ~2 minutes for CapRover to initialize
# Access CapRover setup wizard
# Open browser: http://YOUR_VM_IP:3000
CapRover Initial Setup Wizard:
- Password: Set a strong password (save it!)
- Root Domain:
yourdomain.com(ororacle.yourdomain.com) - Email: Your email for Let's Encrypt SSL
- Enable HTTPS: ✅ Yes
- Force HTTPS: ✅ Yes
Post-setup:
- Access dashboard at:
https://captain.yourdomain.com - Login with the password you set
- Verify SSL certificate is working
Deliverable: Running CapRover platform with HTTPS
Phase 5: Deploy Gitea (10 minutes)
Objective: Deploy Git server via CapRover one-click app
In CapRover Dashboard:
- Navigate to Apps → One-Click Apps/Databases
- Search for Gitea
- Configure:
- App Name:
git(becomes git.yourdomain.com) - Gitea Version:
1.21.1(default, or latest) - MySQL Version:
8.0.32(default) - MySQL Root Password: Auto-generated (or custom)
- App Name:
- Click Deploy
- Wait ~2 minutes for deployment
Initial Gitea Setup:
- Open
https://git.yourdomain.com - Complete Gitea installation wizard:
- Database Type: MySQL (pre-configured by CapRover)
- Database Host: Auto-configured
- Site Title: "Your Name's Git Server" or similar
- Server Domain:
git.yourdomain.com - SSH Port: 22 (or custom if needed)
- Base URL:
https://git.yourdomain.com/ - Admin Account:
- Username: Your username
- Password: Strong password
- Email: Your email
- Click Install Gitea
- Login with admin account
Create Your Knowledge Repository:
- Click + → New Repository
- Repository name:
knowledge-base(or your preferred name) - Make it private
- Initialize with README
- Create repository
Deliverable: Working Gitea instance with your repository
Phase 6: Deploy code-server (10 minutes)
Objective: Deploy VS Code Server via CapRover one-click app
In CapRover Dashboard:
- Navigate to Apps → One-Click Apps/Databases
- Search for code-server
- Configure:
- App Name:
code(becomes code.yourdomain.com) - Password: Set a strong password for code-server access
- Sudo Password: (Optional) For terminal sudo access
- App Name:
- Click Deploy
- Wait ~2 minutes for deployment
Access code-server:
- Open
https://code.yourdomain.com - Enter the password you set
- You should see VS Code interface in browser!
Deliverable: Working code-server accessible via browser
Phase 7: Configure Development Environment (30 minutes)
Objective: Set up code-server with Claude Code and clone your repo
7.1 Configure Git in code-server:
Open terminal in code-server (Ctrl+` or Terminal menu):
# Set up git identity
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
# Generate SSH key for Gitea
ssh-keygen -t ed25519 -C "your@email.com"
# Press Enter for default location, set passphrase (optional)
# Copy public key
cat ~/.ssh/id_ed25519.pub
Add SSH key to Gitea:
- Copy the public key output
- Go to Gitea (
git.yourdomain.com) - Click your profile → Settings → SSH / GPG Keys
- Click Add Key
- Paste the public key
- Give it a title (e.g., "code-server")
- Click Add Key
7.2 Clone your repository:
In code-server terminal:
# Clone your knowledge repo
cd ~
git clone git@git.yourdomain.com:YOUR_USERNAME/knowledge-base.git
# Open the repository in code-server
code knowledge-base
7.3 Install Claude Code extension:
- Click Extensions icon (left sidebar) or
Ctrl+Shift+X - Search: "Claude Code" or "Anthropic"
- Click Install on the Claude Code extension
- After installation, you'll be prompted to authenticate
- Enter your Anthropic API key or login to Claude Pro
Verify Claude Code is working:
- Open a file in your repository
- Try asking Claude a question about your code
- Test code completion features
7.4 Optional: Install additional extensions:
- Markdown Preview Enhanced
- GitLens
- Any other extensions you use
Deliverable: Fully configured development environment with Claude Code
Phase 8: iPad Setup (5 minutes)
Objective: Install code-server as PWA on iPad for native-like experience
On your iPad:
- Open Safari
- Navigate to
https://code.yourdomain.com - Login with your password
- Tap the Share button (square with arrow)
- Scroll down and tap Add to Home Screen
- Name it "Cloud Code" or "Code Server"
- Tap Add
- Find the app icon on your home screen
- Tap to open (full-screen experience!)
Benefits of PWA mode:
- No Safari UI bars (more screen space)
- Runs like a native app
- Better keyboard integration
- Quick access from home screen/dock
Deliverable: Code-server installed as PWA on iPad
Phase 9: Backup & Security (1 hour)
Objective: Secure the environment and set up backups
9.1 SSH Hardening:
# Change SSH port (optional but recommended)
sudo nano /etc/ssh/sshd_config
# Change: Port 22 → Port 2222
# Set: PasswordAuthentication no
# Set: PermitRootLogin no
sudo systemctl restart sshd
# Update Oracle Security Lists to allow port 2222 instead of 22
# Update UFW: sudo ufw allow 2222/tcp && sudo ufw delete allow 22/tcp
9.2 Configure Backups:
Create backup script:
# Create backup directory
mkdir -p /home/ubuntu/backups
# Create backup script
cat > /home/ubuntu/backup.sh << 'EOF'
#!/bin/bash
BACKUP_DIR="/home/ubuntu/backups"
DATE=$(date +%Y%m%d_%H%M%S)
# Backup Gitea data
docker exec srv-captain--git tar czf /tmp/gitea-backup-${DATE}.tar.gz /data
docker cp srv-captain--git:/tmp/gitea-backup-${DATE}.tar.gz ${BACKUP_DIR}/
# Backup code-server data
docker exec srv-captain--code tar czf /tmp/code-backup-${DATE}.tar.gz /home/coder
docker cp srv-captain--code:/tmp/code-backup-${DATE}.tar.gz ${BACKUP_DIR}/
# Keep only last 7 days of backups
find ${BACKUP_DIR} -name "*.tar.gz" -mtime +7 -delete
echo "Backup completed: ${DATE}"
EOF
chmod +x /home/ubuntu/backup.sh
# Set up cron job (daily at 2 AM)
(crontab -l 2>/dev/null; echo "0 2 * * * /home/ubuntu/backup.sh >> /home/ubuntu/backup.log 2>&1") | crontab -
9.3 Oracle Block Volume Setup (Optional):
If you want persistent storage separate from boot volume:
- Create 100GB block volume in Oracle Cloud console
- Attach to VM instance
- Format and mount:
sudo mkfs.ext4 /dev/sdb sudo mkdir /mnt/data sudo mount /dev/sdb /mnt/data sudo chown ubuntu:ubuntu /mnt/data # Add to fstab for persistence echo "/dev/sdb /mnt/data ext4 defaults 0 0" | sudo tee -a /etc/fstab - Move Docker volumes to block storage:
sudo systemctl stop docker sudo mv /var/lib/docker /mnt/data/docker sudo ln -s /mnt/data/docker /var/lib/docker sudo systemctl start docker
Deliverable: Secured and backed-up environment
Phase 10: Deploy Monitoring (Optional, 15 minutes)
Objective: Monitor your services with Uptime Kuma
In CapRover Dashboard:
- Apps → One-Click Apps/Databases
- Search: Uptime Kuma
- Configure:
- App Name:
uptime
- App Name:
- Deploy
- Access:
https://uptime.yourdomain.com - Create admin account
- Add monitors for:
- Gitea (
https://git.yourdomain.com) - code-server (
https://code.yourdomain.com) - CapRover (
https://captain.yourdomain.com)
- Gitea (
Deliverable: Monitoring dashboard for all services
Final Verification Checklist
- CapRover dashboard accessible at
https://captain.yourdomain.com - Gitea accessible at
https://git.yourdomain.comwith your repository - code-server accessible at
https://code.yourdomain.com - code-server has Claude Code extension installed and working
- Repository cloned in code-server
- Can commit and push from code-server to Gitea
- code-server installed as PWA on iPad
- All services have valid SSL certificates
- SSH hardened (port changed, password auth disabled)
- Backups configured and tested
- (Optional) Monitoring set up
Workflow: Using Your iPad Dev Environment
Daily workflow:
- On iPad: Open "Cloud Code" PWA from home screen
- Edit files: Make changes to your knowledge base
- Use Claude Code: Get AI assistance while coding
- Commit changes:
git add . git commit -m "Update notes on X" git push - View in Gitea: Check
https://git.yourdomain.comto see changes
From any device:
- Access code-server:
https://code.yourdomain.com - Browse repo in web:
https://git.yourdomain.com - Manage apps:
https://captain.yourdomain.com
Troubleshooting
CapRover not accessible:
- Check Oracle Security Lists (firewall rules)
- Check UFW:
sudo ufw status - Check CapRover status:
docker ps
SSL certificate issues:
- Ensure DNS is propagated:
nslookup captain.yourdomain.com - Check Cloudflare proxy is OFF (DNS only)
- Wait 5-10 minutes for Let's Encrypt
code-server can't clone from Gitea:
- Verify SSH key added to Gitea
- Test SSH:
ssh -T git@git.yourdomain.com - Check git config:
git config --list
Claude Code extension not working:
- Verify API key is valid
- Check extension logs in code-server
- Try reinstalling extension
Cost Breakdown
| Item | Cost |
|---|---|
| Oracle Cloud ARM VM | $0 (Free Tier) |
| Oracle Block Storage (200GB) | $0 (Free Tier) |
| Cloudflare DNS | $0 (Free Plan) |
| Domain (if you don't have one) | ~$10-15/year |
| Let's Encrypt SSL | $0 (Free) |
| Total Monthly Cost | $0 |
Maintenance
Weekly:
- Check backups are running:
ls -lh /home/ubuntu/backups - Review service health in Uptime Kuma (if installed)
Monthly:
- Update Docker containers via CapRover
- Review disk space:
df -h - Test backup restoration
As needed:
- Update CapRover: Follow official upgrade guide
- Add new apps via CapRover one-click marketplace
Next Steps After Setup
Additional apps you might want to deploy (all one-click in CapRover):
- Vaultwarden - Self-hosted password manager
- FreshRSS - RSS feed reader
- Nextcloud - File storage and sync
- Bookstack - Documentation wiki
- Plausible - Privacy-friendly analytics
- Miniflux - Minimal RSS reader
- Dokuwiki - Simple wiki
- Jellyfin - Media server
All available via CapRover's one-click apps marketplace!
Success Criteria
You'll know the setup is successful when you can:
- ✅ Open code-server on your iPad (as PWA)
- ✅ Clone and edit your knowledge repository
- ✅ Use Claude Code extension to get AI assistance
- ✅ Commit and push changes back to Gitea
- ✅ Access everything via HTTPS from anywhere
- ✅ Deploy new apps with one click in CapRover
Estimated total setup time: 3-4 hours (including wait times)
Ready to start building? Begin with Phase 1!