Complete Setup Guide - Choose Your Hosting Method

VPS Hosting Setup

This method provides the best performance and reliability for your MT5 analysis platform.

1 Choose a VPS Provider

Select one of these recommended VPS providers:

  • DigitalOcean (Starting at $5/month)
  • Vultr (Starting at $5/month)
  • Linode (Starting at $5/month)
  • AWS Lightsail (Starting at $3.50/month)
2 Set Up Your Server

Create a new VPS instance with these specifications:

  • Ubuntu 20.04 LTS
  • 1GB RAM, 1 CPU, 25GB SSD
  • Note down your server's IP address and root password
3 Connect to Your Server

Connect to your server using SSH:

ssh root@your-server-ip

Enter your password when prompted.

4 Install Required Software

Run these commands on your server:

apt update && apt upgrade -y
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -
apt-get install -y nodejs
npm install -g pm2
apt install nginx -y
apt install git -y
5 Set Up Your Application

Create application directory and set up your code:

mkdir /opt/mt5-app
cd /opt/mt5-app
git clone your-repository-url .
npm install
6 Configure Nginx

Create Nginx configuration file:

server {
    listen 80;
    server_name your-domain.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}
7 Set Up SSL with Let's Encrypt

Install Certbot and get SSL certificate:

apt install certbot python3-certbot-nginx -y
certbot --nginx -d your-domain.com
8 Deploy Your Application

Start your application with PM2:

cd /opt/mt5-app
pm2 start index.js --name "mt5-app"
pm2 startup
pm2 save

Success! Your MT5 analysis platform is now running on your VPS. You can access it at your domain name.

Termux (Android) Setup

Run your MT5 analysis platform directly on your Android device using Termux.

1 Install Termux

Download and install Termux from:

  • Google Play Store (may be outdated)
  • F-Droid (recommended)
  • Termux official GitHub page
2 Update Packages

Open Termux and update packages:

pkg update && pkg upgrade
3 Install Node.js

Install Node.js and required tools:

pkg install nodejs git
4 Download Application

Clone or download the application code:

git clone https://github.com/your-username/mt5-app.git
cd mt5-app
5 Install Dependencies

Install required Node.js packages:

npm install
6 Configure Environment

Set up your environment variables:

nano .env

Add your MT5 credentials:

MT5_SERVER=your-mt5-server
MT5_LOGIN=your-mt5-login
MT5_PASSWORD=your-mt5-password
MT5_PORT=443
JWT_SECRET=your-secret-key
PORT=3000
7 Start the Application

Start your MT5 analysis platform:

node index.js

Or use PM2 for process management:

npm install -g pm2
pm2 start index.js --name "mt5-app"
8 Access Your Application

Open your browser and navigate to:

http://localhost:3000

Note: To access from other devices on your network, you might need to use a reverse proxy like ngrok or serveo.

Warning: Termux may not be suitable for production use due to performance limitations and potential background process restrictions on Android.

Local Computer Setup

Run your MT5 analysis platform on your local computer for development and testing.

1 Install Node.js

Download and install Node.js from the official website:

https://nodejs.org/

Download the LTS version for your operating system (Windows, macOS, or Linux).

2 Download Application

Download or clone the application code:

git clone https://github.com/your-username/mt5-app.git
cd mt5-app
3 Install Dependencies

Install required Node.js packages:

npm install
4 Configure Environment

Create a .env file in the project root:

MT5_SERVER=your-mt5-server
MT5_LOGIN=your-mt5-login
MT5_PASSWORD=your-mt5-password
MT5_PORT=443
JWT_SECRET=your-secret-key
PORT=3000
5 Start the Application

Start your MT5 analysis platform:

node index.js

Or for development with auto-restart:

npm run dev
6 Access Your Application

Open your browser and navigate to:

http://localhost:3000
7 Optional: Use PM2 for Process Management

Install PM2 globally and start your application:

npm install -g pm2
pm2 start index.js --name "mt5-app"
pm2 startup
pm2 save

Success! Your MT5 analysis platform is now running on your local computer.

Application File Structure

Your MT5 analysis platform should have the following file structure:

mt5-app/
├── index.js # Main server file
├── package.json # Dependencies and scripts
├── .env # Environment variables (not in git)
├── .gitignore # Git ignore file
├── routes/
│ ├── auth.js # Authentication routes
│ ├── mt5.js # MT5 API routes
│ └── analysis.js # Technical analysis routes
├── middleware/
│ └── auth.js # Authentication middleware
└── public/ # Frontend files
├── index.html
├── css/
├── js/
└── assets/

Environment Variables

Create a .env file with the following variables (do not commit this file to git):

MT5_SERVER=your-mt5-server
MT5_LOGIN=your-mt5-login
MT5_PASSWORD=your-mt5-password
MT5_PORT=443
JWT_SECRET=your-super-secret-jwt-key
PORT=3000

Note: Replace the values with your actual MT5 credentials and use a strong JWT secret.

Troubleshooting

1 Connection Issues

If you're having trouble connecting to MT5:

  • Verify your MT5 credentials
  • Check if your MT5 server allows API connections
  • Ensure your firewall isn't blocking the connection
2 Port Already in Use

If you get an error that port 3000 is already in use:

# Find the process using port 3000
lsof -i :3000

# Kill the process
kill -9 PID

# Or use a different port
PORT=3001 node index.js
3 Permission Issues

If you encounter permission issues on Linux:

# Fix npm permissions
sudo chown -R $(whoami) ~/.npm

# Or use a node version manager
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash