Install
Install the liqx extension, upload Sworen, configure your web server and run the setup wizard.
1. Install the liqx extension
Section titled “1. Install the liqx extension”Sworen renders its storefront with liqx, a compiled PHP extension. It also carries the license check, so the store does not run without it.
Pick the right file. Releases are named liqx-php<PHP version>-<CPU>-<libc>.so. Find the three parts on your server:
php -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;'uname -mldd --version 2>&1 | head -1- PHP version:
8.4givesphp8.4. - CPU:
x86_64givesx86_64;aarch64orarm64givesaarch64. - libc: if the last line mentions
musl, usemusl; otherwisegnu.
A typical Ubuntu server with PHP 8.4 needs liqx-php8.4-x86_64-gnu.so. Check it against SHA256SUMS from the same release:
sha256sum -c SHA256SUMS --ignore-missingOn Alpine (musl), install libgcc first: apk add libgcc.
Load it for every PHP that runs Sworen, the command line and PHP-FPM (they often read different php.ini files):
EXT_DIR=$(php -r 'echo ini_get("extension_dir");')sudo cp liqx-php8.4-x86_64-gnu.so "$EXT_DIR/liqx.so"
# Debian/Ubuntu:echo "extension=liqx.so" | sudo tee /etc/php/8.4/mods-available/liqx.inisudo phpenmod liqxsudo systemctl restart php8.4-fpm
# Elsewhere: add extension=liqx.so to each php.ini that `php --ini` lists.Check it: php -m | grep liqx prints liqx.
2. Upload Sworen
Section titled “2. Upload Sworen”Unzip the release in the directory you will serve from (/var/www/sworen below). It already contains everything it needs: no composer or npm on the server. The web server’s PHP user must own it, because the installer writes its configuration and the store writes uploads:
sudo unzip sworen-*.zip -d /var/www && sudo chown -R www-data:www-data /var/www/sworenWith MySQL or MariaDB, create a user for the store. The installer can create the database itself:
CREATE USER 'sworen'@'localhost' IDENTIFIED BY '<a strong password>';GRANT ALL PRIVILEGES ON `sworen`.* TO 'sworen'@'localhost';3. Configure the web server
Section titled “3. Configure the web server”Serve public/ and send every request that isn’t a file to public/index.php. With nginx and PHP-FPM:
server { server_name shop.example.ma www.shop.example.ma; root /var/www/sworen/public; index index.php;
location / { try_files $uri /index.php$is_args$args; }
location ~ \.php$ { include fastcgi_params; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; fastcgi_pass unix:/run/php/php8.4-fpm.sock; }}Add HTTPS, for example with certbot --nginx.
4. Run the setup wizard
Section titled “4. Run the setup wizard”Open your domain in a browser. A fresh copy sends every page to /install:
- Setup key: proves you own the server. Read it with
cat /var/www/sworen/var/install.key. - Requirements: PHP extensions, the liqx extension, writable folders and the license server. Anything red says how to fix it.
- Database: MySQL/MariaDB (name, user, password, host, port) or SQLite. Tested before you continue.
- Cache and mail: files or Redis, and an SMTP server for email (or none yet). Both tested.
- Store: store name, address (the domain your license is for), currency, your admin email and password, an optional license key, and an optional demo catalog.
The wizard creates the tables, the store and your account, and starts the free trial (or activates your key). After that, /install is gone. Your admin is at /admin.
From the command line
Section titled “From the command line”The same installer runs without a browser:
sudo -u www-data php bin/obelisk install --url=https://shop.example.ma --store-name="My Shop" \ --owner-email=me@example.ma --db-user=sworen --db-password=… [--demo]Next: set up the scheduled tasks.
