ProcessMaker is an open source, workflow management software suite, which includes tools to automate your workflow, design forms, create documents, assign roles and users, create routing rules, and map an individual process quickly and easily. This file describes the requirements and steps to perform a local installation on different operating systems.
Click on your operating system below to reveal the installation steps to follow.
Windows (WSL2)
-
Follow this guide for installing a Linux distribution on your Windows machine. This will allow you to operate Windows and Linux at the same time. Given its system requirements, installation of ProcessMaker 4 will be done in the Linux subsystem.
-
The Ubuntu Linux distribution will be installed by default. Other Linux distributions can also be installed.
-
Restart your machine after WSL installation process is completed.
-
Follow the steps for your specific Linux distribution in one of the sections below.
WLS2 Ubuntu
- Download this script.
- Using a File Explorer window, search for this path
\\wsl$\Ubuntu\home\<your-username>
and move the script there. Note that<your-username>
is the username you specified during the WSL2 Linux installation and this might differ from your Windows User depending on your choice. If File Explorer can't find the path, search only for\\wsl$\
and navigate manually tohome\<your-username>
. - Open the Windows Terminal in your machine and open a window for Ubuntu.
- Note that you can also run a Linux distribution from PowerShell or CMD with the
wsl
command. Just make sure you are performing the installation steps on/mnt/c/Users/<your-username>
(Linux) and NOT onC:\Users\<your-username>
(Windows).
- Note that you can also run a Linux distribution from PowerShell or CMD with the
- Confirm that the script you moved to your user home directory is there by executing the
ls
command. Then, runsudo bash install-requirements.sh
. This will install most of the required software and services needed for ProcessMaker 4. - Close the current Ubuntu terminal window and open a new one.
- Run the following commands to check if php, composer, and nvm were installed correctly. You should expect the php version to be 8.1.
php --version composer composer --version command -v nvm
- Run
nvm install 16.18.1
to install the expected node version andnpm install -g npm@8.9.0
to install the expected npm version.
- Run the set of commands below to uninstall MySQL and MySQL server on WSL2 Ubuntu
sudo apt purge mysql-server sudo apt purge mysql sudo apt purge mysql-client sudo apt purge mysql-common mysql-server-core-* sudo apt purge mysql-client-core-*
- Confirm there is no MySQL by executing
which mysql
andmysql --version
. - Install wget by running
sudo apt install wget -y
and then execute the commands below - Run
wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
andsudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
. Choose Ubuntu Bionic and click OK, select MySQL 5.7 server and click OK. - Run
sudo apt-get update
.- If you encounter an error similar to "signatures couldn't be verified because the public key is not available: NO_PUBKEY 467B942D3A79BD29", execute the following commands:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 sudo apt update sudo apt-cache policy mysql-server sudo apt install -f mysql-community-client=5.7* sudo apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7*
- Run
sudo service mysql start
and sudomysql_secure_installation
. Press the Y key to start the installation and set the root password when prompted. - Check the MySQL version using
mysql --version
. It should be version 5.7. - Login to MySQL running
mysql -u root -p
and entering the root password previously set. - Create the ProcessMaker database with the
create database processmaker;
command. Then, confirm the database is available runningshow databases;
. You should see processmaker in the list of databases. Useexit;
command to terminate MySQL.
-
Download and install Docker Desktop for Windows.
-
Open the Docker Desktop application and go to Settings > Resources > WSL INTEGRATION.
-
Turn on Ubuntu. Click on Apply & Restart.
-
Reopen the Docker Desktop app, navigate to WSL INTEGRATION, and ensure your screen looks like the image below.
-
Restart your computer.
- Open a Ubuntu terminal window.
- In the home directory, clone the repository by running
git clone https://github.com/ProcessMaker/processmaker.git ~/src/processmaker
. - Download the start-services,status-services, and stop-services scripts. Move them to
\\wsl$\Ubuntu\home\<your-username>
like you did at the beginning of this guide with the installation script. - Start the services by running
sudo bash start-services.sh
. Check the status of the services by runningsudo bash status-services.sh
. In case you would like to stop services at any point to restart them or shut down, runsudo bash stop-services.sh
. - Once services are running, move into the processmaker directory
cd ~/src/processmaker
. - Within the processmaker directory, run the following set of commands:
composer install --ignore-platform-reqs
andphp artisan processmaker:install
.- If you experience an error of
DOMDOCUMENT
not being found, runsudo apt-get install php8.1-xml
. Then, delete the .env file by executingsudo rm .env
. Lastly, re-runphp artisan processmaker:install
.
- If you experience an error of
- After this, the ProcessMaker installation process will start. Please be patient, as this may take some time (~ 5-15 minutes). Throughout the install, you will be asked to enter a few configuration parameters. Some guiding principles for entering these parameters:
- Use suggested values wherever possible.
- For MySQL, use
root
as username and the password you configured previously during the MySQL set-up. - The instance URL is not that important. You can input any URL that you would like. To run ProcessMaker locally we will be using another URL later.
- After the installation process is finished, add the configurations below to your .env file. This file exists within the processmaker directory. You can easily edit directly on the command line by running
sudo vim .env
. If you are unfamiliar with vim or need a refresher, see this resource.# Run laravel echo server with HTTP instead of HTTPS LARAVEL_ECHO_SERVER_PROTO=http LARAVEL_ECHO_SERVER_SSL_KEY="" LARAVEL_ECHO_SERVER_SSL_CERT="" # Don't require a valid cert for SDK calls in script tasks API_SSL_VERIFY=0 # Run `which node` to get the path to nodejs NODE_BIN_PATH=/path/to/node/v14.4.0/bin/node # Run `which docker` to get the path to the docker executable PROCESSMAKER_SCRIPTS_DOCKER=/usr/local/bin/docker # Allow cookies to be served over HTTP SESSION_SECURE_COOKIE=false # Allow connections from script tasks to connect back to your host DOCKER_HOST_URL=http://host.docker.internal # Allow connections from script tasks to connect back to your host CACHE_DRIVER=redis
- Crosscheck the “.env“ file and ensure no key is repeated within the file.
- Run
which docker
in the Ubuntu terminal window to get the value to set asPROCESSMAKER_SCRIPTS_DOCKER
in the .env file. - Run
which node
in the Ubuntu terminal window to get the value to set asNODE_BIN_PATH
in the .env file. - Save the .env file.
- Clear the cache by running
php artisan optimize:clear
. This command needs to be performed every time changes are made to the .env file.
- Open a new Ubuntu terminal window.
- Change into pool.d directory:
cd /etc/php/8.1/fpm/pool.d
. Inside this directory, there will be a www.conf file. Usesudo vim www.conf
to open it. - Look for the "listen" value and modify it by appending
9000;
to the start of the line, as shown below. - Save your changes to the www.conf file.
- Run the
pwd
command on your processmaker directory. Store that path in a notepad. - Navigate to NGINX sites-enabled by running
cd /etc/nginx/sites-enabled
. Open the default file by runningsudo vim default
. - Replace what's inside the file with the configuration below.
server { listen 80; server_name pmdev host.docker.internal; root processmaker_project_path/public; index index.php index.html index.htm; location / { try_files $uri $uri/ /index.php$is_args$args; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { try_files $uri $uri/ /index.php =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /$realpath_root$fastcgi_script_name; include fastcgi_params; fastcgi_read_timeout 300; } }
- Within the configuration above, replace
processmaker_project_path
with the processmaker directory path stored on your notepad. - Save your changes to the default file.
- Open a Ubuntu terminal window and run
ifconfig
. Store the IP address on a notepad. The IP address is highlighted in the image below. - On your Windows system, open File Explorer and go to C:\Windows\System32\drivers\etc.
- Open the hosts file as an Administrator.
- Add the line
ifconfig_value pmdev
to the end of the file. Replace "ifconfig_value" with the IP address value you previously retrieved. - Save your changes.
- Open a Ubuntu terminal window and navigate to the processmaker directory.
- Ensure that services are running with
sudo bash status-services.sh
. - Run
npm install --allow-root
and thennpm run dev
. - Perform
cd ..
to navigate to the src parent directory, and perform the following command:chown -R www-data:www-data processmaker
. - On your Windows system, open a browser window and enter
http://pmdev
. You should now see ProcessMaker load and arrive at the login screen.
If you run into issues after entering the dev URL into your browser, below are some things to note.
- Double check all services are running by executing
sudo bash status-services.sh
. - Confirm that the correct IP address from
ifconfig
step obtained from your WSL Ubuntu machine matches the one placed in C:\Windows\System32\drivers\etc\hosts. This can change if your system is restarted. - It is very important for NGINX to have the appropriate permissions as www-data to write to the processmaker directory in order for the web app to work. www-data is the user that web servers on Ubuntu, such as NGINX, use by default for normal operation.
- Previously, we used the
chown
command to change the owner of the processmaker directory to be www-data. However, if you still run into issues due to permissions, there are some things you can try to troubleshoot. Usels -l
to check current permissions and the chmod command to adjust permissions as needed. Again, www-data needs to have write permissions for the processmaker directory and specific files within it. - For further troubleshooting, access the NGINX error logs in
/var/log/nginx
.
macOS
TBD
- Test Windows WLS2 Ubuntu Documentation by repeating all steps from scratch
- Obtain Feedback and incorporate it
- Create macOS documentation
- Create documentation for different popular Linux flavors for WLS2
- Create documentation for native Linux distros
- Create native Windows documentation (more complex)