Creating and Running a FacturaScripts Project with ServBay
FacturaScripts is a powerful and flexible open-source ERP (Enterprise Resource Planning) and CRM (Customer Relationship Management) solution, ideal for small to medium-sized businesses and freelancers. With ServBay's hassle-free local web development environment, you can easily create, test, and run FacturaScripts projects on macOS or Windows without complicated configuration.
This guide provides a step-by-step walkthrough for installing and configuring FacturaScripts locally using ServBay.
Overview of FacturaScripts
FacturaScripts, developed with PHP and the Bootstrap framework, is open-source ERP and CRM software designed to help businesses manage their core processes, including:
- Invoicing and management
- Accounting
- Inventory control
- Customer and vendor management
- Project management
- And much more with modules and plugins...
As an active open-source project, FacturaScripts boasts strong community support and allows users to extend and customize functionality via plugins to suit diverse business needs.
Key Features and Benefits of FacturaScripts
- Open Source and Free: Use, modify, and distribute without paying hefty license fees.
- Comprehensive Functionality: Covers most essential operations for daily business of SMEs, offering an all-in-one solution.
- User-Friendly: Intuitive and streamlined UI for a gentle learning curve.
- Highly Extensible: Rich plugin marketplace and open API for easy feature expansion or integration with other services.
- Cross-Platform Access: Web-based application; accessible from any device with a modern browser.
- Active Community: Get support and advice from a global developer community.
- Multi-Language Support: Interfaces available in multiple languages for users worldwide.
Advantages of Running FacturaScripts with ServBay
ServBay is a local web development environment designed for developers, providing the perfect platform to run PHP applications like FacturaScripts. It wraps all the necessary components including Apache/Nginx web servers, multiple PHP versions, MySQL/MariaDB/PostgreSQL databases, and tools like Redis — all managed through an intuitive GUI.
Major benefits and steps to running FacturaScripts locally with ServBay include:
- Integrated Environment: ServBay comes pre-installed and configured with all required components (web server, PHP, database) for FacturaScripts, saving you from manual installation and setup.
- Version Management: Easily switch between different PHP versions for compatibility testing or specific FacturaScripts requirements.
- Database Management: Built-in tools like phpMyAdmin or Adminer simplify database and user creation for FacturaScripts.
- Streamlined Site Configuration: Quickly create local sites and configure domain, root directory, web server, and PHP version from ServBay's interface.
- Automated Hosts Management: ServBay automatically updates your local Hosts file, enabling you to access your local site via custom domains (e.g.,
facturascripts.servbay.demo
). - SSL Support: Configure SSL/HTTPS for your local site using built-in User CA or public ACME services for production-like testing.
The essential steps to run FacturaScripts in ServBay are:
- Download FacturaScripts source code.
- Create a project folder in ServBay's site root directory.
- Set up a MySQL database and user for FacturaScripts.
- Configure your web server (Apache or Nginx) in ServBay to point to the project directory.
- Check and enable required PHP extensions.
- Access your local domain in a browser and complete the FacturaScripts installation wizard.
Prerequisites
Before you get started, make sure you meet the following requirements:
- ServBay is installed, running, and updated on your macOS or Windows system. Download the latest version from the ServBay official website.
- The core ServBay packages (selected web server: Apache or Nginx, chosen PHP version, and MySQL or MariaDB database) are active and running from ServBay's interface.
- You have basic understanding of web development and database concepts.
Creating a FacturaScripts Project (Using the ZIP Package)
This is one of the fastest and most common ways to install FacturaScripts in your local environment.
Download FacturaScripts:
- Visit the FacturaScripts official download page at https://facturascripts.com/descargar.
- Find the latest stable
.zip
package and download it to your Mac.
Create Project Directory:
- Open Finder and navigate to ServBay's local site root directory, which is
/Applications/ServBay/www/
by default and recommended. - Within this folder, create a new folder for your FacturaScripts project, such as
facturascripts_project
. - Example full project path:
/Applications/ServBay/www/facturascripts_project
- Open Finder and navigate to ServBay's local site root directory, which is
Extract Files:
- Locate the downloaded FacturaScripts
.zip
file and double-click to extract. - Copy or move all extracted files and folders (such as
index.php
,Core
,Dinamic
,Plugins
, etc.) into the/Applications/ServBay/www/facturascripts_project
folder you just created.
- Locate the downloaded FacturaScripts
Initial Setup (MySQL Database Configuration)
FacturaScripts requires a database to store all business data, users, and settings. We'll use the MySQL or MariaDB package managed by ServBay, both fully supported.
Ensure Database Package Is Running:
- Launch the ServBay application.
- From the left menu, select “Packages” > “MySQL” or “MariaDB” (choose your preferred database).
- Make sure your selected database package is started. If not, click the toggle button to start it.
Create Database and User:
- Use ServBay's built-in database management tools like phpMyAdmin (usually bundled with MySQL/MariaDB), or command line (available via ServBay's integrated terminal) for creating databases and users. phpMyAdmin is recommended for beginners.
- Using phpMyAdmin (recommended):
- In ServBay's interface, find the “Database” section. Click the phpMyAdmin icon next to your running database package. ServBay will open phpMyAdmin in your browser.
- Log in to phpMyAdmin. By default, use the
root
user and the password set during ServBay's initial setup. If you forgot the root password, ServBay provides a reset option on the database package details page. - After login, click the “Databases” tab at the top.
- Enter a database name in the “Create Database” field. To avoid conflicts and for clarity, use a project-related name, e.g.,
facturascripts_servbay_db
. - Set the proper character set and collation. It’s best to use
utf8mb4_general_ci
orutf8mb4_unicode_ci
for full character and emoji support. - Click “Create.”
- Create Database User (Optional but Highly Recommended): For security, avoid connecting as
root
; create a dedicated user for FacturaScripts.- Go to the home page in phpMyAdmin, then the “User Accounts” tab.
- Click “Add User Account.”
- Enter a username (e.g.,
facturascripts_servbay_user
). - Host: select
localhost
or127.0.0.1
, to restrict user access to local connections. - Generate or enter a strong password, and make sure you store this password securely.
- Grant necessary privileges: either pick “Create database with same name and grant all privileges” (if the database name matches the user), or select “Grant privileges on specific database” and choose your newly created database (
facturascripts_servbay_db
), then tick “ALL PRIVILEGES.” - Click “Go” at the bottom to create the user.
Record Database Connection Details: You’ll need these during FacturaScripts installation:
- Database name (e.g.,
facturascripts_servbay_db
) - Database username (e.g.,
facturascripts_servbay_user
) - Database user password (you just created)
- Database host (usually
localhost
or127.0.0.1
) - Database port (MySQL/MariaDB default is
3306
; check in ServBay package details)
- Database name (e.g.,
Configuring the Web Server (Apache or Nginx)
Now, configure how ServBay's web server (Apache or Nginx) will serve your FacturaScripts project files. ServBay fully supports both.
Ensure Web Server Is Running:
- In ServBay’s “Packages” view, confirm your chosen web server (Apache or Nginx) is running.
Add a Website:
- From ServBay’s left menu, select “Sites.”
- Click the “+” button above the site list to add a new website configuration.
- In the popup dialog, fill in:
- Name: Give your site a descriptive name, such as
FacturaScripts Demo Site
. - Domain: Enter the local domain you’ll use to access your FacturaScripts site. By ServBay convention, use the
.servbay.demo
suffix for local development, e.g.,facturascripts.servbay.demo
. - Site Type: Select
PHP
for a dynamic PHP application. - Root Directory: Click “Browse” or “Choose,” and select the directory containing the FacturaScripts files (
/Applications/ServBay/www/facturascripts_project
). Note: Some frameworks require pointing to a subdirectory (public
,web
), but FacturaScripts usually uses the project root. Consult official documentation if in doubt. - PHP Version: Select the PHP version compatible with your FacturaScripts release. Check FacturaScripts’ official requirements; recommended: recent stable PHP (8.1, 8.2, or newer). ServBay offers multiple PHP versions for flexibility.
- Other Settings: Default values are typically fine. ServBay also provides advanced options like SSL/HTTPS setup with User CA or public ACME certificates, CORS, etc. Configure as needed.
- Name: Give your site a descriptive name, such as
Save and Update Hosts:
- When you’re done, click “Add” or “Save.”
- ServBay auto-configures the virtual host/server block for your selected web server. It will also prompt for administrator rights to modify your system’s
hosts
file — mapping your chosen domain (facturascripts.servbay.demo
) to your local IP (127.0.0.1
). This lets you access your local site using a custom domain, with no manual editing required.
Check and Enable PHP Extensions:
- FacturaScripts may require certain PHP extensions to function correctly. Common ones:
pdo_mysql
,gd
(image handling),intl
(internationalization),zip
(compression),xml
,curl
(web requests), etc. ServBay typically installs and enables most essentials by default, but if FacturaScripts installation or runtime complains about missing extensions, you’ll need to enable them in ServBay. - Enable PHP Extensions in ServBay:
- In ServBay’s left menu, go to “Languages” > “PHP.”
- Select the PHP version set for your
facturascripts.servbay.demo
site (e.g., PHP 8.2). - Click the “Extensions” tab in the PHP version details.
- See the list of installed and enabled extensions. For any missing ones (say,
opcache
), check its box to enable. - Click “Apply” or “Save.” Note: Some extension changes require restarting the PHP service. Find and restart the relevant PHP version in the ServBay “Languages” > “PHP” interface.
- FacturaScripts may require certain PHP extensions to function correctly. Common ones:
Example interface of ServBay site configuration
Accessing the Site and Completing FacturaScripts Installation
Your ServBay environment is now prepped for FacturaScripts — time to start the installation wizard.
Open Your Browser: Use your preferred browser (Chrome, Firefox, Safari, etc.).
Enter Address: Type your local domain, e.g.,
http://facturascripts.servbay.demo
. If you set up SSL (via ServBay CA or ACME), you can usehttps://facturascripts.servbay.demo
. Hit Enter.FacturaScripts Installation Wizard:
- If ServBay’s site setup, hosts modification, and web server/PHP configuration are correct, you’ll see FacturaScripts’ welcome or installation page.
- Language Selection: Choose your preferred UI language.
- System Check: The installer will auto-check your environment (PHP version, required extensions, write permissions, etc.). If ServBay is properly configured, you should see green checkmarks. Red errors or yellow warnings? Follow prompts to review PHP version, extensions, or file permissions in ServBay, ensuring
/Applications/ServBay/www/facturascripts_project
and subfolders are writable by the web server user. - Database Configuration: This is key. Enter the database details you created earlier:
- Database Type: MySQL
- Host:
localhost
or127.0.0.1
- Port:
3306
(or the actual port from ServBay settings) - Database Name:
facturascripts_servbay_db
- Username:
facturascripts_servbay_user
- Password: (your created password)
- Table Prefix: Leave as
fs_
or change as needed.
- Admin Account: Set admin username, password, and email for FacturaScripts backend. Use a strong password and note these, as you’ll need them for future logins.
- Install: Review all details, then click Install. FacturaScripts will connect to your database, create tables, and write config files.
Installation Complete:
- Once installed, you may be asked to delete the
install
directory from your project root for security (if present). Follow any prompts to remove this folder. - You can now access your FacturaScripts login page via
http://facturascripts.servbay.demo
(or https). Use your admin credentials to log in and start exploring!
- Once installed, you may be asked to delete the
Frequently Asked Questions (FAQ)
- Q: The FacturaScripts installer says a PHP extension is missing, what should I do?
- A: Open ServBay, go to “Languages” > “PHP,” pick the PHP version for your FacturaScripts site, and click the “Extensions” tab. Find the missing extension (e.g.,
opcache
), check its box, hit “Apply,” and restart that PHP service.
- A: Open ServBay, go to “Languages” > “PHP,” pick the PHP version for your FacturaScripts site, and click the “Extensions” tab. Find the missing extension (e.g.,
- Q: Visiting
facturascripts.servbay.demo
shows “Forbidden” or a blank page?- A: First verify your ServBay-configured web server (Apache/Nginx) and PHP service are running. Next, check the site’s “root directory” points to the FacturaScripts project folder (
/Applications/ServBay/www/facturascripts_project
). For blank pages (likely PHP errors), consult the ServBay web server or PHP error logs. “Forbidden” errors usually mean file or directory permissions issues — ensure ServBay’s web server user has read access to project files and write access to folders likeDinamic
.
- A: First verify your ServBay-configured web server (Apache/Nginx) and PHP service are running. Next, check the site’s “root directory” points to the FacturaScripts project folder (
- Q: FacturaScripts can't connect to the database?
- A: Check ServBay’s MySQL/MariaDB package is running, and port number is correct (usually
3306
). Double-confirm all database connection details in the installer (host, port, database name, username, password) match what was set up in ServBay.
- A: Check ServBay’s MySQL/MariaDB package is running, and port number is correct (usually
Conclusion
With ServBay’s powerful local web development environment, installing and running FacturaScripts on macOS becomes quick and straightforward. ServBay provides all necessary dependencies (web server, PHP, database) and simplifies configuration with an intuitive GUI. By following this guide, you can easily set up a local development or testing environment for FacturaScripts, letting you focus on business management and feature exploration. ServBay’s flexibility and convenience will greatly boost your local development workflow.