📦

# Bicrypto Virtualmin Setup

Complete installation guide for Bicrypto on Virtualmin servers

Need Help?

For additional support, visit our Support Center

## 📖 Overview

This guide will walk you through setting up Bicrypto on a Virtualmin-managed server using Apache. The steps include uploading the Bicrypto zip file to your public_html folder, configuring Apache directives, and running the automated installer script.

Prerequisites Required

Ensure you have completed the Server Requirements checklist before proceeding.

## 📥 Preliminary Step: Download Bicrypto Zip

0

### Download from Envato

Download the Bicrypto zip file from your Envato account before proceeding with the installation.

## 🚀 Installation Steps

1

### Upload the Zip File

Navigate to `public_html` in your Virtualmin File Manager (or via SFTP/SSH) and upload the Bicrypto zip file.

2

### Extract the Zip File

Once uploaded, right-click on the Bicrypto zip file and choose Extract (or use SSH command `unzip <filename.zip>`).

3

### Overwrite Existing Files (If Prompted)

If you see a prompt asking to overwrite existing files, click Yes. This ensures all relevant files are updated.

4

### Configure SSL Website (Apache Directives)

In Virtualmin, navigate to Web Configuration → Configure SSL Website → Edit Directives.

Using Nginx?

If you are using NGINX instead, follow the NGINX Configuration guide and then continue from Step 7.

5

### Add the Apache Configurations

After the line `DirectoryIndex`, add the following configurations optimized for [id] parameter handling and large i18n headers. Then, click Save and Close.

    Protocols h2 http/1.1
    ProxyPreserveHost On
    KeepAlive On
    KeepAliveTimeout 3
    MaxKeepAliveRequests 500
    ProxyTimeout 150
    AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
    ProxyPass /api/docs http://localhost:4000/api/docs
    ProxyPassReverse /api/docs http://localhost:4000/api/docs

    ProxyPass /api http://localhost:4000/api
    ProxyPassReverse /api http://localhost:4000/api

    RewriteCond %{HTTP:Upgrade} =websocket [NC]
    RewriteRule ^/api/(.*) ws://localhost:4000/api/$1 [P,L]

    ProxyPass / http://localhost:3000/
    ProxyPassReverse / http://localhost:3000/

    <Proxy "http://localhost:4000/">
        ProxySet max=70000
    </Proxy>

6

### Configure Website (Same Apache Directives)

Return to Web Configuration → Configure Website → Edit Directives and repeat the same configuration from Step 5. Save and close.

7

### File Manager – Copy Path to Clipboard

Open File Manager, right-click on any file or folder, then choose Copy, followed by Copy Path to Clipboard. You'll need this path shortly.

8

### Open Root Terminal

Scroll down in the left sidebar of Virtualmin (or the top menu) to find the Root Terminal option. Click to open it.

9

### Navigate to public_html

Paste the path you copied in step 7 to enter the V5 folder. For example:

`cd /path/to/public_html`

Replace `/path/to/public_html` with your actual path from the clipboard.

10

### Run the Automated Installer

Install dos2unix, convert the script if necessary, and run `installer.sh`:

    sudo apt install dos2unix
    dos2unix installer.sh
    chmod +x installer.sh
    sudo bash installer.sh

11

### Provide Site URL and Database Info

The installer will ask for your site URL. Enter it in the format `https://domain.com` without a trailing slash. It will also prompt for:

- Site Name
- Database Name
- Database User
- Password
- Host (usually `localhost`)
- Port (usually `3306` for MySQL)

12

### Finish and Get Default Credentials

After the installer completes, it will display default credentials for the super admin user.

Important Security Step

Update the super admin email via phpMyAdmin or another database tool (e.g., TablePlus) for security.

## ⚙️ Post-Installation Configuration

13

### Close Root Terminal and Edit Virtual Server

Click the X to close the Root Terminal. Then return to your Virtualmin interface to edit the virtual server if needed.

14

### Adjust Quotas (If Available)

In Edit Virtual Server, if you see Quotas and Limits, set both Total and Server quota to Unlimited. If you do not see this, you may skip this step.

15-19

### File Ownership Configuration

Follow these steps to ensure proper file ownership:

1. Return to File Manager
2. Right-click on files not owned by `root:root`
3. Choose Select All from the top notification
4. Confirm selection of all pages by clicking Yes
5. Right-click and choose Properties
6. Set Username and Group Name to correct Virtualmin user
7. Check Recursive checkbox and click Change

20

### Open the User Terminal

Below the File Manager, you'll see a User Terminal. Click to open it, then navigate again to `public_html`:

`cd public_html`
21

### Install Dependencies

Run `pnpm install` to install dependencies for V5 Exchange Provider. If prompted for confirmation, press Enter.

`pnpm install`
22

### Start the Application

Finally, start the V5 Exchange Provider application:

`pnpm start`

Wait about 20 seconds for the build and server to initialize. Your site should then be accessible at the domain you configured.

## 📝 Additional Notes & Best Practices

### 🔒 Security Best Practices

- • Keep your server up to date
- • Configure firewalls properly
- • Consider fail2ban for intrusion prevention
- • Use SSL certificates for HTTPS

### ⚡ Performance Tips

- • Monitor system resources regularly
- • Consider load balancer for high traffic
- • Optimize database performance
- • Use SSD storage when possible

### 🛠️ Troubleshooting

- • Check file permissions if errors occur
- • Ensure correct ownership settings
- • Verify Apache/Nginx configuration and timeout settings
- • Check system logs for 502 errors with [id] parameters
- • Increase proxy timeouts if [id] queries are slow

### 🔄 Maintenance Commands

- • `pnpm stop` - Stop the application
- • `pnpm updator` - Update and restart
- • `pnpm build:all` - Build frontend & backend
- • `pm2 status` - Check application status

### 🚨 502 Errors with [id] Parameters

- • Common Cause: Apache proxy timeouts or large i18n headers exceeding limits
- • Solution: Use the enhanced Apache config above with 300s timeouts and header size limits
- • If still failing: Reduce languages in `NEXT_PUBLIC_LANGUAGES` to essential ones
- • Test: `curl -I http://localhost:4000/api/health`
- • Logs: Check `/var/log/apache2/error.log`

### 🌍 i18n Locale Optimization

If experiencing "header size over limit" errors, reduce your languages to essential ones:

`NEXT_PUBLIC_LANGUAGES="en,es,fr,de,it,pt,ru,ar,ja,ko,hi,tr"`

- • Edit `frontend/next.config.js`
- • Rebuild: `npm run build && pm2 restart frontend`
- • These 12 languages cover ~4.5B people while keeping headers manageable

### 🎉 Installation Complete!

Congratulations! You've successfully installed V5 Exchange Provider on your Virtualmin server. Your application should now be accessible via your configured domain.

Next: App Configuration
Get Support