Installing P4 Plan Web on Linux
Perform the following tasks to install and configure P4 Plan Web on Linux.
1. If nginx is not installed, install it using the following:
sudo apt update
sudo apt install nginx
2. Download and install an LTS version of node.js, v22 or later.
You can check which version (if any) of node.js is currently installed with the following:
node -v
3. Download P4 Plan Web and unzip it to your desired install location.
4. In P4PlanWeb/P4PlanAPI/
, rename config-example.env
to .env
.
5. Configure the server details in .env
as required.
nginx.conf
. See Step 10.6. Navigate to P4PlanWeb/P4PlanAPI/
and run:
npm ci --omit=dev --no-audit
7. In P4PlanWeb/certificates/
, replace the existing certificate example with your own. They should be named web.pem
and web.key
, as referred to in the example nginx.conf
file.
This can either be a certificate acquired from a certificate authority or a self-signed certificate, generated locally with OpenSSL. The following is an example for generating a self-signed certificate with OpenSSL:
openssl req -new -newkey rsa:2048 -nodes -days 365 -keyout ./certificates/web.key -out ./certificates/web.pem
Example certificates are provided, which you can use to get up and running. To use these, rename the example files to web.key
and web.pem
.
8. Copy client files to the web root directory - for example: /usr/share/nginx/html
cp -r client/dist/* /usr/share/nginx/html/
cp -r integrations/helix_core /usr/share/nginx/html/
9. Copy certificates folder into the nginx directory:
cp -r certificates /usr/share/nginx/
10. (Optional) To keep the /etc/nginx/nginx.conf
file, back it up.
If you have a nginx.conf
file, you can merge applicable pieces from nginx-example.conf
into your existing nginx.conf
file. If you do this, you should skip Step 11.
cp nginx-example.conf /etc/nginx/nginx.conf
12. Start nginx as a service:
sudo systemctl start nginx
13. Run ./start.sh
to start P4 Plan API.
You can also run the API as a service. For more information, see the P4 Plan API documentation.
14. Visit https://localhost
15. If you want to let users open the P4 Plan desktop client from the web client, set the hostname for the P4 Plan Server.