### Run UXWizz installer Source: https://docs.uxwizz.com/installation/setup-uxwizz-server/ubuntu-20.04 Download and run the UXWizz installer. Answer prompts for installation type, public hostname, and license. Installs to /var/www/uxwizz and creates the local database and user. ```bash curl -fsSL https://www.uxwizz.com/install.sh | sudo bash ``` -------------------------------- ### MariaDB Configuration Example Source: https://docs.uxwizz.com/installation/optimization-tips/mysql-mariadb Example configuration settings for an 8 GB database-focused MariaDB server. These values are a starting point to measure, not a traffic guarantee. ```APIDOC ## MariaDB Configuration Example ### Description Example [mysqld] settings for an 8 GB database-focused MariaDB server. Adjust based on server memory and traffic. ### Configuration File [mysqld] innodb_buffer_pool_size = 5600M innodb_log_file_size = 1400M innodb_file_per_table = 1 innodb_flush_log_at_trx_commit = 1 max_connections = 100 max_allowed_packet = 64M ### Notes - For servers also running Apache/PHP, reduce the buffer pool to fit measured total memory use. - Back up the active configuration before editing. - Edit the MariaDB server option file (commonly /etc/mysql/mariadb.conf.d/50-server.cnf on Ubuntu). - Restart MariaDB during a maintenance window. - Check error log, memory use, and effective values afterward. ``` -------------------------------- ### Inspect and run UXWizz installer script Source: https://docs.uxwizz.com/installation/setup-uxwizz-server/ubuntu-20.04 Download the installer script to a file, inspect it with less, then run it with sudo. Use this alternative to review the script before executing. ```bash curl -fsSLo uxwizz-install.sh https://www.uxwizz.com/install.sh less uxwizz-install.sh sudo bash uxwizz-install.sh ``` -------------------------------- ### Open UXWizz setup page Source: https://docs.uxwizz.com/installation/docker/via-docker-compose Open the setup page in a browser using your hostname. Ensure HTTPS works before entering passwords. ```plaintext https://stats.example.com/server/install.php ``` -------------------------------- ### MariaDB configuration example for 8 GB server Source: https://docs.uxwizz.com/installation/optimization-tips/mysql-mariadb Configuration example for an 8 GB database-focused MariaDB server. These values are a starting point to measure, not a traffic guarantee. For a server that also runs Apache/PHP, reduce the buffer pool to fit the measured total memory use. Back up the active configuration, edit the MariaDB server option file (commonly /etc/mysql/mariadb.conf.d/50-server.cnf on Ubuntu), then restart MariaDB during a maintenance window. ```ini [mysqld] innodb_buffer_pool_size = 5600M innodb_log_file_size = 1400M innodb_file_per_table = 1 innodb_flush_log_at_trx_commit = 1 max_connections = 100 max_allowed_packet = 64M ``` -------------------------------- ### Create install.env for unattended trial installation Source: https://docs.uxwizz.com/installation/setup-uxwizz-server/ubuntu-20.04 Creates a private environment file with umask 077 to set non-interactive trial installation variables. Replace the hostname with your actual server name. Keep this file private and outside the web root. ```bash umask 077 cat > install.env <<'EOF' UXWIZZ_NONINTERACTIVE=1 UXWIZZ_VARIANT=trial UXWIZZ_SERVER_NAME=stats.example.com EOF ``` -------------------------------- ### Manual Apache setup with protected environment file Source: https://docs.uxwizz.com/guides/environment-settings Manual Apache setup for servers not configured by install.sh. Create a protected environment file, add settings, configure Apache to read it via a systemd override, and pass variables to PHP with PassEnv. Restart only after configtest succeeds. ```bash sudo install -d -m 0700 /etc/uxwizz sudo touch /etc/uxwizz/uxwizz.env sudo chmod 0600 /etc/uxwizz/uxwizz.env sudoedit /etc/uxwizz/uxwizz.env ``` ```bash UXWIZZ_DISABLE_AI_CHAT=1 ``` ```ini [Service] EnvironmentFile=/etc/uxwizz/uxwizz.env ``` ```apache PassEnv UXWIZZ_DISABLE_AI_CHAT ``` ```bash sudo systemctl daemon-reload sudo apache2ctl configtest sudo systemctl restart apache2 ``` -------------------------------- ### Run unattended UXWizz installer with environment file Source: https://docs.uxwizz.com/installation/setup-uxwizz-server/ubuntu-20.04 Runs the UXWizz installer non-interactively by sourcing the install.env file. Ensure the installer script is downloaded and inspected first. The environment file must remain private. ```bash sudo bash -c 'set -a; source ./install.env; set +a; exec bash ./uxwizz-install.sh' ``` -------------------------------- ### Validate and start Compose services Source: https://docs.uxwizz.com/installation/docker/via-docker-compose Validates the Compose configuration, starts the services, and lists running containers after switching to a bind mount. ```bash docker compose config --quiet docker compose up -d docker compose ps ``` -------------------------------- ### Install Certbot and request SSL certificate Source: https://docs.uxwizz.com/installation/setup-uxwizz-server/ubuntu-20.04 Use these commands on a server receiving web traffic directly. Replace stats.example.com with your hostname. The first command installs Certbot and the Apache plugin, the second requests a certificate and configures HTTPS with a redirect, and the third tests certificate renewal. ```bash sudo apt install -y certbot python3-certbot-apache sudo certbot --apache --redirect -d stats.example.com sudo certbot renew --dry-run ``` -------------------------------- ### Copy existing installation from container Source: https://docs.uxwizz.com/installation/docker/via-docker-compose Copies files from the stopped web container into a new host folder for an existing installation. Use the existing container's files, including configuration and installed marker; do not seed from a clean image. ```bash mkdir ./html && docker compose stop webserver scheduler && webserver=$(docker compose ps --all --quiet webserver) && test -n "$webserver" && docker cp "$webserver":/var/www/html/. ./html && test -f ./html/server/install.php && test -f ./html/.htaccess ``` -------------------------------- ### Install curl and ca-certificates Source: https://docs.uxwizz.com/installation/setup-uxwizz-server/ubuntu-20.04 Update package lists and install curl and ca-certificates, required for the UXWizz installer. Run this if curl is missing on the server. ```bash sudo apt update sudo apt install -y curl ca-certificates ``` -------------------------------- ### Create empty application folder Source: https://docs.uxwizz.com/installation/docker/via-docker-compose Creates an empty application folder for a new installation. On first startup, the webserver image copies the application into this empty bind mount. ```bash mkdir ./html ``` -------------------------------- ### Edit /etc/uxwizz/uxwizz.env and restart Apache Source: https://docs.uxwizz.com/guides/environment-settings Steps to change a setting in the protected environment file created by the Linux installer. Edit the file with sudoedit, add the setting (e.g., UXWIZZ_DISABLE_AI_CHAT=1), then restart Apache to load the change. The task services read the file on their next start. ```bash sudoedit /etc/uxwizz/uxwizz.env ``` ```bash UXWIZZ_DISABLE_AI_CHAT=1 ``` ```bash sudo systemctl restart apache2 ``` -------------------------------- ### Get visitor paths to pricing page Source: https://docs.uxwizz.com/guides/database-querying Shows up to ten session paths through the first matching pageview, grouped by session (not person). Replace the example domain and page match. GROUP_CONCAT can truncate long paths at the database's configured limit; review query cost on a copy before running it across a large history. ```sql SELECT p.clientid AS session_id, GROUP_CONCAT(p.page ORDER BY p.id SEPARATOR ' -> ') AS path FROM ust_clientpage AS p JOIN ust_clients AS s ON s.id = p.clientid WHERE s.domain = 'example.com' AND p.id <= ( SELECT MIN(first_pricing.id) FROM ust_clientpage AS first_pricing WHERE first_pricing.clientid = p.clientid AND first_pricing.page LIKE '%pricing%' ) GROUP BY p.clientid ORDER BY p.clientid DESC LIMIT 10; ``` -------------------------------- ### Download and run MySQLTuner-perl in a dedicated directory Source: https://docs.uxwizz.com/installation/optimization-tips/mysql-mariadb Use these commands to set up a dedicated directory and download MySQLTuner-perl along with its required data files. After downloading, review the script with 'less' before running it with 'perl'. Avoid putting database passwords in the command line; use the interactive prompt or a protected client configuration instead. ```bash mkdir mysqltuner cd mysqltuner curl -fSLO https://raw.githubusercontent.com/major/MySQLTuner-perl/master/mysqltuner.pl curl -fSLO https://raw.githubusercontent.com/major/MySQLTuner-perl/master/basic_passwords.txt curl -fSLO https://raw.githubusercontent.com/major/MySQLTuner-perl/master/vulnerabilities.csv less mysqltuner.pl perl mysqltuner.pl ``` -------------------------------- ### Copy PHP settings and Apache site from temporary container Source: https://docs.uxwizz.com/installation/docker/via-docker-compose Creates host directories and copies the default PHP settings and Apache site from a temporary, unstarted uxwizz webserver container into them. Use this before adding bind mounts to the webserver service. ```bash mkdir ./php-config ./sites-enabled ./apache_logs && seed=$(docker create uxwizz/uxwizz-webserver:10) && docker cp "$seed":/usr/local/etc/php/conf.d/uxwizz.ini ./php-config/uxwizz.ini && docker cp "$seed":/etc/apache2/sites-available/000-default.conf ./sites-enabled/000-default.conf && docker rm -v "$seed" ``` -------------------------------- ### Apache AllowOverride for UXWizz directory Source: https://docs.uxwizz.com/guides/troubleshooting/dashboard/refreshing-dashboard-sub-page-leads-to-404-error Apache configuration block to enable .htaccess overrides for the UXWizz installation directory. Required for older UXWizz versions (before 5.0.0) that use path-based routing with URL rewrites. Apply only to the specific installation directory, not globally. ```apache AllowOverride All ``` -------------------------------- ### Inspect UXWizz container status and logs Source: https://docs.uxwizz.com/installation/docker/standalone-docker-image Checks startup messages without changing the installation. The first command lists the container by name, and the second shows the last 100 log lines. Use these to inspect the container before troubleshooting database or permission errors. ```bash docker ps --filter name=uxwizz docker logs --tail 100 uxwizz ``` -------------------------------- ### Validate and start services Source: https://docs.uxwizz.com/installation/docker/via-docker-compose Validates the Compose configuration, starts the services in detached mode, and lists their status. The config --quiet command checks for missing settings without printing secrets. All three services should be running and the database should show healthy. ```bash docker compose config --quiet docker compose up -d docker compose ps --format 'table {{.Service}}\t{{.Status}}' ``` -------------------------------- ### Cron entries for manual Linux installation Source: https://docs.uxwizz.com/installation/optimization-tips/auto-delete-old-data-cron-jobs Add these entries to the PHP service user's crontab for a manual Linux installation with file-based database settings. Replace /var/www/html with the real application path. The PHP CLI user must be able to write server/cron/log.txt. ```cron */5 * * * * /bin/bash /var/www/html/server/cron/ust_run_scheduled_tasks.sh five_minute 0 * * * * /bin/bash /var/www/html/server/cron/ust_run_scheduled_tasks.sh hourly ``` -------------------------------- ### Configure .env for UXWizz hostname Source: https://docs.uxwizz.com/installation/docker/via-docker-compose Add these lines to your .env file to set the public server URL and trust proxy. Replace stats.example.com with your hostname. ```plaintext UXWIZZ_PUBLIC_SERVER_URL=https://stats.example.com/server UXWIZZ_TRUST_PROXY=1 ``` -------------------------------- ### Basic query: select sessions by domain Source: https://docs.uxwizz.com/guides/database-querying Retrieves the most recent 100 sessions for a specific domain. Use a read-only account and replace 'example.com' with your actual domain. Keep database passwords out of commands and saved query files. ```sql SELECT id, domain, first_date, last_date FROM ust_clients WHERE domain = 'example.com' ORDER BY id DESC LIMIT 100; ``` -------------------------------- ### CSP frame-ancestors directive example Source: https://docs.uxwizz.com/guides/troubleshooting/dashboard/website-iframe-not-loading-x-frame-options A scoped frame-ancestors directive that allows your own site and your dashboard. Replace the example origin with your dashboard's scheme, hostname, and port if nonstandard. Preserve other directives in the website's Content Security Policy; do not replace a complete policy with this one directive or add a second conflicting policy. ```http frame-ancestors 'self' https://analytics.example.com; ```