Platform modern untuk generate akun premium dengan sistem coin. Dapatkan akun Netflix, Spotify, Canva, Disney+, VPN dan Steam dengan mudah, cepat, dan terpercaya!
- Quick Start
- Features
- Installation
- User Migration
- Backup & Restore
- SSL Configuration
- Telegram Bot
- Project Structure
- Configuration
- Troubleshooting
# 1. Clone repository
git clone https://github.com/imnoob59/freeakun.git
cd freeakun
# 2. Run installation script
chmod +x install.sh
sudo ./install.sh
# 3. Access app
http://localhost:5000
# Default Login:
Admin: admin / admin123
User: user1 / user123- Multi Account Types: Netflix, Spotify, Canva, Disney+, VPN, Steam
- Coin System: Pricing transparan dengan multiple packages
- QRIS Payment: Dynamic QRIS dengan unique code auto-verification
- Real-time Status: Auto-update payment status setiap 5 detik
- Auto-expire: Transaksi otomatis expire dalam 5 menit
- Generation History: Track semua akun yang pernah di-generate
- Referral System: Dapatkan bonus coin dari referral
- Daily Check-in: Bonus coin harian untuk user aktif
- Profile Management: Update profile & verifikasi Telegram
- Dashboard Analytics: Statistik user, revenue, dan transaksi
- User Management: CRUD operations untuk semua user
- Account Type Management: Kelola jenis akun dengan image upload
- Coin Package Management: Atur paket coin dan pricing
- Top-up Approval: Review & approve payment requests
- System Settings: Feature toggles dan konfigurasi sistem
- Telegram Notifications: Notifikasi real-time untuk topup requests
- Clear History: Bulk delete generation logs
- QRIS Dynamic: Menggunakan ISO/IEC 13239 CRC-16 checksum
- Unique Code: 3-digit code unik untuk auto-verification
- Countdown Timer: 5 menit dengan visual countdown
- Auto-expire: Otomatis expire dan redirect ke dashboard
- Real-time Polling: Check status setiap 5 detik
- Payment Upload: Upload bukti pembayaran dengan preview
- Professional Design: TailwindCSS dengan gradient modern
- Responsive: Mobile-first design untuk semua device
- Smooth Animations: Transitions & micro-interactions
- Modern Branding: Custom favicon & logo
- WhatsApp Channel: Popup untuk channel official
- Dark Mode Ready: Siap untuk dark mode implementation
- Meta Tags: Complete description, keywords, OG, Twitter cards
- Structured Data: JSON-LD untuk rich snippets
- Sitemap.xml: Auto-generated sitemap
- Robots.txt: SEO-friendly crawling rules
- PWA Ready: Manifest.json untuk progressive web app
- Social Preview: Custom OG images untuk social media
- User Verification: Link Telegram account untuk notifikasi
- Admin Notifications: Real-time alert saat ada topup request
- Inline Approval: Approve/reject langsung dari Telegram
- User Notifications: Auto-notify user saat topup approved/rejected
- Bot Commands:
/start,/verify,/helpcommands
- Backend: Flask 3.0, SQLAlchemy ORM, Flask-Login
- Database: PostgreSQL 15
- Frontend: TailwindCSS 3.0, Alpine.js, FontAwesome 6.4
- Payment: QRIS Dynamic Generation (CRC-16)
- Bot: python-telegram-bot 20.0
- Deploy: Docker + Docker Compose
- Server: Nginx (reverse proxy), Let's Encrypt (SSL)
freeakun/
βββ app/
β βββ admin/ # Admin routes & forms
β β βββ routes.py # Admin CRUD operations
β β βββ forms.py # WTForms for admin
β βββ auth/ # Authentication
β β βββ routes.py # Login/register/logout
β β βββ forms.py # Login & register forms
β βββ user/ # User dashboard
β β βββ routes.py # Generate, topup, profile
β βββ telegram_bot/ # Telegram integration
β β βββ routes.py # Bot commands & notifications
β βββ utils/ # Utilities
β β βββ qris.py # QRIS generator
β βββ static/ # Static assets
β β βββ css/
β β βββ images/
β β βββ sounds/ # Notification sounds
β β βββ uploads/ # User uploads (QRIS, payments)
β βββ templates/ # Jinja2 templates
β β βββ admin/ # Admin templates
β β βββ auth/ # Login/register
β β βββ user/ # User dashboard templates
β βββ models.py # SQLAlchemy models
βββ backups/ # Auto backups (gitignored)
βββ migrations/ # Database migrations
βββ docker-compose.yml # Container orchestration
βββ Dockerfile # Python app container
βββ requirements.txt # Python dependencies
βββ config.py # App configuration
βββ run.py # Application entry point
βββ seed.py # Database seeder
β
βββ install.sh # Auto installation script
βββ backup-database.sh # Database backup
βββ export-users.sh # Export users only
βββ import-users.sh # Import users
βββ check-system.sh # System check
βββ migrate-to-new-server.sh # Full migration
βββ README.md # This file
Minimum:
- OS: Ubuntu 20.04+ / Debian 11+ / CentOS 8+
- RAM: 2GB (4GB recommended)
- Storage: 20GB minimum
- CPU: 2 cores minimum
- Ports: 5000, 80, 443 available
# Update system
sudo apt update && sudo apt upgrade -y
# Create project directory
sudo mkdir -p /opt/freeakun
cd /opt/freeakunOption A - From Git:
git clone https://github.com/imnoob59/freeakun.git .Option B - From ZIP:
# Upload via SCP
scp -r freeakun.zip user@server:/tmp/
# Extract on server
cd /opt/freeakun
unzip /tmp/freeakun.zip# Make scripts executable
chmod +x *.sh
# Check system requirements
./check-system.sh
# Run installation (10-15 minutes)
sudo ./install.shInstallation script will:
- β Install Docker & Docker Compose
- β Setup environment variables
- β Build containers
- β Initialize database with seed data
- β Configure firewall (optional)
- β Display login credentials
# Run verification script
./verify-installation.shThis will check:
- β Docker & Docker Compose installed
- β Containers running
- β Database ready
- β Web app responding
- β Admin user created
- β Required directories exist
URL: http://YOUR_SERVER_IP:5000
Admin Login:
- Username: admin
- Password: admin123
User Login:
- Username: user1
- Password: user123
# Install dependencies
sudo apt install -y python3.12 python3-pip python3-venv postgresql postgresql-contrib
# Create database
sudo -u postgres createdb freeakun_db
sudo -u postgres createuser freeakun_user -P# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install Python packages
pip install -r requirements.txt
# Configure environment
cp .env.example .env
nano .env # Edit database credentials & secret key
# Generate SECRET_KEY (optional)
python -c "import secrets; print(secrets.token_hex(32))"
# Initialize database
python seed.py
# Run application
python run.pyApplication will be available at http://localhost:5000
Migrasi user dari server lama ke server baru tanpa kehilangan data.
# Di server lama
cd /opt/freeakun
./export-users.sh
# Output: backups/users_backup_TIMESTAMP.tar.gzScript akan export:
- User data (username, email, password hash, coin balance)
- Generation logs
- Top-up transactions
- Referral data
# Copy ke server baru
scp backups/users_backup_*.tar.gz user@new-server:/opt/freeakun/backups/# Di server baru
cd /opt/freeakun
sudo ./install.sh# Extract backup
cd backups
tar -xzf users_backup_*.tar.gz
# Import users
cd ..
./import-users.sh backups/users_backup_simple_*.sqlβ Hasil: User lama bisa login dengan password mereka, coin balance tetap sama!
# Full database backup
./backup-database.sh
# Backup users only
./export-users.shBackup disimpan di folder backups/ dengan format:
full_backup_YYYYMMDD_HHMMSS.sql.gzusers_backup_YYYYMMDD_HHMMSS.tar.gz
# Edit crontab
crontab -e
# Add daily backup at 2 AM
0 2 * * * cd /opt/freeakun && ./backup-database.sh >> /var/log/freeakun-backup.log 2>&1
# Add weekly user export (Sundays at 3 AM)
0 3 * * 0 cd /opt/freeakun && ./export-users.sh >> /var/log/freeakun-export.log 2>&1# Stop application
docker-compose down
# Restore from backup
docker-compose up -d db
docker-compose exec -T db psql -U freeakun_user -d freeakun_db < backups/full_backup_*.sql
# Start application
docker-compose up -dsudo apt install -y nginx certbot python3-certbot-nginx# Edit nginx config
sudo nano /etc/nginx/sites-available/freeakun.meserver {
listen 80;
server_name freeakun.me www.freeakun.me;
location / {
proxy_pass http://localhost:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
client_max_body_size 10M;
}# Enable site
sudo ln -s /etc/nginx/sites-available/freeakun.me /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx# Get certificate
sudo certbot --nginx -d freeakun.me -d www.freeakun.me
# Auto-renewal test
sudo certbot renew --dry-runCertificate auto-renewal akan berjalan otomatis.
# Test configuration
sudo nginx -t
# Reload
sudo systemctl reload nginx
# Restart
sudo systemctl restart nginx
# View logs
sudo tail -f /var/log/nginx/access.log
sudo tail -f /var/log/nginx/error.logSetup notifikasi Telegram untuk admin dan user.
- Buka @BotFather di Telegram
- Kirim
/newbot - Ikuti instruksi setup
- Copy Bot Token (format:
123456789:ABCdef...) - Copy Bot Username (contoh:
FreeAkunBot)
- Buka @userinfobot di Telegram
- Kirim pesan apa saja
- Copy Telegram ID Anda (angka, contoh:
123456789)
- Login sebagai admin
- Buka Settings menu
- Scroll ke Telegram Bot Configuration
- Isi:
- Bot Token: Token dari BotFather
- Bot Username: Username bot (tanpa @)
- Admin Telegram ID: ID Telegram admin
- Klik Save Settings
# Restart application untuk apply config
docker-compose restart webAdmin Notifications:
- Real-time alert saat ada topup request
- Inline buttons untuk approve/reject
- Detail transaksi lengkap
User Notifications:
- Notifikasi saat topup approved
- Notifikasi saat topup rejected
- Info saldo coin terbaru
Bot Commands:
/start- Mulai bot/verify- Verifikasi akun Telegram/help- Bantuan
File .env (auto-generated oleh install.sh):
# Flask
SECRET_KEY=your-random-secret-key
FLASK_ENV=production
# Database
DATABASE_URL=postgresql://freeakun_user:password@db:5432/freeakun_db
# Upload
MAX_CONTENT_LENGTH=10485760 # 10MB
# Session
SESSION_COOKIE_SECURE=True
SESSION_COOKIE_HTTPONLY=True
SESSION_COOKIE_SAMESITE=LaxAkses: Admin Dashboard β Settings
General Settings:
- Site Name: FreeAkun.me
- Free Coins for New User: 100 coins (default)
- Enable Top-Up: ON/OFF toggle
- Minimum Top-Up: Rp 10,000
Payment Settings:
- Merchant Name: Nama merchant untuk QRIS
- Merchant City: Kota merchant
- Merchant ID: ID merchant dari payment gateway
- QRIS Static: Base QRIS code (optional)
Telegram Bot:
- Bot Token: Token dari @BotFather
- Bot Username: Username bot
- Admin Telegram ID: ID Telegram admin
Default packages (dapat diubah di admin panel):
| Package | Coins | Price | Bonus |
|---|---|---|---|
| Hemat | 100 | Rp 10,000 | - |
| Populer | 250 | Rp 25,000 | 10% |
| Value | 500 | Rp 45,000 | 12% |
| Super | 1,000 | Rp 85,000 | 15% |
Default pricing (per generate):
| Type | Coin Cost |
|---|---|
| Netflix | 50 coins |
| Spotify | 30 coins |
| Canva Pro | 40 coins |
| Disney+ | 45 coins |
| VPN Premium | 25 coins |
| Steam | 60 coins |
User
id,username,email,password_hashcoin_balance(integer, default: 100)role(admin/user)is_active(boolean)telegram_user_id,telegram_verifiedreferral_code,referred_by_iddaily_checkin_streak,last_checkin_date
AccountType
id,name,coin_priceimage_filenameis_active
Account
id,account_type_idusername,passwordis_used,used_by_user_id,used_at
CoinPackage
id,name,coin_amount,pricebonus_percentageis_active
TopUpTransaction
id,user_id,coin_package_idtotal_price,unique_codeqris_data,payment_proofstatus(pending/approved/rejected/expired)expired_at,approved_at,approved_by_id
GenerationLog
id,user_id,account_idcoin_cost,generated_at
SystemSetting
id,key,value- Feature toggles dan konfigurasi
PaymentSetting
id,merchant_name,merchant_citymerchant_id,static_qris
# Start all containers
docker-compose up -d
# Stop all containers
docker-compose down
# Restart containers
docker-compose restart
# View status
docker-compose ps
# View logs (real-time)
docker-compose logs -f
# View specific service logs
docker-compose logs -f web
docker-compose logs -f db# Access database shell
docker-compose exec db psql -U freeakun_user -d freeakun_db
# Backup database
docker-compose exec db pg_dump -U freeakun_user freeakun_db > backup.sql
# Restore database
docker-compose exec -T db psql -U freeakun_user -d freeakun_db < backup.sql
# Reset database
docker-compose down -v
docker-compose up -d
docker-compose exec web python seed.py# Access web container shell
docker-compose exec web bash
# Run Python commands
docker-compose exec web python seed.py
docker-compose exec web python -c "from app import db; print(db)"
# Rebuild containers
docker-compose build --no-cache
docker-compose up -d
# View application files
docker-compose exec web ls -la /app# Check container health
docker-compose ps
# View full logs
docker-compose logs --tail=100
# Restart specific service
docker-compose restart web
# Remove and recreate
docker-compose down
docker-compose up -d --force-recreate| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Landing page |
| POST | /auth/login |
User login |
| POST | /auth/register |
User registration |
| GET | /auth/verify-telegram |
Telegram verification |
| Method | Endpoint | Description |
|---|---|---|
| GET | /dashboard/ |
User dashboard |
| POST | /dashboard/generate/<id> |
Generate account |
| GET | /dashboard/topup |
Top-up page |
| POST | /dashboard/topup |
Create topup transaction |
| GET | /dashboard/topup/payment/<id> |
Payment page |
| GET | /dashboard/topup/check-status/<id> |
Check payment status (AJAX) |
| POST | /dashboard/topup/upload/<id> |
Upload payment proof |
| GET | /dashboard/profile |
User profile |
| POST | /dashboard/profile |
Update profile |
| GET | /dashboard/referral |
Referral info |
| Method | Endpoint | Description |
|---|---|---|
| GET | /admin/ |
Admin dashboard |
| GET | /admin/users |
User management |
| POST | /admin/user/add |
Add new user |
| POST | /admin/user/edit/<id> |
Edit user |
| POST | /admin/user/delete/<id> |
Delete user |
| GET | /admin/account-types |
Account type management |
| POST | /admin/account-type/add |
Add account type |
| GET | /admin/accounts |
Account management |
| GET | /admin/coin-packages |
Coin package management |
| GET | /admin/topup-requests |
Payment approval |
| POST | /admin/topup/approve/<id> |
Approve topup |
| POST | /admin/topup/reject/<id> |
Reject topup |
| GET | /admin/settings |
System settings |
| POST | /admin/settings |
Update settings |
| POST | /admin/clear-history |
Clear generation logs |
| Method | Endpoint | Description |
|---|---|---|
| GET | /admin/api/check-pending-topups |
Check pending topups (Admin) |
| POST | /telegram/webhook |
Telegram webhook |
- Change
SECRET_KEYin.env - Update default admin password
- Update default user passwords
- Enable HTTPS/SSL
- Configure firewall (UFW)
- Set
FLASK_ENV=production - Enable
SESSION_COOKIE_SECURE=True - Review file upload permissions
- Update QRIS payment settings
- Configure Telegram bot
- Set correct merchant info
- Update domain in sitemap.xml
- Update social media links
- Configure backup cron jobs
- Submit sitemap to Google Search Console
- Add Google Analytics
- Verify Facebook domain
- Setup Twitter cards
- Test OG images
- Test user registration
- Test account generation
- Test topup flow (QRIS)
- Test payment approval
- Test Telegram notifications
- Test mobile responsiveness
- Setup backup automation
- Configure error logging
- Setup uptime monitoring
- Database performance monitoring
- Disk space alerts
server {
listen 443 ssl http2;
server_name freeakun.me;
# SSL
ssl_certificate /etc/letsencrypt/live/freeakun.me/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/freeakun.me/privkey.pem;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
# Gzip compression
gzip on;
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_types text/plain text/css text/xml text/javascript
application/json application/javascript application/xml+rss;
# Rate limiting
limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
limit_req zone=one burst=20 nodelay;
# Proxy settings
location / {
proxy_pass http://localhost:5000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
# Timeouts
proxy_connect_timeout 60s;
proxy_send_timeout 60s;
proxy_read_timeout 60s;
}
# Static files caching
location /static/ {
proxy_pass http://localhost:5000/static/;
expires 1y;
add_header Cache-Control "public, immutable";
}
client_max_body_size 10M;
}
# HTTP to HTTPS redirect
server {
listen 80;
server_name freeakun.me www.freeakun.me;
return 301 https://freeakun.me$request_uri;
}# PostgreSQL tuning (edit postgresql.conf)
shared_buffers = 256MB
effective_cache_size = 1GB
maintenance_work_mem = 64MB
checkpoint_completion_target = 0.9
wal_buffers = 16MB
default_statistics_target = 100
random_page_cost = 1.1
effective_io_concurrency = 200
work_mem = 4MB
min_wal_size = 1GB
max_wal_size = 4GB- Password Hashing: Werkzeug PBKDF2-SHA256
- CSRF Protection: Flask-WTF tokens
- SQL Injection: SQLAlchemy ORM parameterized queries
- XSS Protection: Jinja2 auto-escaping
- Role-Based Access: Admin/User separation
- Session Security: HTTPOnly, Secure, SameSite cookies
- File Upload Validation: Type & size checking
- Rate Limiting: Can be added via Flask-Limiter
# Login sebagai admin β Settings β Users
# Update admin password
# Delete atau disable default users# Generate strong SECRET_KEY
python -c "import secrets; print(secrets.token_hex(32))"
# Update .env
SECRET_KEY=your-new-super-secret-key-here# Install UFW
sudo apt install ufw
# Default policies
sudo ufw default deny incoming
sudo ufw default allow outgoing
# Allow SSH, HTTP, HTTPS
sudo ufw allow 22/tcp
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
# Enable firewall
sudo ufw enable# Change database password
docker-compose exec db psql -U postgres
ALTER USER freeakun_user WITH PASSWORD 'new-strong-password';
# Update .env
DATABASE_URL=postgresql://freeakun_user:new-strong-password@db:5432/freeakun_db
# Restart
docker-compose restart# Update system
sudo apt update && sudo apt upgrade -y
# Update Docker images
docker-compose pull
docker-compose up -d --force-recreate
# Update Python packages
pip install --upgrade -r requirements.txtProblem: Port 5000 already occupied
Solution:
# Check what's using port 5000
sudo lsof -i :5000
# Kill process
sudo kill -9 <PID>
# Or change port in docker-compose.yml
ports:
- "5001:5000"Problem: Can't connect to PostgreSQL
Solution:
# Check database container
docker-compose ps
# Restart database
docker-compose restart db
# View database logs
docker-compose logs db
# Verify connection
docker-compose exec db psql -U freeakun_user -d freeakun_dbProblem: Can't write to uploads folder
Solution:
# Fix permissions
sudo chown -R $USER:$USER /opt/freeakun
chmod -R 755 /opt/freeakun/app/static/uploadsProblem: Bot doesn't respond
Solution:
# Check bot token
docker-compose logs web | grep -i telegram
# Verify webhook
curl -X POST https://api.telegram.org/bot<YOUR_BOT_TOKEN>/getWebhookInfo
# Restart application
docker-compose restart webProblem: QRIS code empty or error
Solution:
# Check payment settings
# Login β Admin β Settings β Payment Settings
# Ensure merchant info is filled correctly
# Check logs
docker-compose logs web | grep -i qris
# Test QRIS generator
docker-compose exec web python
>>> from app.utils.qris import generate_dynamic_qris
>>> generate_dynamic_qris(10000, 123)Problem: Upload fails
Solution:
# Check upload directory
ls -la /opt/freeakun/app/static/uploads/
# Create missing directories
mkdir -p app/static/uploads/account_types
mkdir -p app/static/uploads/payments
mkdir -p app/static/uploads/qris
# Fix permissions
chmod 755 app/static/uploads/*Warning: This will delete ALL data!
# Stop containers
docker-compose down -v
# Remove volumes
docker volume prune -f
# Restart fresh
docker-compose up -d
# Re-seed database
docker-compose exec web python seed.py# All logs
docker-compose logs -f
# Last 100 lines
docker-compose logs --tail=100
# Web application only
docker-compose logs -f web
# Database only
docker-compose logs -f db
# Save logs to file
docker-compose logs > logs.txt# Disk space
df -h
# Memory usage
free -h
# Docker disk usage
docker system df
# Container resources
docker statsEdit app/templates/base.html:
<!-- Update meta tags -->
<title>Your Site Name</title>
<meta name="description" content="Your description">
<meta property="og:title" content="Your Site Name">
<meta property="og:description" content="Your description"># Replace favicon
cp your-logo.svg app/static/favicon.svg
# Replace logo in landing page
# Edit app/templates/landing.htmlColors are using Tailwind's default palette. To customize:
<!-- Primary color (indigo) -->
<div class="bg-indigo-600"> <!-- Change to: bg-blue-600 -->
<!-- Gradient backgrounds -->
<div class="bg-gradient-to-br from-indigo-600 to-purple-600">Common Tailwind colors:
blue,green,red,purple,pink,yellow,orange
Edit app/templates/landing.html:
<!-- Hero section -->
<h1>Your Custom Headline</h1>
<p>Your custom description</p>
<!-- Features section -->
<!-- Update feature cards -->
<!-- Footer -->
<!-- Update footer content -->- Admin Panel: Login β Account Types β Add New
- Fill form:
- Name: "Your Account Type"
- Coin Price: 50
- Upload Image
- Status: Active
- Add Accounts: Accounts β Bulk Import
- Upload CSV with username,password
- Admin Panel: Login β Coin Packages
- Edit existing or Add new:
- Name
- Coin Amount
- Price (IDR)
- Bonus Percentage
- Save
Currently using Flask-Mail (can be integrated).
Example integration:
# In requirements.txt
Flask-Mail==0.9.1
# In config.py
MAIL_SERVER = 'smtp.gmail.com'
MAIL_PORT = 587
MAIL_USE_TLS = True
MAIL_USERNAME = os.environ.get('MAIL_USERNAME')
MAIL_PASSWORD = os.environ.get('MAIL_PASSWORD')Edit app/templates/base.html:
<!-- Before </head> -->
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-XXXXXXXXXX');
</script><!-- Facebook Pixel Code -->
<script>
!function(f,b,e,v,n,t,s)
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';
n.queue=[];t=b.createElement(e);t.async=!0;
t.src=v;s=b.getElementsByTagName(e)[0];
s.parentNode.insertBefore(t,s)}(window,
F030
document,'script',
'https://connect.facebook.net/en_US/fbevents.js');
fbq('init', 'YOUR_PIXEL_ID');
fbq('track', 'PageView');
</script># Application status
curl http://localhost:5000
# Database status
docker-compose exec db pg_isready
# Check disk space
df -h
# Check memory
free -h# Rotate logs (create logrotate config)
sudo nano /etc/logrotate.d/freeakun/opt/freeakun/logs/*.log {
daily
rotate 14
compress
delaycompress
notifempty
create 0640 www-data www-data
sharedscripts
postrotate
docker-compose restart web > /dev/null
endscript
}
# htop for system monitoring
sudo apt install htop
# ctop for container monitoring
sudo wget https://github.com/bcicen/ctop/releases/download/v0.7.7/ctop-0.7.7-linux-amd64 -O /usr/local/bin/ctop
sudo chmod +x /usr/local/bin/ctop# Real-time container stats
docker stats
# Using ctop (better UI)
ctop# Vacuum database (cleanup)
docker-compose exec db psql -U freeakun_user -d freeakun_db -c "VACUUM ANALYZE;"
# Check database size
docker-compose exec db psql -U freeakun_user -d freeakun_db -c "SELECT pg_size_pretty(pg_database_size('freeakun_db'));"
# Check table sizes
docker-compose exec db psql -U freeakun_user -d freeakun_db -c "SELECT relname, pg_size_pretty(pg_total_relation_size(relid)) FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;"# Backup first!
./backup-database.sh
# Pull latest changes
git pull origin main
# Rebuild containers
docker-compose build --no-cache
docker-compose up -d
# Check logs
docker-compose logs -fAll scripts are located in the root directory:
Verify that installation completed successfully.
./verify-installation.shChecks:
- Docker & Docker Compose installation
- Container status (web & database)
- Database connection
- Web app responsiveness
- Database tables & admin user
- Directory permissions
- Port availability
Exit codes:
0= All checks passed>0= Number of failed checks
Full automated installation for new server.
sudo ./install.shWhat it does:
- Install Docker & Docker Compose
- Setup environment variables
- Build and start containers
- Initialize database
- Configure firewall (optional)
Pre-installation system check.
./check-system.shChecks:
- OS compatibility
- Required ports availability
- Disk space & RAM
- Docker installation
- File integrity
Full database backup with compression.
./backup-database.shOutput: backups/full_backup_YYYYMMDD_HHMMSS.sql.gz
Features:
- Full schema + data backup
- Gzip compression
- Auto cleanup (keeps last 7 backups)
- Timestamped filenames
Export user data only for migration.
./export-users.shOutput: backups/users_backup_YYYYMMDD_HHMMSS.tar.gz
Exports:
- User accounts
- Coin balances
- Generation logs
- Topup transactions
- Referral data
Import users to new server.
./import-users.sh backups/users_backup_simple_*.sqlFeatures:
- Safety backup before import
- User data import
- Sequence updates
- Import verification
Complete migration automation.
./migrate-to-new-server.shProcess:
- Check prerequisites
- Export from old server
- Transfer files
- Install on new server
- Import user data
- Verification
Debug Telegram bot issues.
./check-telegram-logs.shShows:
- Bot configuration
- Recent Telegram-related logs
- Webhook status
Contributions are welcome! Here's how:
- Fork the repository
- Create feature branch:
git checkout -b feature/AmazingFeature - Commit changes:
git commit -m 'Add AmazingFeature' - Push to branch:
git push origin feature/AmazingFeature - Open Pull Request
# Clone repository
git clone https://github.com/imnoob59/freeakun.git
cd freeakun
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Setup pre-commit hooks (optional)
pip install pre-commit
pre-commit installAll rights reserved Β© 2025 Masanto ID
This software is proprietary and confidential. Unauthorized copying, distribution, or modification is strictly prohibited.
We welcome contributions! Please see our Contributing Guide for details.
Quick contribution steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for detailed guidelines.
Security is a top priority. If you discover a security vulnerability, please follow our Security Policy.
Quick security checklist:
- β Change default admin password
- β Use strong SECRET_KEY
- β Enable HTTPS in production
- β
Secure your
.envfile - β Regular backups
See SECURITY.md for full security guidelines.
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License - Copyright (c) 2025 Masanto ID
Created by Masanto ID
- π GitHub: imnoob59/freeakun
- π Website: FreeAkun.me
- π¬ WhatsApp: Join Channel
- π± TikTok: @masantoid
- π Facebook: Masanto ID
- π· Instagram: @masanto.id
Built with:
- Flask - Web framework
- PostgreSQL - Database
- TailwindCSS - UI framework
- Docker - Containerization
- python-telegram-bot - Telegram integration
β If you find this project useful, please give it a star on GitHub!
Happy Coding! π