Skip to content

Installation

This page guides you through self-hosting Wiwit. For local development setup, see the project's readme.

There are two ways of installing Wiwit.

Using Docker Compose

Docker pre-built images are available on GHCR.

If you haven't already, learn how to set up Docker on your machine.

Create a directory eg: ~/stacks/wiwit and create a new file docker-compose.yml with the following content.

docker-compose.yml
services:
  app:
    image: ghcr.io/wiwit-project/wiwit:main
    restart: unless-stopped
    environment:
      # Enable opcache in production
      - PHP_OPCACHE_ENABLE=1
      # Reverse proxy settings
      - ENABLE_TRUSTED_PROXY_CONFIG=true
      - TRUSTED_PROXIES=*
      # Enable auto migration and optimize
      - AUTORUN_ENABLED=true
    ports:
      - 8080:8080
    env_file:
      - stack.env
    depends_on:
      - db

  db:
    image: mysql:8
    restart: unless-stopped
    volumes:
      - db_data:/var/lib/mysql
    environment:
      MYSQL_ALLOW_EMPTY_PASSWORD: "yes"

volumes:
  db_data:

Then, create stack.env file within the same directory with the following content below.

stack.env
APP_NAME="My Wiwit"
APP_ENV=local
APP_KEY=generate_your_own_key # (1)!
APP_DEBUG=true
APP_URL=https://wiwit.your-domain.com # (2)!

APP_TIMEZONE=Asia/Kuala_Lumpur
APP_LOCALE=en
APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US

APP_MAINTENANCE_DRIVER=file

BCRYPT_ROUNDS=12

LOG_CHANNEL=stack
LOG_STACK=single
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=wiwit
DB_USERNAME=root
DB_PASSWORD=

SESSION_DRIVER=database
SESSION_LIFETIME=120
SESSION_ENCRYPT=false
SESSION_PATH=/
SESSION_DOMAIN=null

BROADCAST_CONNECTION=log
FILESYSTEM_DISK=local
QUEUE_CONNECTION=database

CACHE_STORE=database

VITE_APP_NAME="${APP_NAME}"
  1. 💡 Quickest way to generate the APP_KEY is by using this site.
  2. 💡 Setup the URL to match your deployment so swagger docs will show the correct URL.

Your stack structure should look like this:

wiwit
├── docker-compose.yml
└── stack.env

Then, start the containers by running

docker compose up -d

Open the app at http://127.0.0.1:8080.

Running from Source

This section is for those who prefer a manual setup or want to deploy the app using CloudPanel, RunCloud, etc.

Clone the project

git clone https://github.com/wiwit-project/wiwit.git

Set up the project

cd wiwit
composer setup

Set up the database connection. The file .env is automatically created from the setup process above. Please customize the database connection details. Example:

Tip

If you don't have MySQL set up yet, you can follow this article to learn how to set up MySQL using Docker.

.env
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=wiwit
DB_USERNAME=root
DB_PASSWORD=

Run database migration

php artisan migrate

Run Swagger docs generation.

php artisan scribe:generate

If you've configured the reverse proxy correctly, you can now see the app at https://wiwit.yourdomain.com/. The Swagger docs can be accessed at the /docs path.