Creating and Running a FacturaScripts Project on 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 convenient local web development environment, you can easily create, test, and run FacturaScripts projects on macOS—without complex configurations.
This guide will walk you through the complete process of installing and configuring FacturaScripts locally with ServBay.
Overview of FacturaScripts
FacturaScripts is open-source ERP and CRM software built with PHP and the Bootstrap framework. It's designed to help businesses manage their core processes, including:
- Invoicing and management
- Accounting
- Inventory control
- Customer and supplier management
- Project management
- ...and many more features via modules and plugins
As an active open-source project, FacturaScripts is supported by a vibrant community, and lets you extend or customize functionality via plugins to fit a range of business needs.
Key Features and Advantages of FacturaScripts
- Open-source and Free: No costly license fees. You’re free to use, modify, and distribute the software.
- Comprehensive Functionality: Covers most of the essential needs for day-to-day operations of small and medium businesses, offering an integrated solution.
- User-friendly: An intuitive and friendly UI makes the learning curve easy to handle.
- Highly Extensible: With a rich plugin marketplace and open APIs, you can easily add new features or integrate with other services.
- Cross-Platform Access: Web-based, so you can access and use it from any device with a modern browser.
- Active Community: Get help and support from a global developer community when you encounter issues.
- Multilingual Support: Offers multi-language interfaces, making it accessible for users in different regions.
Benefits of Running FacturaScripts with ServBay
ServBay is a local web development environment designed specifically for developers, making it an ideal platform for running PHP applications like FacturaScripts. It integrates all essential components you need—including Apache/Nginx web servers, multiple PHP versions, MySQL/MariaDB/PostgreSQL databases, Redis, and more—managed through an intuitive graphical interface.
The main advantages and steps for running FacturaScripts locally with ServBay:
- Integrated Environment: ServBay comes pre-installed and pre-configured with all core components required by FacturaScripts (web server, PHP, database). No need to manually install and configure separate software.
- Version Management: Easily switch between different PHP versions to meet FacturaScripts requirements or for compatibility testing.
- Database Management: With built-in tools like phpMyAdmin or Adminer, you can conveniently create and manage FacturaScripts' database and users.
- Streamlined Site Setup: Quickly create local websites, set up domains, root directories, web server, and PHP versions through the ServBay GUI.
- Automated Hosts File Management: ServBay automatically manages your local hosts file, letting you visit your site via a custom domain (e.g.,
facturascripts.servbay.demo
). - SSL Support: Easily configure SSL/HTTPS for local sites—via an internal User CA or public ACME services—to closely simulate a production environment.
The major steps to run FacturaScripts in ServBay are as follows:
- Download the FacturaScripts source code.
- Create a project folder in ServBay’s managed website root directory.
- Create the MySQL database and user needed for FacturaScripts.
- Use ServBay to configure the web server (Apache or Nginx) and point it to your project directory.
- Check and enable the required PHP extensions.
- Access the local domain with your browser and complete the FacturaScripts online installer.
Prerequisites
Before getting started, make sure you have:
- Successfully downloaded, installed, and launched ServBay on your macOS system. You can get the latest version from the official ServBay website.
- Ensured that ServBay's core components (the Apache or Nginx web server of your choice, the PHP version you plan to use, and a MySQL or MariaDB database) are all running smoothly from within ServBay.
- Basic knowledge of web development and databases.
Creating a FacturaScripts Project (Using the Downloaded Zip Package)
This is one of the most common and quickest ways to install FacturaScripts in a local environment.
Download FacturaScripts:
- Go to the FacturaScripts official download page: https://facturascripts.com/descargar.
- Find the latest stable
.zip
package and download it to your macOS computer.
Create the Project Directory:
- Open Finder and navigate to ServBay’s root directory for local websites. The default and recommended directory is
/Applications/ServBay/www/
. - Create a new folder in this directory to hold your FacturaScripts project—e.g., name it
facturascripts_project
. - Example full path:
/Applications/ServBay/www/facturascripts_project
- Open Finder and navigate to ServBay’s root directory for local websites. The default and recommended directory is
Unzip the Files:
- Locate the downloaded FacturaScripts
.zip
file and double-click to extract. - Copy or move all the extracted files and folders (such as
index.php
,Core
,Dinamic
,Plugins
, etc.) to the/Applications/ServBay/www/facturascripts_project
directory you created.
- Locate the downloaded FacturaScripts
Initial Configuration (Setting up MySQL Database, etc.)
FacturaScripts needs a database to store all business data, users, and settings. We'll use the MySQL or MariaDB package managed by ServBay for this purpose. ServBay fully supports both MySQL and MariaDB.
Make Sure the Database Package Is Running:
- Launch the ServBay app.
- From the left menu, select "Packages" > "MySQL" or "MariaDB" (choose your preferred database).
- Ensure the selected database package is running. If not, click the toggle to start it.
Create a Database and User:
- You can use ServBay’s built-in database management tools (like phpMyAdmin, usually packaged with MySQL/MariaDB), or use command-line tools (ServBay provides a terminal interface). For beginners, phpMyAdmin is most intuitive.
- Using phpMyAdmin (Recommended):
- In the ServBay interface, find the "Database" section. Click the phpMyAdmin icon next to the database package you’re using (MySQL or MariaDB). ServBay will open the phpMyAdmin login page in your browser.
- Log in to phpMyAdmin. By default, you can use the
root
user and the password you set for root during ServBay’s initial setup. If you forgot the root password, ServBay lets you reset it within the database package’s detail page. - Once logged in, click the "Databases" tab at the top.
- In the "Create database" field, enter a database name. For clarity and to avoid conflicts, we recommend a project-related name, such as
facturascripts_servbay_db
. - Choose a suitable character set and collation. It’s best to use
utf8mb4_general_ci
orutf8mb4_unicode_ci
to support a wider character set and emojis. - Click "Create."
- Create a Database User (Optional but Highly Recommended): For better security, avoid connecting as the
root
user. Create a dedicated FacturaScripts database user:- Go back to the phpMyAdmin homepage and click the "User Accounts" tab.
- Click "Add user account."
- Enter a username (e.g.,
facturascripts_servbay_user
). - Choose host as
localhost
or127.0.0.1
so this user can connect only locally. - Generate or enter a strong password, and make sure to record it safely.
- At the bottom, grant privileges. You can select "Create database with the same name and grant all privileges" if database and username match, or more precisely, select "Grant privileges on the following database" and assign full privileges (
ALL PRIVILEGES
) to the database you just created (facturascripts_servbay_db
). - Click "Go" to save the user.
Record Your Database Connection Details: You’ll need these during the FacturaScripts installation:
- Database name (e.g.,
facturascripts_servbay_db
) - Database username (e.g.,
facturascripts_servbay_user
) - Database user password (the password you set)
- Database host (usually
localhost
or127.0.0.1
) - Database port (default is
3306
for MySQL/MariaDB; you can verify the actual port in ServBay)
- Database name (e.g.,
Configuring the Web Server (Apache or Nginx)
Tell ServBay how to serve your FacturaScripts project files via your chosen web server. ServBay fully supports both Apache and Nginx.
Ensure the Web Server Package Is Running:
- In ServBay’s "Packages" screen, ensure either Apache or Nginx is running as per your configuration.
Add a Website:
- From the left menu, select "Sites."
- Click the "+" button at the top of the site listing to add a new site.
- Fill out the configuration window with:
- Name: Give it a descriptive name like
FacturaScripts Demo Site
. - Domain: Input the local site domain. By ServBay’s convention and best practice, use the
.servbay.demo
suffix for local domains, e.g.,facturascripts.servbay.demo
. - Website Type: Select
PHP
to indicate a dynamic PHP site. - Root Directory: Click "Browse" or "Select" and choose the FacturaScripts project folder you created (
/Applications/ServBay/www/facturascripts_project
).
Note: Some frameworks need the root directory pointed at a subfolder (likepublic
orweb
), but FacturaScripts typically just needs the main project folder. Check the FacturaScripts documentation if unsure. - PHP Version: Pick a version compatible with your FacturaScripts release. See the official FacturaScripts system requirements; generally, use a recent stable version like PHP 8.1, 8.2, or newer. ServBay supports multiple PHP versions you can switch between.
- Other Settings: Usually, the defaults are fine. ServBay also offers convenient SSL/HTTPS options (User CA and public ACME certificates), CORS, and other advanced settings.
- Name: Give it a descriptive name like
Save and Update Hosts:
- After completing the configuration, click "Add" or "Save".
- ServBay will automatically set up a virtual host/server block for your chosen web server. You’ll also be prompted for admin rights to modify your system’s
hosts
file.
Editing the hosts file allows your chosen domain (facturascripts.servbay.demo
) to point to local IP (127.0.0.1
), letting you access your local site via this custom domain without manual editing.
Check and Enable PHP Extensions:
- FacturaScripts may require certain PHP extensions to run properly, such as
pdo_mysql
,gd
(for images),intl
(internationalization),zip
(archive handling),xml
, andcurl
(web requests). ServBay enables most common extensions by default, but if the FacturaScripts installer or app points out a missing extension, you need to enable it in ServBay: - To enable PHP extensions in ServBay:
- From the left menu, select "Languages" > "PHP."
- Select the PHP version assigned to the
facturascripts.servbay.demo
site (e.g., PHP 8.2). - In the details view, go to the "Extensions" tab.
- You’ll see a list of installed and enabled extensions. If FacturaScripts reports a missing extension (such as
opcache
), find it in the list, check the box, and enable it. - Click "Apply" or "Save" at the bottom.
Note: Certain extension changes might require restarting the associated PHP service. Go back to the relevant PHP section in ServBay, and click the restart button next to your PHP version.
- FacturaScripts may require certain PHP extensions to run properly, such as
Sample ServBay Site Configuration Interface
Accessing the Site and Completing FacturaScripts Installation
With your ServBay environment prepared, you’re ready to begin the FacturaScripts online setup.
Open Your Browser: Use your preferred web browser (Chrome, Firefox, Safari, etc.).
Go to the Address: In the address bar, enter the local domain you configured for FacturaScripts, such as
http://facturascripts.servbay.demo
. If you set up SSL (via ServBay CA or ACME), you can tryhttps://facturascripts.servbay.demo
. Then press Enter.FacturaScripts Installer:
- If your ServBay site setup, hosts file update, and web server/PHP services are all running smoothly, you should see the FacturaScripts welcome or installation wizard.
- Language Selection: First, choose your preferred interface language.
- System Check: The installer auto-checks your server setup (PHP version, required PHP extensions, directory write permissions, etc.). All requirements should show up as green indicators if your ServBay config is correct and extensions are enabled.
If you get red errors or yellow warnings, follow the instructions—double-check your PHP version, extension setup, or ensure your project folder (/Applications/ServBay/www/facturascripts_project
) and its subfolders are writable by the web server. - Database Configuration:
This is a crucial step! Enter the details you recorded earlier:- Database Type: Select MySQL.
- Host:
localhost
or127.0.0.1
- Port:
3306
(or your ServBay instance's real port) - Database Name:
facturascripts_servbay_db
(from phpMyAdmin) - Username:
facturascripts_servbay_user
(your db user) - Password: The password you set for the db user
- Table Prefix: Leave it as the default
fs_
or adjust as needed.
- Admin Account: Set up the admin username, password, and email for FacturaScripts’ backend management. Use a secure password and keep these login details safe!
- Install: Once everything is filled out, click the install button. FacturaScripts will connect to your database, create all necessary tables, and write the config files.
Installation Complete:
- After a successful install, FacturaScripts may prompt you to delete the
install
folder in your project root (if present). For security, follow the prompt and delete it. - Now you should be able to visit
http://facturascripts.servbay.demo
(or the HTTPS version) to access the FacturaScripts login page. Log in with the admin account you just created and start exploring FacturaScripts!
- After a successful install, FacturaScripts may prompt you to delete the
Frequently Asked Questions (FAQ)
Q: The FacturaScripts installer says a PHP extension is missing. What should I do?
- A: Open ServBay, navigate to "Languages" > "PHP," find the PHP version assigned to your FacturaScripts site, and click the "Extensions" tab. Locate the missing extension (e.g.,
opcache
), check the box to enable it, then click "Apply" and restart the PHP service.
- A: Open ServBay, navigate to "Languages" > "PHP," find the PHP version assigned to your FacturaScripts site, and click the "Extensions" tab. Locate the missing extension (e.g.,
Q: Visiting
facturascripts.servbay.demo
gives me a “Forbidden” message or a blank page?- A: First, verify that your configured web server (Apache/Nginx) and PHP service are running in ServBay. Next, make sure the "Root Directory" in your ServBay site setup correctly points to your FacturaScripts project folder (
/Applications/ServBay/www/facturascripts_project
).
If you see a blank page, it might be a PHP error—check the web server error logs or PHP error logs in ServBay for more details.
If you get “Forbidden,” it could be a file or folder permissions issue. Ensure the ServBay web server user has permissions to read project files and write to directories likeDinamic
.
- A: First, verify that your configured web server (Apache/Nginx) and PHP service are running in ServBay. Next, make sure the "Root Directory" in your ServBay site setup correctly points to your FacturaScripts project folder (
Q: Database connection fails during FacturaScripts install?
- A: Make sure your MySQL/MariaDB package is running in ServBay and confirm the correct port number (usually
3306
). Double-check all database fields in the FacturaScripts installer—host (localhost
/127.0.0.1
), port, db name, username, and password—match exactly what you created in ServBay.
- A: Make sure your MySQL/MariaDB package is running in ServBay and confirm the correct port number (usually
Summary
Thanks to ServBay’s powerful local web development features, installing and running FacturaScripts on macOS is a breeze. ServBay provides all necessary dependencies (web server, PHP, database) and streamlines the config process through a friendly GUI. By following this guide, you can quickly set up a local development or test environment for FacturaScripts, allowing you to focus on business management and feature exploration. ServBay’s flexibility and ease of use will significantly boost your local development productivity.