Ubuntu Server Installation

Prerequisites

System Requirements

  • Ubuntu Server (22.04 LTS or later recommended)

  • Minimum 0.5GB RAM

  • Clean installation recommended

Domain and DNS Setup (Required)

  1. Cloudflare Account Setup

    • Create a Cloudflare account if you don't have one

    • Add your domain to Cloudflare

    • Update your domain's nameservers to Cloudflare's nameservers

  2. DNS Configuration

    • Add an A record pointing to your server's IP address

    • Add a CNAME record for the domain (optional). Not required for sub.yourdomain.com

  3. SSL/TLS Configuration in Cloudflare

    • Go to SSL/TLS section

    • Set encryption mode to "Full (strict)"

Broker Setup (Required)

  • Obtain your broker's API credentials as per the openalgo documentation:

    • API Key

    • API Secret

  • Prepare the Redirection URL as per your domain name and broker name

Login to the Ubuntu Server

Installation Steps

1. Download Installation Script

2. Run Installation Script

The script will interactively prompt you for:

  • Your domain name (supports both root domains and subdomains)

  • Broker selection

  • Broker API credentials

The installation process will:

  • Install required packages

  • Configure Nginx with SSL

  • Set up the OpenAlgo application

  • Create systemd service with unique name based on domain and broker

  • Generate installation logs in the logs directory

Multi-Domain Deployment

The installation script supports deploying multiple instances on the same server:

  • Each deployment gets a unique service name (e.g., openalgo-yourdomain-broker)

  • Separate configuration files and directories for each deployment

  • Individual log files for each installation in the logs directory

  • Independent SSL certificates for each domain

  • Isolated Python virtual environments

Example of running multiple deployments:

Each deployment will:

  • Have its own systemd service

  • Use separate configuration files

  • Store logs in unique timestamped files

  • Run independently of other deployments

3. Verify Installation

After installation completes, verify each deployment:

  1. Check Service Status

  2. Verify Nginx Configuration

  3. Access Web Interfaces Test each deployment in your web browser:

  4. Check Installation Logs

Troubleshooting

Common Issues

  1. SSL Certificate Issues

  2. Application Not Starting Example scenario: Managing multiple broker deployments

  3. Nginx Issues

  4. Installation Logs Example: Checking installation logs for multiple deployments

Managing Multiple Deployments

  1. Service Management Examples

  2. Log Management Examples

  3. Nginx Configuration Examples

  4. Installation Directory Examples

Security Notes

  1. Firewall

    • The installation configures UFW to allow only HTTP, HTTPS, and SSH

    • Additional ports can be opened if needed:

  2. SSL/TLS

    • Certificates are automatically renewed by Certbot

    • The installation configures modern SSL parameters

    • Regular updates are recommended:

Post-Installation

  1. Configure your broker settings in the web interface

  2. Set up monitoring and alerts if needed

  3. Regularly check logs for any issues

  4. Keep the system updated with security patches

Support

For issues and support:

  • Review the logs using commands provided above

  • Contact support with relevant log information

Remember to:

  • Regularly backup your configuration

  • Monitor system resources

  • Keep the system updated

  • Review security best practices

Last updated

Was this helpful?