Skip to main content

Advanced Installation

Requirements

Shika has the following requirements:

  • PHP >= 8.2 (with pdo_mysql or pdo_sqlite)
  • PHP compatible web server
  • Database such as MySQL or MariaDB (unless using SQLite)

Installing

Download the latest release of Shika and extract the files to your web server folder.

Copy the .env.example file to .env and edit the database configuration.

Configuring your web server

See getting-started

Configuring your database

Shika needs a database to work, currently MySQL, MariaDB and SQLite are supported as databases.

MySQL

To use MySQL, edit the .env file in your Shika folder and set your DSN, username and password.

DB_DSN=mysql:host=localhost;dbname=shika
DB_USERNAME=username
DB_PASSWORD=password

SQLite

To use SQLite, edit the .env file and set the DSN to your database path.

DB_DSN=sqlite:/var/www/shika/data.sqlite

When using SQLite also make sure the database is writable by the www user.

chown www-data:www-data data.sqlite

Creating the data

To use Shika you must create the database tables and create a user.

Running the migrations

To create the database tables, you must run the migrate command.

php bin/migrate

This will run all migrations and create the tables.

Creating your first user

There are no standard users, you can create your first user by running the adduser command.

php bin/adduser

Follow the instructions in the command line and enter your username and password.