# Setup local server

- Clone the ***uniksim*** depot with the ***old\_login*** branch : [https://bitbucket.org/gypso/uniksim.git](https://gypso@bitbucket.org/gypso/uniksim.git "https://bitbucket.org/gypso/uniksim.git")
- Run ***npm install*** in the main directory
- Install and run **[Xampp](https://www.apachefriends.org/index.html)** v7.3.31 (Installation location (by default) -&gt; *C:\\xampp )*
- Make the ***&lt;uniksimroot&gt;*/*public*** folder the root of a php virtual host 
    - Add the following lines to ***C:\\xampp\\apache\\conf\\extra\\httpd-vhosts.conf***

---

&lt;VirtualHost \*:80&gt;  
 ServerAdmin webmaster@localhost  
 DocumentRoot *<span style="background-color: #ffff99;">&lt;uniksimroot&gt;</span>/public*  
 ServerName uniksimdev  
 ServerAlias www.uniksimdev  
 &lt;Directory "*<span style="background-color: #ffff99;">&lt;uniksimroot&gt;</span>/public*"&gt;  
 Options All  
 AllowOverride All  
 Require all granted   
 &lt;/Directory&gt;  
&lt;/VirtualHost&gt;

---

- - Add the following lines to ***C:\\windows\\system32\\drivers\\etc\\hosts***

---

127.0.0.1 localhost

127.0.0.1 uniksimdev

---

- Edit your user variables 
    - Right-click on your ***Computer*** in the ***File Explorer*** and go to ***Properties***
    - Go to the ***Advanced* system settings** and click on ***Environment Variables***
    - Find ***Path*** in the system variables box, and add the following path to the end of the ***Path*** variable string.

---

 ;C:\\xampp\\php

---

- Run ***php composer.phar install*** in the main directory (***&lt;uniksimroot&gt;****)*
- Start the ***Apache*** and the ***MySQL*** modules in the ***Xampp Control Panel***
- Setup in *phpMyAdmin*
    - Open the ***Admin*** panel of the ***MySQL*** module in the ***Xampp Control Panel***
    - Create a new database named ***uniksim*** with the ***utf8\_general\_ci*** collation
    - Within the *SQL* tab in the new database, setup the database structure by running the content of ***&lt;uniksimroot&gt;/uniksim\_example.sql***
- Setup the game 
    - Get the current game version for the client in the ***constant*** table within the ***uniksim*** database in phpMyAdmin and add the folders ***builds/&lt;client\_version&gt;*** in ***&lt;uniksimroot&gt;/public/***
    - Copy your Unity build to the ***&lt;client\_version&gt;*** folder
- Duplicate ***&lt;uniksimroot&gt;/.env.example*** and rename it ***.env***
    - Insure the name of the database is correct 
        - DB\_DATABASE=uniksim  
            DB\_USERNAME=root  
            DB\_PASSWORD=''
- Install [**Redis**](https://github.com/microsoftarchive/redis/releases) for Windows
- Install **[Visual Studio Code](https://code.visualstudio.com/)** and open it, drag and drop ***&lt;uniksimroot&gt;/node.js***, and run the <div><div>***GameSparks Live or preview*** configuration</div></div>