Skip to content

Production Overview

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

Production Overview

This section installs KeyAnyWhere on a server, for real use, reachable over HTTPS on your own domain. This page is the map of the path: it lists the decisions to make before you start and the pages to follow, in order. Each page ends with a link to the next one.

Decide before you start

A few choices shape the rest of the installation. Make them now so you don't have to go back.

  • The domain, for example kaw.example.com, already pointing (DNS A/AAAA record) to the server. HTTPS is mandatory, and the certificate needs the domain.
  • The server: a Debian 13 machine with sudo, sized as in Requirements. The database can live on the same machine (the path below) or on another one.
  • Where the secrets are kept outside the server. The encryption key protects every stored password: if you lose it, the data cannot be read again, not even from a backup. Pick now the safe place (an offline password manager, a printed copy in a safe) where you will keep a copy of it.

The path

Follow these pages in order. Each one assumes the previous ones are done.

  1. Preparing the Server: system packages and PostgreSQL.
  2. Installing KeyAnyWhere: code and dependencies.
  3. File Permissions: who may read and write each folder.
  4. Generating Security Keys: what the three secrets protect.
  5. Environment Variables: the file with the secrets and the database access, and the kaw-cake command that runs the CakePHP CLI with it.
  6. Configuration Files: what goes in config/app_local.php, and why config/app.php is never edited.
  7. Database Setup: the tables.
  8. Insecure Password Catalog: about a million leaked passwords used to warn your users.
  9. Web Server and HTTPS: Apache, the certificate and the site.
  10. First-Run Setup: the administrator account and its second factor.

Paths used in this section

The commands use fixed paths so they can be pasted as they are. If you choose different ones, change them in every block.

Path What it holds
/var/www/keyanywhere The application (Git clone).
/var/www/keyanywhere/webroot The only folder Apache serves.
/etc/keyanywhere/keyanywhere.env Secrets and database access (environment variables).
/usr/local/bin/kaw-cake Runs the CakePHP CLI (bin/cake) with the variables above.

Next step

Preparing the Server

Clone this wiki locally