Skip to content

How to install JournalPHP ​

Installation brings up JournalPHP in Docker: locally for development or on a server for production.

Check the system requirements before installing.

Local environment ​

Clone the repository and create .env from the example:

bash
git clone https://github.com/ADamCarraway/journalphp.git
cd journalphp
cp .env.example .env

Add the local domains to /etc/hosts (on Windows, to C:\Windows\System32\drivers\etc\hosts):

bash
echo "127.0.0.1 journalphp.test adminer.journalphp.test" | sudo tee -a /etc/hosts

Start the containers:

bash
docker compose up -d --build

The first start takes a few minutes. The site opens at http://journalphp.test. Other service addresses are listed in Service URLs.

Containers ​

  • app: PHP-FPM, Horizon, task scheduler, Reverb
  • frontend: Vite dev server
  • nginx: web server
  • db: MySQL
  • redis: cache, sessions, queues
  • adminer: database web interface
  • meilisearch: search engine, starts only with the meilisearch profile

Seed data ​

On the first start, the database is filled with seed data: roles, platform settings, a comment bot, a reaction set, report reasons, automatic restriction rules, badges, a subscription with plans and features, and the super administrator account:

EmailPassword
admin@mail.compassword

Production ​

The production environment is described in docker-compose.prod.yml and Dockerfile.prod.

Preparing .env ​

bash
git clone https://github.com/ADamCarraway/journalphp.git
cd journalphp
cp .env.example .env

Fill in .env:

VariableValue
APP_ENVproduction
APP_DEBUGfalse
APP_URLsite address, for example https://example.com
DB_PASSWORDdatabase password, required
REVERB_APP_ID, REVERB_APP_KEY, REVERB_APP_SECRETarbitrary unique values
REVERB_HOSTsite domain
FORCE_HTTPStrue if the site runs over HTTPS

Other variables are described in Configuration.

Build and start ​

bash
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d

Nginx in Docker listens on 127.0.0.1:8080; ports 80 and 443 are served by the reverse proxy on the host. An example of its configuration with a certbot certificate is docker/nginx/host-ssl.example.conf; installation steps are in the comments at the top of the file.

After installation ​

Sign in as the super administrator, change the password and set up email, sign-in methods and other integrations — see Admin panel.

Released under the MIT License.