---
title: "Install on Your Own Hosting | Knock, knock, AI!"
description: "Upload a folder (FTP works too), click through the setup steps, cron is optional. What you need, what each step does, and what to check when it stalls."
url: "https://knockknock-ai.app/install/"
lang: "en"
published: 2026-11-08T00:00:00+01:00
updated: 2026-11-12T00:00:00+01:00
---

# Install on Your Own Hosting

You upload a folder, open its address and click through seven steps in the browser (six without cron or with uploaded log files). Plan on about a quarter of an hour. One clock to watch: you must create the account within 60 minutes of the first opening.

<a class="btn-primary" href="/download/knock-knock-ai.zip">Download Knock, knock, AI!</a> Version 0.5.2, a ZIP file of 1.8 MB.

## What you need

- PHP 8.2 or newer
- PHP extensions: json, hash, zlib, session, pcre
- write permission in the app folder
- preferably cron in your hosting panel (the app does not set it up, it shows you what to enter); when the hosting has no cron, you choose "Without cron" and count the data with the button "Recalculate now"
- access to the access log file of the server (the app reads it directly, or cron copies it, or the app fetches it over SFTP or FTP), or log files that you download from your hosting panel and upload in the app by hand
- HTTPS on the app's address (recommended: over plain http the panel password travels in clear text)

The app reads Apache and nginx logs, plain or gzip. It uses no database and needs no program on your computer.

The PHP extension `sodium` is optional. Without it SFTP and FTP are not available (the app says so on the screen), copying by cron remains, and updating with a button in the panel does not work.

## Installing over FTP

A short path for someone who has only an FTP client (for example FileZilla) and the panel of the hosting.

1. Download the zip ([knock-knock-ai.zip](https://knockknock-ai.app/download/knock-knock-ai.zip)), unpack it and upload the whole folder `knock-ai/` to the server of your domain with the FTP client.
2. Open the address of the folder in a browser, for example `https://yourdomain.com/knock-ai/`. The app creates the data folder `data-...` by itself.
3. Account: enter a login, a password (at least 12 characters) and the language. You have 60 minutes.
4. Server: check the domain and the detected hosting. The app also tests whether the data folder is closed to the internet.
5. Logs: under the heading choose "From the server", "FTP or SFTP" or "I upload files". "From the server" works when the app can read the log on its own server. When it cannot and there is no cron to copy the log (or cron has no access to it), choose "FTP or SFTP", enter the server, port, login, password and the path of the log, and click "Check the connection". Best use a separate account that can only read the logs. When neither is possible, choose "I upload files" and upload the log files that you download from the panel of your hosting.
6. Cron: next to "Running" choose "Cron" (enter the task from this step in the panel of your hosting) or "Without cron" (when the hosting has no cron). With uploaded files there is no choice and no task.
7. Check: with cron the page shows "It works!" by itself. Without cron (and always with uploaded files) click "Recalculate now", and "It works!" appears when the logs are found.
8. Schedule: only with cron. Change the task to the final one, 6:17 and 18:17. Without cron or with uploaded files this step is skipped.
9. Domains: choose the main domain and whether to collect the other domains of the log. The setup ends here.

## Step by step

Without cron (and with uploaded files) the setup has six steps, because the Schedule step is skipped; the details are in the section "Without cron" below.

**Before step 1: upload.** Put the app folder `knock-ai/` on your domain's server and open its address. Installations already placed in a folder named `knock-knock-ai` keep working unchanged. The app creates a data folder named `data-` plus 24 hex characters and closes it to the internet. If the 60 minutes run out, delete that `data-...` folder and open the address again.

**1. Account.** Choose a login of 1 to 64 characters, a password of at least 12 characters and a language. A countdown above the form shows the time you have left.

**2. Server.** The app fetches a test file from its data folder and warns you when the folder is open from the internet. On nginx `.htaccess` does not work. The random folder name protects the data there, and the app shows a ready snippet of nginx configuration when it finds the folder open.

**3. Logs.** The app first looks for the log in the known places by itself. When it can read it, you see "We found the log and read it directly". Otherwise you enter the full path of the log file, and the app tries to read it: it reads it directly, or records that a cron job will copy it, or says there is no such file. Not sure of the path? The step gives you a ready message to send to your hosting. Under the heading there is a switch "From the server" / "FTP or SFTP" / "I upload files". When the app cannot read the log on its own server and there is no cron to copy it, you choose "FTP or SFTP" and enter the data of an SFTP or FTP account. When neither is possible, you choose "I upload files" and upload the log files downloaded from the panel of your hosting (see "Uploading log files" below).

**4. Cron.** Next to "Running" you choose "Cron" or "Without cron". With cron you enter in your hosting panel a task that calls the app every minute (a test). With copying by cron, the script first copies the log into the app folder. When cron only has to call the app, you choose between the command and "URL only" (it also fits an external cron service that calls the address). The app writes the script `knock-cron.sh` itself. In your hosting panel you point only at that script. Hosting panels reject long commands, so this keeps the line short. The step shows the field values for lh.pl, cPanel, DirectAdmin and other hosting (a crontab line), matched to your account. With uploaded files there is no choice and no task: cron is not needed.

If the Hour field refuses `6,18`, make two jobs instead: hour 6 and hour 18, minute 17. Delete the old job. The app cannot see your hosting panel, so the "Done, changed" button only records that you say you did it.

**5. Check.** With cron the step asks your server every 5 seconds and shows "It works!" once cron has run and the logs are there (read, copied or downloaded). Without cron (and always with uploaded files) you click "Recalculate now", and "It works!" appears when the logs are found. When the copy or the download failed, the step says so in one sentence and offers a button to fix it.

**6. Schedule.** Only with cron. The target is every day at 6:17 and 18:17. Without cron or with uploaded files the step is skipped. After each cron call the app recalculates at most once every 15 minutes.

**7. Domains.** A new installation collects only the main domain. The field "Also collect other domains" collects the visits of all domains from one log, and you switch between them in the panel. The limit is 200 other domains.

When you finish, the status page shows the last recalculation, the files the app reads, the last cron call, the state of the last download (for SFTP and FTP) and your settings (the way of fetching the log with the link "Change", the log path, the main domain, the cron script), with the buttons "Go to the panel" and "Recalculate now". With uploaded files it also has the section "Upload new log files". Until the first bot visit arrives, that status page is the home screen.

## Five ways to get the log

The Logs step chooses one way (the switch "From the server" gives direct reading or copying by cron, "FTP or SFTP" gives downloading, "I upload files" gives uploading by hand), and you can change it later on the status page (the row "Way of fetching", the link "Change"). Your hosting's cron is the schedule for every way, unless you choose "Without cron" or "I upload files" (then cron is not needed).

| Way | How it works |
|---|---|
| Direct reading | The app opens the log file itself. Nothing is copied, and cron only calls the app. The app tries this way first. |
| Copy by cron | The cron script copies the log into the data folder and calls the app. |
| SFTP | The app fetches the log from your hosting account at every cron call. The connection is always encrypted. |
| FTP | The same over FTP. The app tries TLS encryption first. FTP without encryption is possible only after you tick "I understand the risk". |
| Uploading files | You download the log files from the panel of your hosting and upload them in the app. The app connects to no server with the logs and needs no password for it. For hosting with no cron and no FTP or SFTP access. The data are counted only from what you upload. |

For SFTP and FTP we recommend a separate account for reading only: set the folder with the logs as its starting folder and, if your hosting panel allows it, give it read access only. The password you save is stored encrypted on your server.

## Uploading log files

When the hosting has no cron and no FTP or SFTP, but the logs can be downloaded from its panel, choose "I upload files" in the Logs step. The app then connects to no server.

1. **Where to get the file.** In the panel of your hosting find the access logs of your domain and download them to your computer. The app takes plain `.log` files and packed `.gz` files, and recognizes the format by the content, not by the name.
2. **Uploading.** Choose one file or several at once and click "Upload files". The first accepted file saves the way "I upload files" and completes the Logs step. The list shows every file with its size and recognized format, or with the reason it was refused. A file that does not look like a log is refused and leaves nothing behind.
3. **Next.** The Cron step has no choice and no task, and in the Check step you click "Recalculate now". The Schedule step is skipped.
4. **More files later.** The status page has a section "Upload new log files" with the same form. Upload the new files and click "Recalculate now". The same rows uploaded a second time do not double the visits. With another way new files are not accepted: first choose "I upload files" in the Logs step.

**Limits.** The server sets the biggest file and the number of files at once, and the app adds a ceiling of its own: 200 MB a file and 20 files at once. The screen shows the current limit. A `.gz` file is several times smaller than the plain log, so a bigger log fits once packed.

**Tidiness on the server.** Uploaded files lie in the data folder (closed to the internet) under names the app makes itself. A file that was read to the end is deleted after 14 days. The visits from it are already stored and do not depend on the file. Nothing from these files goes to `api.adinspire.com`.

**How often.** With uploads the data come only from the files you upload, so you decide how often to send them. Visits from a period whose file you do not upload do not show up in the panel.

## Without cron

When the hosting has no cron, in the Cron step choose the button "Without cron" next to "Running".

1. The app then shows no task table, only a warning: the data are counted only when you click "Recalculate now".
2. In the Check step you click "Recalculate now". The app reads the logs at once and shows "It works!" when it finds them.
3. The Schedule step is skipped, and the setup ends at Domains.
4. Later you recalculate with the same button "Recalculate now" on the status page. The row "Running" then shows "without cron (the button Recalculate now)".

Limits:

- The hosting usually keeps the logs for 7 days, so recalculate at least once a week. The visits from older logs are lost.
- "Without cron" cannot be chosen with the way "copy by cron" (cron copies the log then). In the Logs step choose "FTP or SFTP" when the app cannot read the log on its own server, or "I upload files" when there is no FTP or SFTP either.
- An alternative: an external cron service that calls the address of the app. Choose "Cron" and "URL only" in the Cron step.

## When something does not work

| What you see | What to check |
|---|---|
| The app cannot write | Write permission in the app folder |
| "Time for setup is over" page | The 60 minutes have passed. Delete the `data-...` folder and open the address again |
| Several `data-...` folders | There must be exactly one. Keep one and delete the rest |
| No signal after 3 minutes | The interpreter in the cron job, and a typo in the script path |
| The cron job ran, but there are no logs | It depends on the way. Copy: "no such file" is a wrong path (correct it in the Logs step), "no right to read" is a hosting that does not let cron read the log (fetch it over SFTP or FTP). Download: the screen gives the reason (the server does not answer, the login was rejected, no files in the given folder) and the button "Correct the connection data" |
| A red alarm about a key or certificate on the status page | The download is stopped, so that nobody can pose as your server. Ask your hosting whether it changed the keys or certificates. Accept the new key only if it did. If the hosting changed nothing, do not accept |
| A run ends and saves nothing | More than 5% of the first 500 log lines did not match the format. The app needs 95% readable lines |
| Some log files wait | A run has a budget of 45 seconds at most. Files it ran out of time for wait for the next run |
| The Domains step shows no domains | The log format is not recognised, there are no rows, or the log has no domain names. Go back to the Logs step |
| No panel yet | Normal until the first bot visit, the status page stands in. Use "Recalculate now" there |

## Where next

<a class="btn-secondary" href="/docs/bots/">Read how verification works</a>
<a class="btn-secondary" href="/docs/freshness/">Read about page versions</a>
<a class="btn-secondary" href="/docs/">Read the documentation</a>

