---
title: "Deploy Apache Answer on Pethost in one click"
description: "Questions and answers for a community, a help center or a team, a Stack Overflow of your own. A template for Pethost: in a minute or two the app is live on your machine, with HTTPS at its own address and nightly backups."
---

[← All templates](https://pethost.dev/templates/)

# Deploy Apache Answer on Pethost in one click

Questions and answers for a community, a help center or a team, a Stack Overflow of your own

[Deploy on Pethost](https://console.pethost.dev/?template=apache-answer)

## What happens

1. You sign in to Pethost or make an account, with a passkey, GitHub or Google.
2. No machine yet? You pick a plan, and we prepare one for you. The link waits in your browser until it is ready.
3. New project opens at the app. You fill in what it asks for and click Create project: **Email**, **Admin password**.
4. In a minute or two the app is live at its own address with HTTPS. Its secrets are made for it at random, and its data is in the nightly backup.
5. It is a project like any other: its compose.yaml, its .env, its logs and a terminal are in the panel, and your agent can change it, roll it back or restore it.

## First steps

Sign in with the email and the admin password you gave (8 to 32 characters); the admin’s user name is admin. Sign-ups are confirmed by email, so add an SMTP server under Admin → Settings → SMTP before you invite people.

## What it runs

The template is this compose.yaml and the variables it writes into the project’s .env. Pethost runs the file as it is written.

```
services:
  answer:
    image: apache/answer:2.0.3
    restart: unless-stopped
    # Installed from these on the first start, with SQLite in /data: the admin is made from the
    # fields, so the install page is never open to a visitor. A password Answer would refuse stops
    # the start instead, since a refused one leaves that page open.
    entrypoint:
      - bash
      - -c
      - |
        if [ $${#ADMIN_PASSWORD} -lt 8 ] || [ $${#ADMIN_PASSWORD} -gt 32 ]; then
          echo "The admin password must be 8 to 32 characters." >&2
          exit 1
        fi
        exec /entrypoint.sh
    environment:
      AUTO_INSTALL: "true"
      DB_TYPE: sqlite3
      DB_FILE: /data/answer.db
      LANGUAGE: en-US
      SITE_NAME: Apache Answer
      SITE_URL: ${URL}
      CONTACT_EMAIL: ${ADMIN_EMAIL}
      ADMIN_NAME: admin
      ADMIN_EMAIL: ${ADMIN_EMAIL}
      ADMIN_PASSWORD: ${ADMIN_PASSWORD}
      EXTERNAL_CONTENT_DISPLAY: ask_before_display
    volumes:
      - data:/data

volumes:
  data:
```

[compose.yaml](https://pethost.dev/templates/apache-answer/compose.yaml)[See it on GitHub](https://github.com/pethost-dev/templates/tree/main/apache-answer)

Pethost · Stephan Gomer · NIP 1133096755

[Templates](https://pethost.dev/templates/) [About](https://pethost.dev/about/) [Blog](https://pethost.dev/blog/) [Terms](https://pethost.dev/terms/) [Privacy](https://pethost.dev/privacy/) [Refunds](https://pethost.dev/refunds/) [API](https://pethost.dev/docs/api/) [CLI](https://pethost.dev/docs/cli/) [Plugin](https://github.com/pethost-dev/plugin) [support@pethost.dev](mailto:support@pethost.dev)
