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

# Installation

## Requirements

You can run TeamCal Neo on your own web server if it supports:

* PHP 8.2+ (with the PDO and PDO\_MySQL extensions enabled)
* MariaDB 10.4+ or MySQL 8.0+ (InnoDB storage engine)

You also need access to your web server in order to copy files there, and you need to be able to create a database that your web server can access. The database user needs full rights on that database.

{% hint style="warning" %}
TeamCal Neo 6 needs MariaDB 10.4 / MySQL 8.0 or newer. Older servers (for example MySQL 5.x) are no longer supported. Ask your hosting provider if you are not sure which version you have.
{% endhint %}

## Creating the database

Login to your web hosting front end and create a MariaDB/MySQL database. Use the character set `utf8mb4` and the collation `utf8mb4_unicode_ci`. The installer creates its tables with them, so the database default is not critical, but setting it avoids surprises. You might want to give it a speaking name like “TCNeo”. Write down the

* Database server URL
* Your database name
* Your database username
* Your database password

{% hint style="warning" %}
Do not use an existing TeamCal Pro or TeamCal Neo Basic database. TeamCal Neo is not compatible with those.

Do not install TeamCal Neo 6.0.0 into the database of an existing 5.x installation, unless you use a different table prefix.
{% endhint %}

## Download and copy the TeamCal Neo files

You can download the latest release from the GitHub repositories:

* [TeamCal Neo](https://github.com/glewe/teamcal-neo/releases)
* [TeamCal Neo Basic](https://github.com/glewe/teamcal-neo-basic/releases)
* [TeamCal Neo (Legacy)](https://github.com/glewe/teamcal-neo-legacy/releases)

You can run TeamCal Neo either from

* the root directory of your domain (Example: <http://www.mydomain.com>)
* a subdirectory of your domain root (Example: <http://www.mydomain.com/tcneo>)
* a subdomain root directory (Example: <http://tcneo.mydomain.com>)

Copy all files into the directory of your liking. You can either unzip the archive locally first and copy all files via FTP to your web server, or you can copy the ZIP file to your web server and unzip it with a Shell access.

## TeamCal Neo Installation

After you have created your database and copied the files, direct your browser to the URL you chose for TeamCal Neo.

TeamCal Neo will automatically display the installation page:

<figure><img src="https://3965970693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNfJcWXKLPxRBe0ACiKo%2Fuploads%2FTjom0iYois9oxhAEM0aE%2Finstallation.png?alt=media&amp;token=98282dd4-ec57-47d1-bccc-e06f43c16240" alt=""><figcaption></figcaption></figure>

Enter the database information you have written down, select the data set you want to use and confirm the license agreements.

Then click \[ Install ].

TeamCal Neo will do the rest for you.

{% hint style="info" %}
Even though the installation script is kept as generic as possible, there are environments in which you might encounter problems with it. In that case, refer to the [Manual Installation](#manual-installation) chapter below.
{% endhint %}

## After the installation

After the installation is complete, TeamCal Neo will reload. You will see the following error message:

<figure><img src="https://3965970693-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNfJcWXKLPxRBe0ACiKo%2Fuploads%2FFsNlH717HRxiCTVXpdYi%2Fteamcalneo-installation-error-768x192.jpg?alt=media&amp;token=387cdb4c-2c70-4da6-b606-f7ca60655d2a" alt=""><figcaption></figcaption></figure>

TeamCal Neo will not start if the installation script “installation.php” still exists in the TeamCal Neo directory. This is a security measure.

Rename the file to “installation.php.org” for now.

Reload TeamCal Neo and check its basic functionality.

If all is ok, you can delete the installation script file.

## Running the installation again

There might be situations when you want to run the installation again. In such a case, edit the file “config/config.app.php” and set the app\_installed parameter to 0:

```php
//=============================================================================
/**
 * APP INSTALLED
 *
 * A flag indicating whether the installation script has been executed. 
 * 0 = Not run yet
 * 1 = Was run
 * Set this to 0 if you want to run the installation.php script again.
 * If not, it is recommended that you delete the installation.php file.
 */
define('APP_INSTALLED', "0");
```

Copy the original “installation.php” from the ZIP file back to your TeamCal Neo directory on the server.

Direct your browser to the TeamCal Neo URL. The installation script will start again.

{% hint style="info" %}
If you only want to reset TeamCal Neo to the sample data, that can also be done more conveniently under ***Administration*** → ***Database Management*** → ***Database reset***
{% endhint %}

## Manual Installation

In case you are experiencing problems with the installation script, you can use the following manual steps to install TeamCal Neo.

1. Create the database you want to use
2. Import the database file. Use `sql/basic.sql` for an empty installation (administrator account only) or `sql/sample.sql` for the demo data set
3. Edit `.env` and enter the details for your database
4. Edit `config/config.app.php` and set

   ```
   define('APP_INSTALLED', "1");
   ```
5. Rename or remove the `installation.php` file
6. Navigate your browser to the `index.php` file

{% hint style="info" %}
Import the SQL file as a whole with a tool that runs the complete file (for example phpMyAdmin or `mysql < file.sql`). The file creates InnoDB tables with foreign keys and sets its own SQL mode.
{% endhint %}

{% hint style="warning" %}
The SQL files use the table prefix `tcneo_` and the installation script does not run in the manual installation, so no other prefix is applied for you. If you want a different prefix, replace `tcneo_` with your prefix in the SQL file before you import it, and enter the same prefix as `DB_PREFIX` in your `.env` file.
{% endhint %}
