# Tempest guide

Source: https://docs.fortrabbit.com/guides/more/tempest
Reviewed: 2026-07-06


::CallOut{alert}
This is work in progress. We are still learning about Tempest.
::

## Get ready

You should have a [local PHP development environment](/integrations/local-development/intro) running on your local machine. Tempest requires PHP 8.5+ and Composer.

## Install Tempest locally

Follow the [official Tempest installation guide](https://tempestphp.com/3.x/getting-started/installation) to create a local Tempest project. This can be a new or existing project. To create a new project:



```shell
composer create-project tempest/app my-app
cd my-app
```

## Setup GitHub

**Optional but recommended**: To enable [git deployment](/platform/deployment/intro), init git and add GitHub as a remote repo, either as public or private. Here's how to use [GitHub CLI](/integrations/git-clients/gh-cli) to set up a local repo and connect it to GitHub:



```shell
# Setup local git repo
$ git init
$ git add -A
$ git commit -m 'Init'

# GitHub CLI to create/connect remote Git repo
$ gh repo new
# Follow the steps
# Push an existing local repository to github.com
# Add as remote and assign current branch as 'origin'
```

You can also use [SSH](/platform/code-access/ssh) / [SFTP](/platform/code-access/sftp) or [rsync](/dev/how-to/rsync) to deploy, or integrate with your existing pipelines using deploy keys.

## Create an app at fortrabbit

Create a new app in the fortrabbit dashboard. The wizard will guide you through the steps. You can connect the repo from GitHub.

:BlockLink{title="Create a new app" path="/new/app"}

The software detection wizard will likely catch that your codebase is Tempest. So root path and env vars are likely already pre-configured.

## Create signing key

Under certain conditions it might be required to set a signing key. This can be done like so:



```shell
# Login by SSH
$ ssh {{app-env-id}}@ssh.{{region}}.frbit.app

# Create the signing key
php tempest key:generate
```

The signing key can also be set via the `SIGNING_KEY` environment variable.

## Root path

If not already, set the [root path](/platform/settings/root-path) to `public` in the dashboard.

:BlockLink{title="Change the root path for {{app-env-id}}" path="/environments/{{app-env-id}}/settings/rootpath"}

## ENV vars

Tempest reads configuration from environment variables. When using MySQL, make sure the following ENV vars are set in the dashboard (likely already pre-populated):



```shell
DATABASE_HOST=${FORTRABBIT_MYSQL_HOST}
DATABASE_DATABASE=${FORTRABBIT_MYSQL_DATABASE}
DATABASE_USERNAME=${FORTRABBIT_MYSQL_USER}
DATABASE_PASSWORD=${FORTRABBIT_MYSQL_PASSWORD}
DATABASE_PORT=3306
```

:BlockLink{title="Edit ENV vars for {{app-env-id}}" path="/environments/{{app-env-id}}/env-vars/edit"}

## Database configuration

Tempest uses `SQLiteConfig` by default. To switch to MySQL, create or update `app/Config/database.config.php`:



```php
use Tempest\Database\Config\MysqlConfig;

return new MysqlConfig(
    host: env('DATABASE_HOST', '127.0.0.1'),
    port: (int) env('DATABASE_PORT', 3306),
    username: env('DATABASE_USERNAME'),
    password: env('DATABASE_PASSWORD'),
    database: env('DATABASE_DATABASE'),
);
```

Running migrations manually via SSH:



```shell
ssh {{app-env-id}}@ssh.{{region}}.frbit.app 'php tempest migrate:up'
```

## Deployment configuration

We suggest the following commands during git deployment:



```shell
# Build commands
## Install by composer
composer install --no-dev --prefer-dist --no-interaction --no-ansi --no-progress

# Post deploy commands
##  Run database migrations (with MySQL enabled)
php tempest migrate:up
```

See the Tempest docs' [deployment section](https://tempestphp.com/3.x/extra-topics/deployments) for more commands to run during deployment (discovery, …).
