Foyana Operations Manual.
Official product documentation and deployment guide for the Foyana automated crypto trading and copy trading PHP script (Laravel 13 & PHP 8.3+).
Legal Disclaimer & Risk Disclosure
Software License Terms
Foyana is provided as a self-hosted PHP web application. When you purchase a license, you receive full access to the unencrypted PHP source code. You are granted the right to install, customize, and operate the software on your own server for your business. You may not sublicense, redistribute, or resell the raw source code.
- Regulatory Responsibility: The purchaser/operator of this software is solely responsible for complying with all applicable local, national, and international laws, financial regulations, anti-money laundering (AML) directives, and Know-Your-Customer (KYC) compliance standards in their operating jurisdiction.
- Non-Custodial Architecture: Foyana is an independent software tool that interacts with decentralized blockchain networks. The developers and authors of Foyana do not hold, custody, manage, or have access to any cryptocurrency funds, private keys, or fiat transactions processed on your server.
- Cryptographic & Market Risk: Cryptocurrency trading carries inherent market risks including price volatility, network congestion, and gas spikes. Ensure your master private keys and cold storage backups are properly safeguarded.
Server Requirements
Foyana is built on Laravel 13 and strictly requires PHP 8.3 or higher. All frontend CSS, JS, and font assets come 100% pre-compiled, so Node.js or NPM is not required on your server.
All 16 Required PHP Extensions
| Extension | Technical Purpose |
|---|---|
| gmp | Big number math for Secp256k1 EVM & Bitcoin elliptic curve arithmetic |
| sodium | Ed25519 offline transaction signing for Solana |
| bcmath | Arbitrary precision conversions for Wei, Sun, Satoshis, Lamports |
| curl | HTTP JSON-RPC blockchain communication and price feeds |
| openssl | AES-256-CBC database encryption for private keys |
| pdo / pdo_mysql | Database connectivity and transaction handling |
| mbstring | Multibyte UTF-8 string encoding and address hashing |
| gd | QR code rendering and image manipulation for deposit addresses |
| fileinfo | MIME type verification for KYC document uploads |
| dom / xml | DOM parsing for DomPDF invoices & sitemaps |
| zip / json | ZIP export/import and JSON payload serialization |
| ctype / tokenizer / pcre | Standard Laravel 13 framework core components |
Recommended php.ini Directives
memory_limit = 512M
max_execution_time = 300
max_input_time = 300
upload_max_filesize = 256M
post_max_size = 256M
date.timezone = UTC
chmod -R 775 or 755):
Installation via Web Installer
Foyana includes a standalone, browser-based GUI Web Installer that tests your server environment, connects your database, and sets up your super administrator account in under 2 minutes.
Download and extract the Foyana software release archive (foyana-v*.zip). Inside, you will find the foyana/Files folder containing the core application, alongside the foyana/documentation directory.
public_html)Copy or move all files and folders located inside the foyana/Files directory directly into your domain's web root (e.g., public_html, www, or /var/www/foyana).
.env and .htaccess are selected and copied.
Ensure your web server properly directs web traffic to the public/ folder:
Already pre-configured! The root directory includes an optimized .htaccess file that automatically routes all incoming requests into the public/ directory and enforces HTTPS. No manual document root modification is needed.
For Nginx, you must ensure your server block configuration explicitly points the root directive to the public/ folder (e.g., root /var/www/foyana/public; or root /home/user/public_html/public;).
Open your browser and navigate to: https://your-domain.com/install
Cron Job Setup & Admin Monitoring UI
For trading bots, copy trading replication, and blockchain deposit sweepers to run
automatically, set up a 1-minute cron job via curl, wget, or direct CLI crontab (php artisan foyana:scheduler-daemon).
* * * * * curl -s -o /dev/null https://your-domain.com/utils/cronjob
* * * * * wget -q -O- https://your-domain.com/utils/cronjob >/dev/null 2>&1
* * * * * cd /path/to/foyana && php artisan foyana:scheduler-daemon >/dev/null 2>&1
Navigate to Admin → Settings → Cron Jobs
(/admin/settings/cronjob). It displays real-time
execution health, timestamps of the last run, and generates ready-to-copy curl commands for
your domain.
- Crypto Deposit Monitor: Scans blockchains, verifies confirmations, credits user balances, and sweeps funds into master wallets.
- Trading Bots Engine: Runs bot cycles, calculates daily returns, writes trade logs, and returns principal upon maturity.
- Copy Trading Synchronizer: Mirrors master trader signals to all active followers in real time.
- Expired Deposit Cleaner: Cancels expired unconfirmed deposit windows.
- Background Task Queue: Processes email notifications and queued asynchronous system jobs.
Blockchain Master Wallets & Wallet Import
Foyana features a self-hosted multi-chain wallet engine that connects directly to blockchain RPC nodes with zero third-party payment gateway fees.
Ethereum, BSC, Polygon, Base, Arbitrum, Avalanche
Generate or import a private key in /admin/deposits/master-wallets. Import the same
private key into Trust Wallet or MetaMask to manage all EVM chain balances from your
mobile phone.
Native TRX & TRC-20 USDT
Fund this master address with a small amount of TRX (50–100 TRX) to sponsor energy/bandwidth gas before sweeping TRC-20 USDT. Import into TronLink or Trust Wallet.
Native SOL & SPL Tokens (USDC/USDT)
Fund with a small balance (0.1 SOL); the master wallet acts as the fee payer so SPL tokens sweep without requiring SOL in user sub-wallets. Import into Phantom or Trust Wallet.
Native SegWit (Bech32 bc1q...)
Direct integration with Bitcoin Esplora RPC. Validates block confirmations to prevent double-spending. Import into any BIP-84 Native SegWit compatible Bitcoin wallet.
All private keys are encrypted at rest using Laravel's Crypt::encryptString() (AES-256-CBC with HMAC validation).
Private keys are never stored in plaintext.
Platform Settings & Configuration
Financial Settings (/admin/settings/financial)
Set base currency (USD, EUR, GBP), decimal precision, platform deposit fee percentage, deposit countdown lifespan, and global withdrawal limits.
Core Branding (/admin/settings/core)
Upload site logo (square and rectangular), tab favicon (32x32), update site name, tagline, and configure operating timezone (e.g., UTC).
Security Settings (/admin/settings/security)
Toggle mandatory email verification, login 2FA OTP codes, Google reCAPTCHA bot defense, and password strength policies.
Email & SMTP (/admin/settings/email)
Configure SMTP credentials (Host, Port, User, Password, TLS/SSL) and customize transactional email notification templates.
Managing Automated Trading Bots
Creating a Bot (/admin/trading-bots)
- Navigate to Trading → Trading Bots → New Bot.
- Set Bot Name (e.g. *Alpha Momentum Pro*), Trading Pair (`BTC/USDT`), and Risk Tier (Low Risk, Medium Risk, High Growth, Aggressive).
- Set Min & Max Balance capital limits.
- Set Yield Rules (fixed percentage or range like `1.5% - 2.5%`).
- Choose Payout Schedule (Daily, Weekly, Monthly) and Tenure Duration (7, 30, 90, 365 days).
- Click Save Bot. It will appear on user dashboards instantly.
When active, the Trading Bots Engine (coordinated automatically by php artisan foyana:scheduler-daemon) executes
active bot cycles, credits daily profits to user balances, logs full records to TradingBotLog, and returns the original capital upon
completion.
Managing Master Copy Trading
Configuring Master Traders (/admin/copy-trading)
Create verified trader profiles with historical win rates, total PnL metrics, follower limits, and custom performance fee splits (e.g. 20%).
The internal Copy Trading Synchronizer (coordinated automatically by php artisan foyana:scheduler-daemon) mirrors master
orders to all active follower accounts in real time, deducts the performance fee upon
profitable closure, and distributes profit shares automatically.
User Management & KYC Verification
User 360° Hub (/admin/users)
View user balances, deposit histories, active bots, and referral downlines. Adjust balances with custom ledger notes, ban/unban users, and securely log in as any user with 1 click.
KYC Review Portal (/admin/kyc)
Review uploaded identity documents (Passports, National IDs, Proof of Address) with high-res zoom controls. Approve or reject with automated notification feedback.
Crypto Withdrawals & Payout Management
Process and approve payouts directly on-chain using pure-PHP withdrawal services (EthereumWithdrawalService, SolanaWithdrawalService, TronWithdrawalService, BitcoinWithdrawalService).
Upon payout approval, the script generates a branded PDF receipt with transaction hashes, timestamps, and fees using DomPDF for user accounting records.
Maintenance & Troubleshooting
php artisan optimize:clear
Common Troubleshooting Checklist
| Issue | Root Cause & Resolution |
|---|---|
| Bots or copy trades not updating | Ensure the cron job hitting /utils/cronjob is running every minute in
your server crontab. |
| Crypto deposits not detected | Check that your RPC endpoints in /admin/deposits/master-wallets are active
and not rate-limited (HTTP 429). |
| TRC-20 or ERC-20 sweeps failing | Ensure your master wallet holds a small balance of native gas (TRX for TRON, ETH/BNB for EVM) to sponsor sub-wallets. |
| Database error during install | Verify your MySQL user has full ALL PRIVILEGES on the target database. |
Support & Assistance
Need Custom Help or Modifications?
Our engineering desk is available to assist verified license holders with server deployments, custom bot strategy implementations, and multi-chain integrations.