### Install and Start Apache Web Server (CentOS 8) Source: https://docs.filerun.com/centos_8_-_apache_php_7_do=login Installs the Apache web server package, starts the service, and enables it to launch on boot. This is a prerequisite for hosting web applications like FileRun. It ensures the web server is running and accessible. ```bash sudo yum install httpd ``` ```bash sudo systemctl start httpd.service ``` ```bash sudo systemctl enable httpd.service ``` -------------------------------- ### Install and Secure MariaDB Server on CentOS 8 Source: https://docs.filerun.com/doku_id=centos_8_-_apache_php_7 Installs the MariaDB server, starts the service, and secures the installation by setting a root password and removing insecure defaults. Enables MariaDB to start on boot. ```bash sudo yum install mariadb-server sudo systemctl start mariadb sudo mysql_secure_installation sudo systemctl enable mariadb.service ``` -------------------------------- ### Install and Secure MariaDB Database Server (CentOS 8) Source: https://docs.filerun.com/centos_8_-_apache_php_7_do=login Installs the MariaDB database server, starts the service, and secures the installation by setting a root password and removing default insecure settings. It also includes steps to create a database and user for FileRun. ```bash sudo yum install mariadb-server ``` ```bash sudo systemctl start mariadb ``` ```bash sudo mysql_secure_installation ``` ```bash sudo systemctl enable mariadb.service ``` ```bash mysql -u root -p ``` ```mysql CREATE DATABASE filerun; ``` ```mysql GRANT ALL ON filerun.* to 'filerun'@'localhost' IDENTIFIED BY 'YOUR-DB-PASSWORD'; ``` ```mysql FLUSH PRIVILEGES; ``` ```mysql exit ``` -------------------------------- ### Start FileRun Docker Compose Service Source: https://docs.filerun.com/docker-arm This command initiates the FileRun services defined in the docker-compose.yml file in detached mode. It requires Docker and docker-compose to be installed and configured. ```bash docker-compose up -d ``` -------------------------------- ### Set MariaDB Root Password Prompt Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login Example of the interactive prompt for setting the MariaDB root password during the mysql_secure_installation process. ```text Enter current password for root (enter for none): OK, successfully used password, moving on... Setting the root password ensures that nobody can log into the MariaDB root user without the proper authorization. Set root password? [Y/n] y New password: PASSWORD Re-enter new password: PASSWORD Password updated successfully! Reloading privilege tables.. ... Success! ``` -------------------------------- ### Install Apache Tika (Command Line) Source: https://docs.filerun.com/file_indexing Instructions for downloading and setting up Apache Tika in command-line mode for text extraction from various file types. Requires Java support on the server. The tika-app jar file is used. ```bash # 1. Download the tika-app-[*].jar file from: https://tika.apache.org/download.html # 2. Set the path to the downloaded tika-app-[*].jar file inside FileRun's control panel. ``` -------------------------------- ### FileRun API Quick Start Source: https://docs.filerun.com/doku_id=api&rev=1744536694 Provides resources for getting started with the FileRun API, including a PHP client library, a Postman collection, and a link to the OpenAPI specification. ```APIDOC ## Quick Start ### Resources * **FileRun PHP API Client Library:** [https://github.com/filerun/api-client](https://github.com/filerun/api-client) * **Postman Project:** [https://www.getpostman.com/collections/91f11cb5e48e56986887](https://www.getpostman.com/collections/91f11cb5e48e56986887) * **FileRun Demo:** [https://filerun.com/demo](https://filerun.com/demo) * **Swagger/OpenAPI Specification:** [https://app.swaggerhub.com/apis-docs/filerun/api/1.0.0](https://app.swaggerhub.com/apis-docs/filerun/api/1.0.0) ``` -------------------------------- ### Configure NGINX for FileRun PHP Source: https://docs.filerun.com/install_on_php This is an example NGINX configuration snippet for enabling PHP to run FileRun. It ensures that PHP files are processed correctly by the PHP-FPM service. ```nginx location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } ``` -------------------------------- ### Verify ionCube Installation with phpinfo() Source: https://docs.filerun.com/synology_dsm_-_web_station Steps to create a PHP file that outputs all information about the PHP environment, including loaded extensions. This is used to verify if the ionCube loader is successfully installed and enabled by checking the phpinfo() output. ```shell sudo vim /volume1/web/info.php ``` ```php ``` ```shell sudo chmod 755 info.php ``` -------------------------------- ### Install Nginx Web Server Source: https://docs.filerun.com/doku_id=install-ubuntu-20-ngnix&rev=1755955632 Installs the Nginx web server, which is used to serve web content and can act as a reverse proxy or caching server. It also includes commands to enable Nginx to start on boot and start the service immediately. ```bash sudo apt install nginx sudo systemctl enable nginx sudo systemctl start nginx ``` -------------------------------- ### Example FileRun Version and PHP Requirement Source: https://docs.filerun.com/php7_do=login This snippet shows an example of how a FileRun version relates to a specific PHP requirement. For instance, FileRun version 2016.11.07 requires a PHP 7 compatible installation package, named like 'FileRun_2016_11_07_PHP7.zip'. ```text FileRun version: 2016.11.07 Required installation package: FileRun_2016_11_07_PHP7.zip ``` -------------------------------- ### Update Yum Repositories for PHP Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login Commands to install EPEL and yum-utils, and then add the Remi repository for CentOS 7 to enable installation of newer PHP versions. ```bash sudo yum install epel-release yum-utils sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm ``` -------------------------------- ### NGINX PHP Example Configuration for FileRun Source: https://docs.filerun.com/doku_id=install_on_php&rev=1696512447 Provides an example NGINX configuration for serving PHP applications, specifically tailored for FileRun. This snippet is useful for users setting up a web server environment to host FileRun and ensure proper PHP execution. ```nginx location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php/php7.4-fpm.sock; # Adjust to your PHP-FPM socket fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } ``` -------------------------------- ### Install Docker on Synology DSM Source: https://docs.filerun.com/doku_id=synology_dsm_-_docker&rev=1755955494 This section describes how to install the Docker package on a Synology DiskStation Manager (DSM) through the Package Center. No specific code is shown, but it guides the user through the Synology DSM interface. ```text 1. Open Synology DSM in your browser. 2. Open the Package Center app. 3. Search for 'Docker' and install the package. ``` -------------------------------- ### Configure ionCube Loader in PHP Source: https://docs.filerun.com/synology_dsm_-_web_station Command to create and edit a custom PHP configuration file to specify the path to the ionCube loader extension. This ensures PHP can load the extension upon startup. The example uses vim for editing and specifies the path for PHP 7.4. ```shell sudo vim /run/php-fpm/conf.d/filerun.ini ``` ```ini zend_extension = /usr/local/lib/php74/modules/ioncube/ioncube_loader_lin_7.4.so ``` -------------------------------- ### Create PHP Info File Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Creates a simple PHP file named 'info.php' in the web server's root directory. This file will execute the phpinfo() function to display PHP configuration details, useful for verifying ionCube installation. ```bash sudo vim /volume1/web/info.php ``` -------------------------------- ### Install FileRun Application Source: https://docs.filerun.com/synology_dsm_-_web_station Commands to download and extract the FileRun application archive. It includes changing the directory to the web server's root, removing any default index file, downloading the zip archive, and extracting its contents using 7z. It also sets correct ownership for the data directory. ```shell cd /volume1/web/ ``` ```shell rm index.html ``` ```shell sudo 7z x FileRun.zip ``` ```shell sudo chown http:http -R system/data/ ``` -------------------------------- ### Install and Start Apache Web Server on CentOS 8 Source: https://docs.filerun.com/centos_8_-_apache_php_7 Installs the Apache web server package and starts the service. It also enables Apache to start automatically on system boot. This is a prerequisite for hosting web applications like FileRun. ```bash sudo yum install httpd sudo systemctl start httpd.service sudo systemctl enable httpd.service ``` -------------------------------- ### Install FileRun Application Files Source: https://docs.filerun.com/centos_8_-_apache_php_7_do=login Commands to download, extract, and set ownership for FileRun application files. This involves unzipping the archive and ensuring the web server has correct permissions for the data directory. ```bash unzip FileRun.zip sudo chown -R apache:apache system/data ``` -------------------------------- ### Extract and Prepare FileRun Installation Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login Extracts the FileRun installation zip archive, removes the archive, and adjusts folder permissions for the data directory. This step makes FileRun files accessible and writable by the webserver. ```bash sudo unzip FileRun.zip ``` ```bash sudo rm FileRun.zip ``` ```bash sudo chown -R apache:apache system/data/ ``` ```bash sudo chcon -t httpd_sys_rw_content_t -R system/data ``` -------------------------------- ### Install MariaDB Database Server Source: https://docs.filerun.com/doku_id=install-ubuntu-20-ngnix&rev=1755955632 Installs the MariaDB server and client packages, a popular open-source relational database management system. It also covers enabling MariaDB to start on boot and initiating the post-installation security script. ```bash sudo apt install mariadb-server mariadb-client sudo systemctl start mariadb sudo systemctl enable mariadb sudo mysql_secure_installation ``` -------------------------------- ### Install PHP 7.4 and PHP-FPM Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login Commands to install PHP version 7.4 and the PHP-FPM (FastCGI Process Manager) package. ```bash sudo yum install php-fpm php ``` -------------------------------- ### Start Apache Tika Server Source: https://docs.filerun.com/file_indexing Instructions for downloading and running Apache Tika in server mode. This mode generally improves indexing speed. Requires Java support. The tika-server jar file is used, and it runs on a specified port (default 9998). ```bash # 1. Download the tika-server-[*].jar file from: https://tika.apache.org/download.html # 2. Start up the server: java -jar tika-server-[*].jar # 3. Set the hostname and port number (default 9998) of the Tika server in FileRun. ``` -------------------------------- ### Download ionCube Loaders (64-bit Intel) Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Downloads the ionCube loaders for 64-bit Intel CPUs. This command requires sudo privileges and an active internet connection. Ensure you select the correct loader for your system's architecture. ```bash sudo wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz ``` -------------------------------- ### Example Paths for ImageMagick and convert (FileRun) Source: https://docs.filerun.com/doku_id=imagemagick&rev=1688910553 This lists example paths for ImageMagick's 'magick.exe' on Windows and the 'convert' utility on Linux. These paths are used within FileRun's control panel to specify the location of the image processing executables for thumbnail and preview generation. Ensure these paths are correctly set in FileRun's configuration. ```text Windows servers: C:/ImageMagick/magick.exe Windows servers: "C:/Program Files/ImageMagick/magick.exe" (Using double-quotes because of the space character in the path) Linux servers: /usr/bin/convert ``` -------------------------------- ### Create PHP Info File to Check ionCube Installation Source: https://docs.filerun.com/ioncube This snippet shows how to create a simple PHP file to display your PHP configuration details. Checking the output of this file is the primary method to determine if the ionCube extension is installed and active. ```php ``` -------------------------------- ### Download ionCube Loaders (32-bit Intel) Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Downloads the ionCube loaders for 32-bit Intel CPUs. This command requires sudo privileges and an active internet connection. Ensure you select the correct loader for your system's architecture. ```bash sudo wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz ``` -------------------------------- ### Install and Start MariaDB Server on CentOS 7 Source: https://docs.filerun.com/centos_7_-_apache_php_7 Installs the MariaDB server and client packages. It then starts the MariaDB service, which will be used to manage the FileRun database. This step is crucial for database-driven applications. ```bash sudo yum install mariadb-server mariadb sudo systemctl start mariadb ``` -------------------------------- ### Configure MariaDB 10 Repository Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login Creates a new repository configuration file for MariaDB 10 using the `vim` editor. This step is necessary to install a compatible version of MariaDB for FileRun if the default CentOS repositories provide an older version. Ensure `vim` is installed before proceeding. ```bash sudo vim /etc/yum.repos.d/MariaDB10.repo ``` -------------------------------- ### Download ionCube Loaders (64-bit ARM) Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Downloads the ionCube loaders for 64-bit ARM CPUs. This command requires sudo privileges and an active internet connection. Ensure you select the correct loader for your system's architecture. ```bash sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_aarch64.tar.gz ``` -------------------------------- ### Install and Start MariaDB Server on CentOS 8 Source: https://docs.filerun.com/centos_8_-_apache_php_7 Installs the MariaDB database server and starts the service. MariaDB will be used to store FileRun's application settings, user data, and file information. It also enables MariaDB to start on boot. ```bash sudo yum install mariadb-server sudo systemctl start mariadb sudo systemctl enable mariadb.service ``` -------------------------------- ### Download ionCube Loaders (32-bit ARM) Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Downloads the ionCube loaders for 32-bit ARM CPUs. This command requires sudo privileges and an active internet connection. Ensure you select the correct loader for your system's architecture. ```bash sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_armv7l.tar.gz ``` -------------------------------- ### Create Custom PHP Configuration File Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Creates a new PHP configuration file using the vim editor. This file will specify the path to the ionCube loader extension. ```bash sudo vim /run/php-fpm/conf.d/filerun.ini ``` -------------------------------- ### Set MariaDB Root Password Source: https://docs.filerun.com/doku_id=centos_7_-_apache_php_7 Demonstrates the interactive process of setting a new password for the MariaDB root user during the security setup. It involves entering the current password (or leaving blank if none) and then setting a new password. ```text Enter current password for root (enter for none): OK, successfully used password, moving on... Set root password? [Y/n] y New password: PASSWORD Re-enter new password: PASSWORD Password updated successfully! Reloading privilege tables.. ... Success! ``` -------------------------------- ### Install and Configure davfs2 for Linux Source: https://docs.filerun.com/doku_id=webdav&rev=1752735506 Commands to install the davfs2 package on Debian/Ubuntu-based systems, reconfigure it for normal user access, and add users to the davfs2 group for mounting FileRun shares. ```bash sudo apt-get install davfs2 ``` ```bash sudo dpkg-reconfigure davfs2 ``` ```bash sudo usermod -aG davfs2 ``` -------------------------------- ### Launch MySQL/MariaDB Docker Container Source: https://docs.filerun.com/synology_dsm_-_docker_do=login This section guides users through launching a MySQL/MariaDB Docker container on Synology DSM. It covers setting the container name to 'db', configuring advanced settings, defining a volume for data persistence, and setting environment variables for database credentials and name. ```bash # Example of environment variables (not directly executable in this context, but illustrates configuration) # MYSQL_ROOT_PASSWORD=filerun # MYSQL_USER=filerun # MYSQL_PASSWORD=filerun # MYSQL_DATABASE=filerun ``` -------------------------------- ### Create FileRun Database in MariaDB Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login SQL command to create a new database named 'filerun' for the FileRun application. ```sql CREATE DATABASE filerun; ``` -------------------------------- ### Navigate to Web Directory (Shell) Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 This command changes the current directory to the web server's root directory, typically where web applications are installed. It's a common first step in deploying web applications via SSH. ```bash cd /volume1/web/ ``` -------------------------------- ### File Paths for User Home Folders in FileRun Source: https://docs.filerun.com/doku_id=admin_guide&rev=1719469014 Example file paths illustrating how to configure home folders for regular users, administrators, and superusers to manage file access within FileRun. Ensures proper separation and access levels. ```text User A's home folder: /storage/files/users/user_a/ User B's home folder: /storage/files/users/user_b/ Admin's home folder: /storage/files/users/ Superuser's home folder: /storage/files/ ``` -------------------------------- ### FileRun Docker Compose Configuration for ARM Source: https://docs.filerun.com/docker-arm This YAML configuration defines the services for FileRun and its MariaDB database using Docker. It specifies images suitable for ARM CPUs, environment variables for database and application setup, and volume mappings for persistent data storage. Ensure the specified host paths in 'volumes' are created and accessible. ```yaml version: '2' services: db: image: tobi312/rpi-mariadb environment: MYSQL_ROOT_PASSWORD: your_mysql_root_password MYSQL_USER: your_mysql_username MYSQL_PASSWORD: your_mysql_password MYSQL_DATABASE: your_mysql_database PUID: 1000 PGID: 1000 TZ: Europe/London volumes: - /filerun/db:/var/lib/mysql web: image: filerun/filerun:arm32v7 environment: FR_DB_HOST: db FR_DB_PORT: 3306 FR_DB_NAME: your_mysql_database FR_DB_USER: your_mysql_username FR_DB_PASS: your_mysql_password APACHE_RUN_USER: pi APACHE_RUN_USER_ID: 1000 APACHE_RUN_GROUP: pi APACHE_RUN_GROUP_ID: 1000 depends_on: - db links: - db:db ports: - "80:80" volumes: - /filerun/html:/var/www/html - /filerun/user-files:/user-files ``` -------------------------------- ### Configure MariaDB Repository Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login This snippet shows how to configure the MariaDB repository on CentOS 7 for installing the MariaDB server. It involves adding a repository definition file. ```ini [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.1/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 ``` -------------------------------- ### Change Directory to PHP Modules Path Source: https://docs.filerun.com/synology_dsm_-_web_station Shell command to navigate to the directory where PHP extensions are typically stored. This is a preliminary step before downloading and installing the ionCube extension. ```shell cd /usr/local/lib/php74/modules ``` -------------------------------- ### Enable PHP 7.4 Remi Repository Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login Command to enable the PHP 7.4 specific repository from Remi's collection. ```bash sudo yum-config-manager --enable remi-php74 ``` -------------------------------- ### Download ionCube Loaders for Different Architectures Source: https://docs.filerun.com/synology_dsm_-_web_station Commands to download the appropriate ionCube Loader archive based on the Synology device's CPU architecture (Intel 64-bit, Intel 32-bit, ARM 32-bit, ARM 64-bit). These commands use wget to fetch the compressed tarball from ionCube's download servers. ```shell sudo wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz ``` ```shell sudo wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.tar.gz ``` ```shell sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_armv7l.tar.gz ``` ```shell sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_aarch64.tar.gz ``` -------------------------------- ### File Replacement and Data Migration Steps Source: https://docs.filerun.com/php7_do=login This outlines the core steps for replacing FileRun application files and migrating user data when upgrading PHP. It involves backing up the current installation, extracting new files, and carefully moving the data directory from the old installation to the new one. ```bash # Example file path for FileRun installation FILERUN_PATH="/www/filerun/" # 1. Backup current installation (manual step recommended) # cp -r ${FILERUN_PATH} ${FILERUN_PATH}.bak # 2. Create an old data directory mkdir ${FILERUN_PATH}@old # 3. Move existing files to @old directory # mv ${FILERUN_PATH}* ${FILERUN_PATH}@old/ # 4. Extract new FileRun archive into the FILERUN_PATH # unzip /path/to/FileRun_*.zip -d ${FILERUN_PATH} # 5. Rename the default data folder (not needed) # mv ${FILERUN_PATH}system/data ${FILERUN_PATH}system/_data_default # 6. Move the old data folder to the new system directory # mv ${FILERUN_PATH}@old/system/data ${FILERUN_PATH}system/ # 7. Clean up old installation files after verification # rm -rf ${FILERUN_PATH}@old ``` -------------------------------- ### Restart Apache and PHP-FPM Services Source: https://docs.filerun.com/centos_7_-_apache_php_7_do=login Restarts the Apache and PHP-FPM services to apply the configuration changes made during the FileRun installation. This ensures that all new settings are active. ```bash sudo systemctl restart httpd.service ``` ```bash sudo systemctl restart php-fpm.service ``` -------------------------------- ### PHP Configuration File Setup - FileRun Source: https://docs.filerun.com/doku_id=advanced_configuration&rev=1756110306 This snippet demonstrates the basic structure for setting up the PHP configuration file for FileRun. It specifies that the file must start with ''. This file allows for advanced configuration options not available in the control panel. ```php ``` -------------------------------- ### Download FileRun Docker Image Source: https://docs.filerun.com/doku_id=synology_dsm_-_docker&rev=1755955494 Instructions for downloading the FileRun Docker image from Docker Hub. This involves searching the registry or providing a direct URL if the image is not found. ```shell docker pull filerun/filerun ``` -------------------------------- ### Configure FileRun PHP Settings Source: https://docs.filerun.com/centos_8_-_apache_php_7_do=login Creates and populates a PHP configuration file (01_filerun.ini) with settings recommended for FileRun. This includes memory limits, execution times, error reporting, and session configurations. ```ini expose_php = Off error_reporting = E_ALL & ~E_NOTICE display_errors = Off display_startup_errors = Off log_errors = On ignore_repeated_errors = Off allow_url_fopen = On allow_url_include = Off variables_order = "GPCS" allow_webdav_methods = On memory_limit = 128M max_execution_time = 300 output_buffering = Off output_handler = "" zlib.output_compression = Off zlib.output_handler = "" safe_mode = Off register_globals = Off magic_quotes_gpc = Off upload_max_filesize = 20M post_max_size = 20M enable_dl = Off disable_functions = "" disable_classes = "" session.save_handler = files session.use_cookies = 1 session.use_only_cookies = 1 session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_httponly = 1 date.timezone = "UTC" zend_extension = /usr/lib64/php/modules/ioncube/ioncube_loader_lin_7.4.so ``` -------------------------------- ### Start FileRun Docker Containers Source: https://docs.filerun.com/docker-tika Command to start all services defined in the docker-compose.yml file in detached mode. This command should be run after the docker-compose.yml file is created and directories are set up. ```bash docker compose up -d ``` -------------------------------- ### Docker Compose Setup for FileRun Source: https://docs.filerun.com/docker-tika_do=login This snippet defines the services required to run FileRun with Docker, including a MariaDB database, the FileRun web application, Tika for document parsing, and Elasticsearch for full-text search. Ensure Docker and Docker Compose are installed and that the necessary volumes are configured. ```yaml version: '2' services: db: image: mariadb:10.1 environment: MYSQL_ROOT_PASSWORD: your_mysql_root_password MYSQL_USER: your_filerun_username MYSQL_PASSWORD: your_filerun_password MYSQL_DATABASE: your_filerun_database volumes: - /filerun/db:/var/lib/mysql web: image: filerun/filerun:8.1 environment: FR_DB_HOST: db FR_DB_PORT: 3306 FR_DB_NAME: your_filerun_database FR_DB_USER: your_filerun_username FR_DB_PASS: your_filerun_password APACHE_RUN_USER: www-data APACHE_RUN_USER_ID: 33 APACHE_RUN_GROUP: www-data APACHE_RUN_GROUP_ID: 33 depends_on: - db links: - db - tika - elasticsearch ports: - "80:80" volumes: - /filerun/html:/var/www/html - /filerun/user-files:/user-files tika: image: logicalspark/docker-tikaserver elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.17.24 container_name: elasticsearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true ``` -------------------------------- ### File Paths for User Home Folders in FileRun Source: https://docs.filerun.com/admin_guide_do=login Examples demonstrating how to configure user home folders in FileRun to manage file access. It highlights the importance of distinct paths for different users and the implications for admin and superuser access. ```text User A's home folder: /storage/files/users/user_a/ User B's home folder: /storage/files/users/user_b/ Admin's home folder: /storage/files/users/ (The admin can access all the users files) Superuser's home folder: /storage/files/ (The superuser can access even folders one level higher - to store files which other admin users cannot access) ``` -------------------------------- ### Installing and Configuring ionCube Loader for PHP Source: https://docs.filerun.com/ubuntu_20_-_apache This section details the manual installation of the ionCube PHP loader, which is often required by PHP applications like FileRun. It involves downloading the loader, extracting it to the PHP extension directory, and creating a configuration file to enable the extension. ```bash sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz sudo tar -xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/lib/php ``` ```ini zend_extension = /usr/lib/php/ioncube/ioncube_loader_lin_7.4.so ``` -------------------------------- ### Add MariaDB User Account Source: https://docs.filerun.com/synology_dsm_-_web_station This section describes the process of adding a new user account in MariaDB using phpMyAdmin. It involves specifying a username, host, password, and granting privileges, including the creation of a database with the same name as the user. ```sql -- This is a conceptual representation, actual steps are via phpMyAdmin GUI. -- Example SQL command that would achieve this: CREATE USER 'filerun'@'localhost' IDENTIFIED BY 'your_password'; GRANT ALL PRIVILEGES ON filerun.* TO 'filerun'@'localhost'; FLUSH PRIVILEGES; ``` -------------------------------- ### Configure PHP General Settings Source: https://docs.filerun.com/php_configuration These are recommended general PHP settings for FileRun, including open_basedir for file access control, enabling URL fopen wrappers, and setting memory limits. Ensure paths in open_basedir are correctly specified. 'UTC' should be replaced with your server's timezone. ```ini open_basedir = "/path-to-filerun:/path-to-user-files/" allow_url_fopen = On allow_url_include = Off variables_order = "GPCS" allow_webdav_methods = On memory_limit = 128M max_execution_time = 300 output_buffering = Off output_handler = "" zlib.output_compression = Off zlib.output_handler = "" safe_mode = Off register_globals = Off magic_quotes_gpc = Off date.timezone = "UTC" ``` -------------------------------- ### Mount FileRun on Linux via Command Line (WebDAV) Source: https://docs.filerun.com/webdav_do=login This snippet details the process of mounting FileRun as a WebDAV share on Linux systems. It involves installing davfs2, configuring user access, editing fstab, setting up credentials, and mounting the share. It also includes solutions for 'Resource temporarily unavailable' and certificate warnings. ```shell sudo apt-get install davfs2 ``` ```shell sudo dpkg-reconfigure davfs2 ``` ```shell sudo usermod -aG davfs2 ``` ```shell your-site.com/filerun/dav.php/ /home//filerun davfs user,rw,noauto 0 0 ``` ```shell mkdir ~/.davfs2 ``` ```shell your-site.com/filerun/dav.php/ ``` ```shell chmod 600 ~/.davfs2/secrets ``` ```shell mount ~/filerun ``` ```shell use_locks 0 ``` ```shell echo "y" | mount ~/filerun > /dev/null 2>&1 ``` -------------------------------- ### WebDAV URL Formats for FileRun Source: https://docs.filerun.com/webdav_do=login These examples demonstrate the correct URL formats required to connect to FileRun's WebDAV service. The first URL is for general WebDAV access, while the second is specifically for the Nextcloud desktop sync client. ```url https://demo.filerun.com/dav.php/ ``` ```url https://demo.filerun.com ``` -------------------------------- ### Configuring FileRun Access URL Source: https://docs.filerun.com/doku_id=synology_dsm_-_docker&rev=1755955494 FileRun can be accessed via a custom URL, specifying a local port. This example shows how to access FileRun using the URL http://nas:888, where 'nas' is the hostname of your NAS and '888' is the custom port configured in the Docker settings. ```text http://nas:888 ``` -------------------------------- ### PHP Configuration for Windows Servers Source: https://docs.filerun.com/php_configuration These settings are recommended for PHP configuration on Windows servers to avoid issues during FileRun updates. Ensure these are set in your `php.ini` file. ```php [CURL] fastcgi.impersonate = 0 cgi.fix_pathinfo = 1 ``` -------------------------------- ### FileRun PHP API Client Library Integration Source: https://docs.filerun.com/api This snippet provides instructions for PHP developers on how to integrate with the FileRun API using a provided client library. It guides users through authentication and setup steps. ```markdown 1. Read the Authorization section below to understand the requirements. 2. Follow “Adding a new client application” 3. Download and use the FileRun PHP API Client library: https://github.com/filerun/api-client ``` -------------------------------- ### Configure NGINX for FileRun X-Accel Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Configures NGINX on Synology DSM to enable the X-Accel feature for more efficient file downloads from FileRun. This involves editing the nginx_default_server.mustache file and restarting NGINX. ```bash sudo vim /volume/@appstore/WebStation/misc/nginx_default_server.mustache ``` ```nginx location /volume { internal; root /; } ``` ```bash sudo synoservicecfg --restart nginx ``` -------------------------------- ### Extract ionCube Loaders Archive Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Extracts the downloaded ionCube loaders archive. The asterisk wildcard ensures it works with any version number in the filename. Requires sudo privileges. ```bash sudo tar xvfz ioncube_loaders_lin_*.tar.gz ``` -------------------------------- ### Restart PHP 7.4 Service (SysVinit) Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Restarts the PHP 7.4 service using the synoservicectl command, typically used in older DSM versions. This ensures PHP recognizes the ionCube extension. ```bash sudo synoservicectl -restart pkgctl-PHP7.4 ``` -------------------------------- ### Default FileRun Login Credentials Source: https://docs.filerun.com/doku_id=synology_dsm_-_docker&rev=1755955494 Upon initial setup, FileRun provides default credentials for the superuser account. It is crucial to change these credentials immediately after the first login for security purposes. ```text Username: superuser Password: superuser ``` -------------------------------- ### Install Ghostscript from Source (Bash) Source: https://docs.filerun.com/doku_id=imagemagick&rev=1688910553 This snippet provides the bash commands to download, extract, configure, and install the latest version of Ghostscript from its source code. It's recommended to use the latest version due to security vulnerabilities in older releases. This process requires build tools and development libraries to be installed on the system. ```bash wget https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs9561/ghostscript-9.56.1.tar.gz tar xvf ghostscript-9.56.1.tar.gz cd ghostscript-9.56.1 ./configure make install ``` -------------------------------- ### Change Directory for PHP Modules Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Navigates to the directory where PHP extensions are typically stored on a Synology system. This is a prerequisite for downloading and extracting ionCube loaders. ```bash cd /usr/local/lib/php74/modules ``` -------------------------------- ### IIS web.config for FileRun Source: https://docs.filerun.com/doku_id=troubleshooting&rev=1706640089 This is an example configuration for IIS to serve WOFF2 files correctly, which is often a cause for missing icons and fonts in FileRun installations on Windows Servers running IIS. It should be placed in the FileRun root folder. ```xml ``` -------------------------------- ### Configure Firewall for HTTP and HTTPS Access Source: https://docs.filerun.com/doku_id=centos_8_-_apache_php_7 These commands configure the system's firewall to allow incoming HTTP and HTTPS traffic. This ensures that FileRun is accessible from web browsers over the network. ```shell firewall-cmd --permanent --zone=public --add-service=http firewall-cmd --permanent --zone=public --add-service=https firewall-cmd --reload ``` -------------------------------- ### Restart PHP 7.4 Service (Systemd) Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Restarts the PHP 7.4 service using the systemd command. This is necessary for the new ionCube extension to be loaded by PHP. ```bash sudo synosystemctl restart pkgctl-PHP7.4 ``` -------------------------------- ### Create FileRun Docker Compose File (YAML) Source: https://docs.filerun.com/docker_do=login This snippet shows the basic structure of the 'docker-compose.yml' file for setting up FileRun. It defines the 'db' service using a MariaDB image. Users should adjust settings as needed for their environment. Ensure Docker is installed prior to using this file. ```yaml services: db: image: mariadb:10.1 ``` -------------------------------- ### Download and Prepare FileRun Application Source: https://docs.filerun.com/doku_id=debian_11_-_lamp&rev=1719476083 This snippet shows how to unzip the FileRun installation archive into the web root directory. It also includes instructions for installing the 'unzip' utility if it's not already present and setting the correct ownership and permissions for the FileRun system data directory. ```shell sudo unzip FileRun.zip -d /var/www/html/filerun/ sudo apt-get install unzip sudo chown -R www-data:www-data /var/www/html/filerun/system/data ``` -------------------------------- ### Set Permissions for PHP Info File Source: https://docs.filerun.com/doku_id=synology_dsm_-_web_station&rev=1755955536 Sets execute permissions for the 'info.php' file, making it accessible to the web server. This is a security best practice to ensure the file can be read but not improperly modified. ```bash sudo chmod 755 info.php ``` -------------------------------- ### Enabling PHP Error Logging Source: https://docs.filerun.com/php_configuration This snippet shows how to display PHP information to find the `php.ini` file path and the settings to enable error display and logging. Changes require a web server restart. ```php mysqldump --add-drop-table -h localhost -u mysqlusername -p databasename -c > filerun.backup.sql ``` -------------------------------- ### Troubleshooting Source: https://docs.filerun.com/api_do=login Guidance on common issues and how to resolve them, particularly related to API access. ```APIDOC ## Troubleshooting This section provides solutions for common problems encountered when using the FileRun API. ### Check the "access_token" Parameter Ensure that the `access_token` parameter is correctly included in your API requests. An invalid or missing `access_token` is a frequent cause of authorization errors. ``` -------------------------------- ### Docker Compose Configuration for FileRun Source: https://docs.filerun.com/doku_id=docker-tika&rev=1728922524 Defines the services required to run FileRun in Docker, including the database (MariaDB), the FileRun web application, Tika for document analysis, and Elasticsearch for full-text search. This configuration is essential for a self-hosted FileRun instance with advanced search functionality. ```yaml version: '2' services: db: image: mariadb:10.1 environment: MYSQL_ROOT_PASSWORD: your_mysql_root_password MYSQL_USER: your_filerun_username MYSQL_PASSWORD: your_filerun_password MYSQL_DATABASE: your_filerun_database volumes: - /filerun/db:/var/lib/mysql web: image: filerun/filerun:8.1 environment: FR_DB_HOST: db FR_DB_PORT: 3306 FR_DB_NAME: your_filerun_database FR_DB_USER: your_filerun_username FR_DB_PASS: your_filerun_password APACHE_RUN_USER: www-data APACHE_RUN_USER_ID: 33 APACHE_RUN_GROUP: www-data APACHE_RUN_GROUP_ID: 33 depends_on: - db links: - db - tika - elasticsearch ports: - "80:80" volumes: - /filerun/html:/var/www/html - /filerun/user-files:/user-files tika: image: logicalspark/docker-tikaserver elasticsearch: image: docker.elastic.co/elasticsearch/elasticsearch:7.17.24 container_name: elasticsearch environment: - cluster.name=docker-cluster - bootstrap.memory_lock=true ``` -------------------------------- ### Install FFmpeg for Video Thumbnail Generation Source: https://docs.filerun.com/ubuntu_20_-_apache Installs the FFmpeg package using apt-get. FFmpeg is a comprehensive solution for handling multimedia data and is used by FileRun to generate thumbnails and previews for video files. ```bash sudo apt-get install ffmpeg ``` -------------------------------- ### Install PHP Extensions for FileRun Source: https://docs.filerun.com/ubuntu_20_-_apache_do=login Installs the required PHP modules for FileRun using the apt package manager. It also covers downloading, extracting, and configuring the ionCube loader, a crucial component for FileRun's operation. The ionCube loader is placed in the appropriate PHP directory and enabled via a configuration file. ```bash sudo apt-get install php-mbstring php-zip php-curl php-gd php-ldap php-xml php-imagick php-mysql ``` ```bash sudo wget https://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64.tar.gz ``` ```bash sudo tar -xzf ioncube_loaders_lin_x86-64.tar.gz -C /usr/lib/php ``` ```bash sudo vim /etc/php/7.4/apache2/conf.d/00-ioncube.ini # Paste the following line into the file: zend_extension = /usr/lib/php/ioncube/ioncube_loader_lin_7.4.so ``` -------------------------------- ### Get Docker User and Group IDs via SSH Source: https://docs.filerun.com/doku_id=synology_dsm_-_docker&rev=1755955494 Connect to your Synology device via SSH to retrieve the user ID (uid) and group ID (gid) for the 'docker' user and group. These IDs are essential for correctly setting environment variables in Docker containers. ```bash id docker ``` -------------------------------- ### Install PHP 7.4 and PHP-FPM Source: https://docs.filerun.com/centos_8_-_apache_php_7 Enables the PHP 7.4 module and installs PHP-FPM on CentOS 8. This is the initial step to get a newer PHP version running on the system. ```bash sudo yum module enable php:7.4 sudo yum install php-fpm ```