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:
git clone https://github.com/ADamCarraway/journalphp.git
cd journalphp
cp .env.example .envAdd the local domains to /etc/hosts (on Windows, to C:\Windows\System32\drivers\etc\hosts):
echo "127.0.0.1 journalphp.test adminer.journalphp.test" | sudo tee -a /etc/hostsStart the containers:
docker compose up -d --buildThe 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
meilisearchprofile
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:
| Password | |
|---|---|
admin@mail.com | password |
Production
The production environment is described in docker-compose.prod.yml and Dockerfile.prod.
Preparing .env
git clone https://github.com/ADamCarraway/journalphp.git
cd journalphp
cp .env.example .envFill in .env:
| Variable | Value |
|---|---|
APP_ENV | production |
APP_DEBUG | false |
APP_URL | site address, for example https://example.com |
DB_PASSWORD | database password, required |
REVERB_APP_ID, REVERB_APP_KEY, REVERB_APP_SECRET | arbitrary unique values |
REVERB_HOST | site domain |
FORCE_HTTPS | true if the site runs over HTTPS |
Other variables are described in Configuration.
Build and start
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -dNginx 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 and set up email. Then change the super administrator's email and password in Settings → Basic: a change requires a code from an email. After that, set up sign-in methods and other integrations — see Admin panel.