hatim-n8n-hub / README.md
hatimc21's picture
Deploy Hatim n8n Automation Hub with crypto alerts
7eb888c
metadata
title: Hatim's n8n Automation Hub
emoji: πŸ€–
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit

πŸ€– Hatim's n8n Automation Hub

A powerful n8n automation platform running on HuggingFace Spaces with pre-configured workflows for crypto alerts, social media automation, and more!

🎯 Why Create Your Own Space?

βœ… Full control - Configure n8n exactly how you want
βœ… No restrictions - All outbound connections work
βœ… Private workflows - Your automations stay private
βœ… Custom configuration - Set your own environment variables
βœ… Always available - Your own dedicated instance
βœ… Free hosting - HuggingFace Spaces is free!


πŸ—οΈ Step-by-Step Setup Guide

Step 1: Create HuggingFace Account

  1. Go to huggingface.co
  2. Sign up for free account
  3. Verify your email

Step 2: Create New Space

  1. Go to huggingface.co/new-space
  2. Space name: private-n8n (or whatever you prefer)
  3. License: MIT
  4. SDK: Docker
  5. Hardware: CPU basic (free)
  6. Visibility: Private (recommended)
  7. Click "Create Space"

Step 3: Upload Files

  1. Upload the Dockerfile from this folder
  2. Create a workflows folder in your space
  3. Upload your crypto alert workflows to the workflows folder

Step 4: Configure Environment Variables

In your HuggingFace Space settings, add these environment variables:

N8N_HOST=0.0.0.0
N8N_PORT=7860
N8N_PROTOCOL=http
N8N_DISABLE_UI=false
N8N_BASIC_AUTH_ACTIVE=false
TELEGRAM_BOT_TOKEN=8270791217:AAEuM2vGgx44-wGV_s2UO_32Cfmp9kN4gKY
TELEGRAM_CHANNEL_ID=@nokyccryptoalerts

Step 5: Build and Deploy

  1. HuggingFace will automatically build your Docker container
  2. Wait 2-5 minutes for build to complete
  3. Your private n8n instance will be available at: https://huggingface.co/spaces/YOUR-USERNAME/private-n8n

πŸ”§ Configuration Options

Environment Variables You Can Set:

# Basic Configuration
N8N_HOST=0.0.0.0
N8N_PORT=7860
N8N_PROTOCOL=http

# Security (optional)
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=your-secure-password

# Telegram Configuration
TELEGRAM_BOT_TOKEN=your-bot-token
TELEGRAM_CHANNEL_ID=@your-channel

# Other APIs
COINGECKO_API_KEY=your-key-if-you-have-one

πŸ’° Pre-configured Workflows

Included Workflows:

  1. Crypto Price Alerts - Monitor BTC, ETH, ADA, SOL, DOGE
  2. Telegram Notifications - Send alerts to your channel
  3. Affiliate Link Integration - Monetize your alerts
  4. Error Handling - Robust error management

Workflow Features:

  • βœ… 15-minute intervals - Regular price checking
  • βœ… Smart filtering - Only significant moves (3%+)
  • βœ… Affiliate integration - Multiple revenue streams
  • βœ… Professional formatting - Engaging alert messages

πŸš€ Advantages of Your Own Space

vs Shared Spaces:

  • ❌ Shared: Network restrictions, rate limits, instability
  • βœ… Private: Full internet access, your own resources, reliable

vs Local Installation:

  • ❌ Local: Requires your computer running 24/7, internet issues
  • βœ… HuggingFace: Always online, cloud infrastructure, free hosting

vs Paid Services:

  • ❌ Paid: Monthly costs ($10-50/month), vendor lock-in
  • βœ… HuggingFace: Completely free, portable, open source

πŸ› οΈ Customization Guide

Adding New Workflows:

  1. Create workflow in n8n interface
  2. Export as JSON
  3. Upload to workflows/ folder in your space
  4. Restart container (automatic)

Adding Custom Nodes:

Edit the Dockerfile to install custom n8n nodes:

RUN npm install n8n-nodes-custom-package

Database Persistence:

For production use, configure external database:

DB_TYPE=postgresdb
DB_POSTGRESDB_HOST=your-db-host
DB_POSTGRESDB_DATABASE=n8n
DB_POSTGRESDB_USER=n8n
DB_POSTGRESDB_PASSWORD=your-password

πŸ”’ Security Best Practices

Enable Basic Authentication:

N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=your-username
N8N_BASIC_AUTH_PASSWORD=strong-password-123

Use Environment Variables:

  • βœ… Store sensitive data in HuggingFace Space settings
  • ❌ Never hardcode API keys in workflows
  • βœ… Use {{$env.VARIABLE_NAME}} in workflows

Network Security:

  • βœ… Keep your space private
  • βœ… Use HTTPS URLs only
  • βœ… Regularly update your Docker image

πŸ“Š Monitoring and Maintenance

Health Checks:

The Dockerfile includes automatic health checks:

curl -f http://localhost:7860/healthz

Logs Access:

View logs in your HuggingFace Space:

  1. Go to your space
  2. Click "Logs" tab
  3. Monitor workflow execution

Backup Strategy:

  1. Export workflows regularly from n8n interface
  2. Save to GitHub or local backup
  3. Document your configurations in README files

🚨 Troubleshooting

Common Issues:

Space won't start:

  • Check Dockerfile syntax
  • Verify all files uploaded correctly
  • Review build logs in HuggingFace

Workflows not loading:

  • Ensure workflows folder exists
  • Check JSON format of workflow files
  • Verify file permissions

Telegram not working:

  • Verify bot token in environment variables
  • Check channel permissions
  • Test with simple HTTP request workflow

Performance issues:

  • Monitor resource usage in space logs
  • Consider upgrading to CPU optimized hardware
  • Optimize workflow execution frequency

πŸ’‘ Pro Tips

Optimization:

  • Use webhook triggers instead of polling when possible
  • Cache API responses to reduce external calls
  • Implement error handling and retries

Scaling:

  • Start with free tier, upgrade if needed
  • Monitor usage patterns
  • Consider multiple spaces for different workflows

Monetization:

  • Keep affiliate links updated
  • Track performance metrics
  • A/B test different message formats

πŸš€ Next Steps

  1. Create your HuggingFace Space using this guide
  2. Upload the provided files
  3. Configure your environment variables
  4. Test the crypto alert workflows
  5. Start earning with affiliate links!

Your private n8n instance will be running 24/7, monitoring crypto prices and sending monetized alerts to your Telegram channel - completely free on HuggingFace Spaces!

Ready to create your own private n8n automation empire? πŸš€