Skip to main content

Prerequisites

Before installing Ayase Quart, ensure you have the following:
  • Python 3.12.x or 3.13.x
  • SQLite 3.35.0 or higher (check with python -c "import sqlite3; print(sqlite3.sqlite_version)")
  • A data source using the Asagi database schema (MySQL, SQLite, or PostgreSQL)
  • System packages: python3-dev, default-libmysqlclient-dev, build-essential
At least SQLite version 3.35.0 is required for moderation tools. Ayase Quart was developed against SQLite 3.47.0.

Installation steps

1

Create virtual environment and install dependencies

Create a Python virtual environment and install all required packages:
python -m venv venv
source venv/bin/activate
python -m pip install -r requirements.txt
python -m pip install .
Install system dependencies:
sudo apt update
sudo apt install python3-dev default-libmysqlclient-dev build-essential redis-server
2

Configure boards

Copy the board template and configure your desired boards:
cp ./boards.tpl.toml ./boards.toml
Edit boards.toml with your archive’s boards. Templates are provided for both 4chan and Lainchan:
boards.toml
[boards]
g = 'Technology'
a = 'Anime & Manga'
v = 'Video Games'
# Add more boards as needed
3

Configure application settings

Copy the configuration template and edit with your settings:
cp ./config.tpl.toml ./config.toml
Generate a secret key (used for CSRF, API tokens, etc.):
ayaseq prep secret
This will automatically update your config.toml with a secure secret key.
The secret key is critical for security. The ayaseq prep secret command generates a cryptographically secure key and automatically updates your configuration file.
4

Set up database connection

Edit config.toml to configure your database connection. Ayase Quart supports MySQL, SQLite, and PostgreSQL.
[db]
db_type = 'mysql'
echo = false

[db.mysql]
host = '127.0.0.1'
port = 3306
db = 'asagi'
user = 'asagi'
password = 'asagi'
minsize = 1
maxsize = 50
If you don’t have a data source yet, set up one of these archive downloaders:
5

Configure SSL certificates (optional)

If not using a reverse proxy, create SSL certificates for HTTPS access:
openssl req -newkey rsa:2048 -new -nodes -x509 -days 3650 -keyout key.pem -out cert.pem
Place cert.pem and key.pem in the current working directory.
Certificates are required for moderation features (web-based authentication) unless you set moderation.auth.cookie_secure=false in your config.
6

Set up Redis for moderation (optional)

Configure Redis for moderation bloom filtering:
# Edit Redis configuration
sudo nano /etc/redis/redis.conf
# Set line 'supervised no' to 'supervised systemd'
# Configure listening port and other settings

sudo systemctl restart redis
sudo systemctl status redis
Update your config.toml with Redis settings:
[redis]
host = "127.0.0.1"
port = 6379
max_connections = 1000
7

Generate JavaScript integrity hashes

Set HTML <script> integrity checksums for security:
ayaseq prep hashjs
This creates asset_hashes.json with SHA-384 hashes for all JavaScript files.

Optional: Full-text search setup

Ayase Quart supports multiple full-text search engines for advanced search capabilities.

Supported search engines

EngineStatusDocumentation
LNX 0.9.0Fully supported, testeddocs.lnx.rs
MeilisearchPartial supportmeilisearch.com
TypesensePartial supporttypesense.org

LNX setup example

1

Configure search engine in config.toml

[index_search]
enabled = true
highlight = false
hits_per_page = 50
max_hits = 1_000
provider = 'lnx'
host = 'http://localhost:8000'
2

Start LNX with Docker

cd index_search/lnx/
sudo docker-compose up
3

Create and populate the search index

ayaseq search index create
ayaseq search load full g v a pol
Replace g v a pol with your board shortnames.
Only LNX 0.9.0 is fully supported. Version 0.10.0 is not a completed version.

Verify installation

Check your SQLite version:
python -c "import sqlite3; print(sqlite3.sqlite_version)"
Verify your boards are configured correctly:
ayaseq prep boards

Next steps

Once installation is complete, proceed to the Quickstart guide to launch your Ayase Quart instance and start browsing your archive.

Build docs developers (and LLMs) love