Installing your own CAS is fairly simple, but it’s discouraged for novices. The possibility of losing your funds is real, if the server should inadvertently be setup incorrectly.

Installation requires some knowledge of:

CAS installation takes about 20 minutes. Hire a professional to help you if you are uncertain of how to proceed, or don’t feel comfortable with the command line.

You’ll need a server with a publicly exposed IP to host your CAS.

Minimum requirements:

RAM is a critical part of seamless operation in this application – “the more, the merrier” when it comes to that component.

We ask you to use Ubuntu 22.04 LTS for the sake of support ease and consistency. Other flavors of Linux may work, but General bytes' products and this guide are focused around known quantities.

Ubuntu LTS versions 20.04 and 22.04 are currently supported.

These installation instructions are based on the images available on Digital Ocean. Images sourced from ISO’s (or other VPS providers) may not work as expected.

 If you choose an alternate OS, you may find yourself handling your own problems without much guidance (if you can even get the software installed & operating)! 

This guide presumes you've installed a bare Ubuntu 22.04 LTS OS, without any additional software aside from perhaps a distribution upgrade. This guide further presumes root access, and sudo may be required (yet omitted) in some examples supplied below. This guide assumes root for all commands. Security is also assumed. You are running a currency exchange and hackers would love to gain access to your funds. Make it hard for them! Spend some time learning the best practices for your digital security, and implement those practices! So, let's get going. 

First: Login to your server.

You must access your “headless” Linux server using SSH.

Using Linux or Mac, this is rather straightforward. Open a terminal window and SSH into your server:

ssh root@yourserverip

On a Windows machine, you have a couple choices - but none are built-in.

  1. Windows Subsystem for Linux offered by Microsoft for Windows 10 & Windows 11.

  2. PuTTY is a little dated, but still used by millions.

Regardless of what you use, implement SSH keys (on your server) and disable passwords – remember: people want to steal your money! Password authentication usually makes that easier.

You should be looking at a CLI logged in as root on your web server before you proceed further.


Prepare your server

Update your Ubuntu:

Your Ubuntu software is obsolete out-of-the-box. You’ll need to update your installation immediately before proceeding further (and weekly thereafter).

sudo apt update && sudo apt dist-upgrade

Adjust your timezone:

Your reports and logs will be based on the current timezone, which is typically UTC (by default). Set your server to the correct timezone to enable accurate reporting.

sudo dpkg-reconfigure tzdata

Enable the UFW Firewall

A firewall should be enabled and active before installing CAS. Malicious actors may setup a bot to watch certain IP ranges. During your installation, that bot may manage to infiltrate your system in the few seconds it is unexposed - so lock it up before you go any further installing CAS.

Here’s how:

https://generalbytes.atlassian.net/wiki/spaces/ESD/pages/954728558/Configuring+Server+Firewalls#Option-1%3A-Configure-UFW

Reboot your server:

sudo reboot now

Install the GB APT repository.

APT Repository Configuration

Install the CAS installer.

Download and install the CAS installation script to your server:

sudo apt update && sudo apt install batm

Add execute permission to the script file:

sudo chmod +x /opt/batm/batm-install

Start the installation script:

sudo /opt/batm/batm-install init

You will be now be asked for your license key again. You cannot proceed without it.

Enter the key provided by General Bytes and press ENTER.

Proceed with:

sudo /opt/batm/batm-install download

Continue:

sudo /opt/batm/batm-install configure
note

If you already have SQL installed & configured, use the skip-mysql parameter to proceed without the standard scripted mySQL configuration (e.g. sudo /opt/batm/batm-install configure skip-mysql).

Do not include the skip-mysql parameter unless you have already configured mySQL.

If you already have SQL installed & configured, use the skip-mysql parameter to proceed without the standard scripted mySQL configuration (e.g. sudo /opt/batm/batm-install configure skip-mysql).

Do not include the skip-mysql parameter unless you have already configured mySQL.

Immediately the script will ask you to create some database credentials.

IF YOU ARE PERFORMING A SERVER MIGRATION:

Make sure that the database name, username, and password are identical to the source server, or the restore will fail!

The script will then ask you to confirm your public IP address.

Finally, complete the last step of CAS software installation:

sudo /opt/batm/batm-install finish

After answering the “telemetry” question, the version installed will be displayed.


Update your CAS

The version installed may not be the latest stable version.

Follow this guide to install the latest version and/or patch:

https://generalbytes.atlassian.net/l/cp/SnEYggbQ

Start CAS

The CAS server is now installed, but it must be started. Type:

sudo /batm/batm-manage start all

Typical startup screen:


Implement the integrated VPN:

Activate the integrated VPN to enable access to CAS. You cannot access CAS unless a VPN is configured and active. Only OpenVPN is supported at this time.

Instructions: VPN Access for CAS Administration


The first half of installation (CLI) is now complete.

Refer to this article for more information about batm-manage: the CAS CLI Toolkit

You’re done with the CLI after the upgrade - and you may exit the terminal (CLI).

https://generalbytes.atlassian.net/l/cp/4i7euQtC

You're still not done, though.

You'll need to configure your settings to do sales & purchases.

 Move on to part 2/2 for "first time" instructions setting up the CAS front end.


Having trouble?

Be patient. Initial startup may take 15-20 minutes.

Make sure you have enough RAM. During startup, the initialization routine will max out your CPUs and insufficient RAM will result in a bottleneck. Your system may terminate one (or both) of your services - and your server won’t serve.

See these troubleshooting articles:

NEXT >>