Start Answer

There are multiple ways to start Answer, you can choose the one that suits you best.

Docker compose

We recommend using Docker Compose to run Answer. This is the easiest way to get started with Answer.

If you are using Docker Desktop on Windows or Mac, docker-compose is already included. If you are using Linux, you will need to install docker-compose separately.

  1. curl -fsSL https://raw.githubusercontent.com/apache/incubator-answer/main/docker-compose.yaml | docker compose -p answer -f - up

The default port for Answer is 9080. You can access it at http://localhost:9080.

Docker

You can find all the available Docker images on Docker Hub. The latest tag refers to the latest stable version of Answer.

  1. docker run -d -p 9080:80 -v answer-data:/data --name answer apache/answer:latest

After running the command, heading to http://localhost:9080/install to continue installation.

If you can’t access the installation page, you can use the command docker logs answer to view the logs. It may help you find the specific problem.

Binary

As a golang project, Answer can be compiled into a binary file. You can download the binary file that matches your operating system from the release page.

  1. INSTALL_PORT=80 ./answer init -C ./answer-data/

After running the command, heading to http://localhost:80/install to continue installation.

Follow the Install Steps to complete the installation. After that run the following command to start the answer again.

  1. ./answer run -C ./answer-data/

You can specify the port on which to start the installation by specifying the environment variable INSTALL_PORT, default is 80.

We use -C flag to indicate the directory where saved answer data.

Install steps

After you start the answer, you can follow the steps below to complete the initialization about the basic configuration.

Step 1: Choose the language

install-choose-language

Step 2: Config database

Answer supports MySQL, PostgreSQL, and SQLite as the database backend. The smallest environment is SQLite, which does not require any additional configuration. If you want to use MySQL or PostgreSQL, you need to setup the database first and then configure the database connection in this step. Here we recommend using sqlite3 to complete your first experience.

install-database

Step 3: Create configuration file

Click Next button to create the configuration file.

install-create-config-file

Step 4: Fill in basic information

Site URL is the browser address you will use to access answers after installation.
Don’t forget the admin Email and password.

install-site-info

Step 5: Complete

Congratulations, you can click the done button to start your answer journey!

install-complete