Windows Server Installation
Windows Server Installation (Updated)
Why Choose a Server over a Desktop?
Reliability and Stability: Servers provide a stable and dedicated environment for your trading software. Unlike a desktop, servers are designed for constant operation and are less susceptible to disruptions like power outages, system crashes, or internet issues.
Scalability: If your trading algorithms become more complex or require access to vast amounts of data, you can easily scale up your server resources to accommodate those needs.
Security: Servers offer enhanced security measures to protect your trading strategies and data. You can control access, enforce strict firewall rules, and implement encryption protocols for better data protection.
Accessibility: You can access your server and trading platform remotely, regardless of your location. This allows for greater flexibility and control over your operations.
This updated guide focuses on a minimal, high-performance installation of OpenAlgo on a Windows Server (Vultr/AWS/Azure), specifically targeting regions like Mumbai for optimal trading latency. It introduces the uv package manager for significantly faster dependency management compared to standard pip.
Step-by-Step Installation Process:
Deploy a Cloud Instance: Deploy a Windows Server 2022 instance via your preferred cloud provider. For Indian markets, choose the Mumbai data center. A minimum of 8GB RAM is recommended.
Access via RDP: Log into your instance using the Remote Desktop Connection tool with the Administrator credentials provided by your cloud console.
Install Google Chrome: Open the default browser (Edge) to download and install Google Chrome for a better browsing experience on the server.
Install Visual C++ Redistributable: Download and install the latest VC++ Redistributable (both x86 and x64). This is essential for libraries like Numba, which OpenAlgo uses for high-performance calculations.
Install Python: Download Python 3.12 or newer from python.org. OpenAlgo requires
>=3.12and will not start on an older interpreter. Important: During installation, ensure you check the box "Add python.exe to PATH".Install Git: Download and install Git for Windows from git-scm.com. This is required to clone and update the OpenAlgo source code.
Install uv Package Manager: Open Windows PowerShell as Administrator and install uv:
Download OpenAlgo: Navigate to your C: drive and clone the repository:
Configure the .env File:
Broker fields can remain empty; save keys after startup in Broker Configuration. Existing
.envbroker keys remain supported and take precedence for that broker. Save and close. LeaveAPP_KEY,API_KEY_PEPPERandFERNET_SALTat theirOPENALGO_PLACEHOLDER_...values: OpenAlgo replaces them with fresh random secrets on first start.Set Server Timezone: For Indian markets, adjust your server time settings to (UTC +05:30) Chennai, Kolkata, Mumbai, New Delhi. Ensure you click "Sync now" to align with exchange timings.
Update Static IP at Broker: Copy your server's Public IP address. Log in to your broker's API portal and whitelist this IP in your App settings. This is a critical security step required by most brokers.
Initial Launch:
The first launch takes a few minutes while uv builds the virtual environment and resolves the locked dependency set. The startup banner then reports the web app on
http://127.0.0.1:5000and the WebSocket proxy onws://127.0.0.1:8765.
Node.js is not required. The repository ships the pre-built React frontend in frontend/dist.
Create a One-Click Launch Script
To simplify the startup process, you can create a PowerShell script on your desktop:
Open Notepad and paste the following code:
Save the file to your Desktop as StartOpenAlgo.ps1.
To start OpenAlgo, Right-click the file and select "Run with PowerShell".
Last updated