Easily create Oracle Cloud Infrastructure Always Free instances from Discord!
๐ Quick Start โข ๐ Usage โข ๐ง Advanced Setup โข ๐ค Contributing
English | ํ๊ตญ์ด
# Example usage in Discord channel
/status # Check bot status and instance overview
/launch # Instantly create Always Free instance
/log count:5 # View last 5 execution logs
/config # Check current configurationโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐งโโ๏ธ OCI Always Free Discord Bot โ
โ Setup Wizard โ
โ Oracle Cloud Infrastructure Always Free Instance Auto Creator โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โน๏ธ [12:34:56] ๐ฏ Always Free Optimized: E2.1.Micro (2x), A1.Flex (4 OCPU, 24GB)
โน๏ธ [12:34:56] ๐ค Discord Integration: Slash commands, Real-time monitoring
โน๏ธ [12:34:56] ๐ง Full Automation: Auto-detect config, Real-time validation๐ Always Free Usage:
โข Shape: VM.Standard.A1.Flex
โข Specs: 2 OCPU, 12GB RAM
โข A1 Total Limit: 2/4 OCPU, 12/24GB RAM
โข Remaining Resources: 2 OCPU, 12GB RAM
โข Boot Volume: 100/200GB (Free)Oracle Cloud Always Free provides powerful cloud infrastructure at no cost forever - perfect for developers, students, and small projects!
|
|
๐ฏ A1.Flex (ARM) - High Performance Applications
# Minecraft Server (Recommended: 2 OCPU, 8GB)
Shape: VM.Standard.A1.Flex
Config: 2 OCPU, 8GB RAM
Players: ~10-20 concurrent
Performance: Excellent for modded servers# Full Development Stack
Shape: VM.Standard.A1.Flex
Config: 4 OCPU, 24GB RAM
Stack: Docker, Kubernetes, CI/CD
Perfect for: Team development, microservices# Machine Learning Training
Config: 4 OCPU, 24GB RAM
Frameworks: TensorFlow, PyTorch
Use: Model training, data processingโก E2.1.Micro (AMD) - Lightweight Services
- Personal websites & blogs
- REST APIs & microservices
- Discord/Telegram bots
- Monitoring services
- Small databases (PostgreSQL, MySQL)
- Redis cache servers
- Message queues
- Log aggregators
| Feature | Always Free | Paid Plans |
|---|---|---|
| Cost | $0/month forever | Pay-as-you-use |
| Performance | Production-ready | Scalable |
| Duration | No time limit | Flexible |
| Support | Community | Professional |
๐ก Pro Tip: Always Free is perfect for learning, development, and small production workloads. Scale to paid plans when you need more resources!
|
|
|
|
๐ฏ Always Free Optimization
- Shape Auto-filtering: Shows only E2.1.Micro, A1.Flex
- Real-time limit check: Auto-calculate OCPU/RAM usage
- Billing protection: Warns when exceeding Always Free limits
- Usage dashboard: Real-time display of remaining resources
๐ค Discord Bot Commands
| Command | Function | Example |
|---|---|---|
/status |
Bot status and instance overview | Uptime, success rate, recent activity |
/launch |
Instant instance creation | Auto-select Always Free Shape |
/log |
View recent execution logs | Success/failure history, error diagnosis |
/config |
Check configuration info | Current Shape, region, specs |
/help |
All commands guide | Usage and tips |
๐ง Smart Setup Wizard
- Auto environment detection: Auto-load existing OCI config files
- Real-time API validation: Real-time query of available Shape/Image
- Custom spec configuration: Auto-validate OCPU/RAM combinations
- Intuitive UI: User-friendly interface
|
|
|
# ๐ Generate API key pair
mkdir -p ~/.oci
openssl genrsa -out ~/.oci/oci_api_key.pem 2048
openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem
chmod 600 ~/.oci/oci_api_key.pem
# ๐ Copy public key content (for OCI Console registration)
cat ~/.oci/oci_api_key_public.pem๐ OCI Console Registration Path
Identity & SecurityโUsersโYour AccountโAPI KeysโAdd API Key
# ๐ Install OCI CLI (automatic)
bash -c "$(curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh)"
# ๐ Interactive setup (recommended)
oci setup config
# ๐ Verify configuration
oci iam region list --output table# ๐ฅ Download scripts
git clone https://github.com/CorelLinux/oci-simple-script.git
cd oci-simple-script
# ๐งโโ๏ธ Run setup wizard
bash oci-config-wizard.sh๐ Once all setup is complete, config.json will be auto-generated!
# ๐ค Start bot
bash oci-script-and-bot.sh
# ๐ Check status
pm2 status
pm2 logs oci-discord-bot| Command | Icon | Description | Result |
|---|---|---|---|
/status |
๐ | Check bot status | Uptime, success rate, recent activity |
/launch |
๐ | Create instance | Auto-select Always Free Shape |
/log |
๐ | View logs | Recent N execution history |
/config |
โ๏ธ | Check configuration | Current Shape, region, specs |
/stop |
โน๏ธ | Stop auto creation | Pause bot |
/start |
Restart auto creation | Resume bot | |
/schedule |
โฐ | Set creation interval | 3-60 minutes (default: 5 min) |
/stats |
๐ | Detailed statistics | Success rate, period analysis |
/instances |
๐ฅ๏ธ | List instances | Running/stopped instance overview |
/resources |
๐ฐ | Resource usage | Always Free limits and usage |
/alert |
๐ | Notification settings | Configure alerts |
/help |
โ | Help | All commands guide |
# ๐ Check current instances
oci compute instance list --compartment-id $COMPARTMENT_ID --output table
# ๐ Check A1.Flex usage
oci limits resource-availability get --compartment-id $COMPARTMENT_ID \
--service-name compute --limit-name vm-standard-a1-core-count| Feature | Description | Benefit |
|---|---|---|
| ๐ฏ Smart Interval | Default 5-minute attempts | Faster instance acquisition |
| โ๏ธ Flexible Timing | 3-60 minute range via /schedule |
Customizable based on demand |
| ๐ Multi-language | English/Korean support | Better accessibility |
| ๐ง Error Recovery | Improved command error handling | More stable operation |
| ๐ Enhanced Stats | Detailed success rate analysis | Better monitoring |
๐ก Pro Tip: Use
/schedule 3during high-demand periods and/schedule 30during low-demand periods to optimize success rates.
๐ก Shape Selection Guide
| Shape | OCPU | RAM | Instances | Use Case | Notes |
|---|---|---|---|---|---|
| E2.1.Micro | 1 | 1GB | 2 | Lightweight web servers, bots | AMD-based |
| A1.Flex | 1-4 | 6-24GB | 1-4 | Development servers, learning | ARM-based |
๐ฐ Cost Calculator:
- E2.1.Micro: Free (up to 2)
- A1.Flex: Total 4 OCPU, 24GB RAM free
- Boot Volume: 200GB free
๐ง Custom SSH Keys
# ๐ Use existing SSH keys
export CUSTOM_PRIVATE_KEY_PATH="/path/to/your/private_key"
export CUSTOM_PUBLIC_KEY_PATH="/path/to/your/public_key.pub"
# ๐ Generate new SSH keys
ssh-keygen -t rsa -b 2048 -f ~/.ssh/oci_key -N ""
export CUSTOM_PRIVATE_KEY_PATH="$HOME/.ssh/oci_key"
export CUSTOM_PUBLIC_KEY_PATH="$HOME/.ssh/oci_key.pub"๐ Language Configuration
The bot supports both English and Korean interfaces. Configure in config.json:
{
"LANGUAGE": "en", // "en" for English, "ko" for Korean
// ... other config options
}Language Features:
- ๐ฏ Discord command descriptions in chosen language
- ๐ Bot response messages in chosen language
- ๐ง Error messages and help text localized
- ๐ Seamless switching - just edit config and restart
Change Language:
# Edit config.json
nano config.json
# Change "LANGUAGE": "ko" to "LANGUAGE": "en"
# Restart bot
pm2 restart oci-discord-bot๐จ Common Issues
# ๐ Check installation
oci --version
# ๐ง Check PATH configuration
echo $PATH | grep -o "$HOME/bin"
# ๐ Reinstall
curl -L https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh | bashWhen OCI CLI is installed via symlink in user path, it may not be accessible with sudo.
# ๐ Check OCI CLI installation location
which oci
# Result: /home/user/bin/oci
# ๐ง Create symlink in system path
sudo ln -s $(which oci) /usr/local/bin/oci
# โ
Verify sudo access
sudo oci --versionAutomatic Solution:
# Script handles this automatically, but manual setup is also possible
sudo ln -s $HOME/bin/oci /usr/local/bin/oci
sudo ln -s $HOME/.local/bin/oci /usr/local/bin/oci
sudo ln -s $HOME/lib/oracle-cli/bin/oci /usr/local/bin/oci# ๐ Check and fix permissions
ls -la ~/.oci/
chmod 600 ~/.oci/oci_api_key.pem
chmod 644 ~/.oci/oci_api_key_public.pem
# ๐ Validate key
oci iam region list --auth api_key# ๐ Check token
grep -o "discord_token" config.json
# ๐ง Reset token
bash oci-config-wizard.sh
# Re-run Discord configuration section only- ๐ Try different regions:
ap-tokyo-1,ap-mumbai-1 - โฐ Change time zone: Recommended during early morning hours
- ๐ฏ Change Shape: E2.1.Micro โ A1.Flex
๐ Status Check Commands
# ๐ค Bot status
pm2 status
pm2 logs oci-discord-bot --lines 50
# ๐ Instance list
oci compute instance list --compartment-id $COMPARTMENT_ID --output table
# ๐ฐ Always Free usage
oci limits resource-availability get \
--compartment-id $COMPARTMENT_ID \
--service-name compute \
--limit-name vm-standard-a1-core-count๐ง Configuration File Check
# ๐ OCI configuration
cat ~/.oci/config
# ๐ Bot configuration
cat config.json | jq .
# ๐ Log file
tail -f oci_bot.log| Category | Link | Description |
|---|---|---|
| ๐๏ธ Official | Oracle Cloud Console | OCI Management Console |
| ๐ Documentation | OCI CLI Guide | Official Installation Guide |
| ๐ค Bot | Discord Developer | Bot Creation and Management |
| ๐ก Tips | Out of Capacity Solution | Capacity shortage solution |
- OCI Basics: Getting Started with Oracle Cloud Infrastructure
- Discord.js: Official Guide
- PM2: Process Management Guide
|
๐ Bug Reports |
๐ก Feature Requests |
๐ง Code Contributions |
- ๐ด Fork this repository to your account
- ๐ฟ Branch Create a new feature branch
- ๐ป Code Write improvements and test
- ๐ Commit Write clear commit messages
- ๐ PR Create Pull Request