> For the complete documentation index, see [llms.txt](https://faxes.gitbook.io/faxes-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faxes.gitbook.io/faxes-documentation/faxcad-2.0/getting-started.md).

# Getting Started

{% hint style="info" %}
FaxCAD is a purchased item and can be bought via the FAXES Gaming Discord.\
[**faxes.zone/discord**](https://faxes.zone/discord)
{% endhint %}

### Step 1 - Setting Up

To be able to run FaxCAD 2.0 you will need a web-server. If you already have one great! This guide will use Linux as the operating system, via a console. We recommend using **Ubuntu 18.04 LTS or higher.**

*Note: This guide may link to other guides or documentation that is external.*

**FaxCAD 2.0 Requirements:**\
\- (Web-)Server to host the site.\
\- Nginx, Apache or similar web-server software.\
\- PHP 7.0+ installed.\
\- MySQL Server \
\&#xNAN;***If you don't have any of the above, it's okay, that's also in the guide!***

If you don't have a server to host FaxCAD 2.0 on. We highly recommend Linode. See our referral link [here](https://www.linode.com/?r=8463f3697fd6744481f38c12e1bd3b327ebe6e3b). Anything from their $5 plan and up should work fine for a start. For the operating system we suggest choosing **Ubuntu 18.04 LTS or higher**. Seeming we are using Ubuntu you can use a web shell or download the [Ubuntu console](https://www.microsoft.com/store/productId/9NBLGGH4MSV6) from the Microsoft Store.

Once you have a server to build from continue, make sure you're able to login to the server with sudo access (admin access, you should have this by default with your root user).

### Step 2 - Installing Nginx, PHP & MySQL

These are super vital to running FaxCAD as FaxCAD 2.0 will not run without these! We highly recommend [this guide by Digital Ocean](https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-ubuntu-18-04) to install LEMP (Linux, Nginx (Engine-X), MySQL, PHP).

Seeming FaxCAD stores user data and information we also suggest using SSL certificates to help protect this. Take a look at this [Digital Ocean Guide on How To Secure Nginx with Let's Encrypt](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-18-04).&#x20;

Now you should be able to see the below picture with the padlock icon to the left of the URL.<br>

![Nginx’s default landing page](/files/-M5fXDNHGtZYnGx72_xn)

### Step 3 - Installing FaxCAD 2.0 Database

If you either have a web-server, or followed the above linked guides you can continue with installing the FaxCAD 2.0 Database.

Extract the `installme.sql` file and place into the `/root` folder of your server and open and login to your MySQL terminal via SSH. Try use this command to login; `mysql -u root -p` If you don't have a root password just press enter.

You will need to create the database itself. To do this run the below code in your SQL terminal. For the purposes of this guide the database name will be `myCADDatabase`.

```sql
CREATE DATABASE myCADDatabase CHARACTER SET utf8;
```

Once you have done that and it creates. Do `USE myCADDatabase` to enter your database. Now do the below command to import the `installme.sql` file into our SQL database.

```sql
source installme.sql;
```

Now your database should be installed and imported. Double check this by doing `SHOW TABLES;`, this should display something like the below image.

![Tables within the FaxCAD 2.0 Database](/files/-M5p-g9XT13lZUIz3cTn)

Now we have the database installed we can move back to the web-server side and install our PHP files.

### Step 4 - Installing FaxCAD 2.0 Website Files

We recommend using a SFTP like FileZilla or WinSCP for this as he command line can be annoying. Extract the files from your FaxCAD Rar file into the web directory of your server. This will be the directory you set up in [step 2](https://docs.faxes.zone#step-2-installing-nginx-php-and-mysql). By default it will be under `/var/www`. Once navigated move all the files except the `installme.sql` file into the directory.

### Step 5 - Setting Up Discord OAuth2

To set up Discord OAuth2 head to the [Discord developer portal](https://discordapp.com/developers/applications/). and create an application for your CAD. Once you have created an application for your CAD go to the OAuth2 tab on the left side and add a redirect and write `https://mydomain.com`. Make sure there is no trailing `/` this should be the same as your link to your CAD. So make sure to replicate that.

### Step 6 - Configuring FaxCAD 2.0

Now we have installed the files for FaxCAD 2.0 we can configure it to make it look like it's meant too. Your config file will look like the below code.

```php
<?php

// MYSQL Database Details //
$host = "localhost";
$username = "root";
$password = "";
$dbName = "myCADDatabase";


// Discord OAuth2 Details //
$discordClientId = "DiscordClientID";
$discordClientToken = "DiscordToken";

// Owner Tools //
$ownerId = "YourDiscordID"


// Developer Tools //
$debugMode = false;

?>
```

Edit the file and fill in all the details and make sure it replicates what we have created above. Once you have completed this, go to your CAD and test it out - you should be all good to go!<br>

{% hint style="success" %}
Your CAD should be in working order. For anything support related place it into the `#faxcad-support` channel in the Discord server.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://faxes.gitbook.io/faxes-documentation/faxcad-2.0/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
