Skip to content

Installing KeyAnyWhere

Arthu Santiago edited this page Nov 30, 2026 · 1 revision

Installing KeyAnyWhere

This page downloads the code of a released version into /var/www/keyanywhere and installs its PHP dependencies, without the development tools. Using Git for this is the recommended way: an upgrade then becomes a git checkout of the new version.

Before you start

The server must be ready as in Preparing the Server.

1. Create the application folder

The code belongs to your own login user, and the group www-data (Apache) can only read it. This way the web server can't change the application's code, even if it is compromised. This step creates the folder with that ownership.

sudo mkdir -p /var/www/keyanywhere
sudo chown "$USER":www-data /var/www/keyanywhere

2. Download the code

This step clones the repository and switches to the latest released version. The list of versions and their release notes are on the Releases page.

git clone https://github.com/arthusantiago/KeyAnyWhere.git /var/www/keyanywhere
cd /var/www/keyanywhere
git checkout "$(git describe --tags --abbrev=0 "$(git rev-list --tags --max-count=1)")"

Check which version you are on:

git describe --tags

3. Install the dependencies

--no-dev leaves out the development tools (tests, code analysis), and --optimize-autoloader makes class loading faster.

composer install --no-dev --optimize-autoloader --no-interaction

At the end, Composer copies the Bootstrap files into webroot/. With --no-dev it does nothing else: it doesn't create config/app_local.php, which production doesn't need (see Configuration Files).

4. Check that it worked

Composer can confirm that this server's PHP meets every requirement of the installed dependencies. The application itself can't start yet: it refuses to run without its secrets, which come in the next pages.

composer check-platform-reqs --no-dev

Every line should end in success.

Alternative: install with Composer

KeyAnyWhere is also published on Packagist, so composer create-project can download a version without Git. Upgrades are then harder (you replace the folder by hand), which is why this wiki uses Git. If you prefer it anyway, this command replaces steps 2 and 3:

composer create-project --no-dev --no-interaction arthusantiago/keyanywhere /var/www/keyanywhere

Next step

File Permissions

Clone this wiki locally