Difference between revisions of "ProxCP Installation"
From ProxCP Documentation
(11 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* Ensure your web server meets the ProxCP minimum requirements | * Ensure your web server meets the ProxCP minimum requirements | ||
− | * It is highly recommended to use HTTPS with ProxCP however it is not a requirement | + | * It is highly recommended to use HTTPS with ProxCP Web however it is not a requirement |
+ | * Create a new MySQL database and user for ProxCP Web. Save the connection details as you will need them during installation. | ||
* Download the latest version of ProxCP from your [https://my.proxcp.com My ProxCP] account | * Download the latest version of ProxCP from your [https://my.proxcp.com My ProxCP] account | ||
− | * Upload the zip file to your web server's | + | * Upload the zip file to your web server's directory (i.e. /var/www/html) |
* Extract the zip file in this directory; delete the zip file | * Extract the zip file in this directory; delete the zip file | ||
* Navigate your browser to https://[your ProxCP domain]/install | * Navigate your browser to https://[your ProxCP domain]/install | ||
− | ** | + | ** Step 1: Review and agree to the License Agreement |
** Step 2: Review ProxCP requirements and make adjustments as needed | ** Step 2: Review ProxCP requirements and make adjustments as needed | ||
** Step 3: Enter your MySQL database settings, default Administrator credentials, license key, and the domain/port combination that ProxCP Daemon will run on (i.e. https://app.domain.com:8000) | ** Step 3: Enter your MySQL database settings, default Administrator credentials, license key, and the domain/port combination that ProxCP Daemon will run on (i.e. https://app.domain.com:8000) | ||
− | ** The ProxCP Daemon does | + | *** The ProxCP Daemon does require HTTPS connections and will not work over HTTP |
− | ** Step 4: The installer will complete and provide further security steps and a ProxCP | + | ** Step 4: The installer will complete and provide further security steps and a ProxCP secret key. This key is required during ProxCP Daemon installation and is used for data encryption ('''DO NOT''' share or lose this key) |
− | * You will then be redirected to the ProxCP login page where initial configuration can continue | + | * In order to change the location of the ProxCP Admin area, first rename the admin.php file to something of your choosing then edit the /core/init.php file to reflect the new admin.php file name in the admin/base section. |
+ | |||
+ | |||
+ | You will then be redirected to the ProxCP login page where initial configuration can continue | ||
== 2. Daemon Installation == | == 2. Daemon Installation == | ||
+ | |||
+ | === ProxCP v 1.5 and later === | ||
+ | |||
+ | [[File:Daemon-installer.png|thumb]] | ||
+ | |||
+ | ==== Docker Installation ==== | ||
+ | |||
+ | [[ProxCP Daemon w/ Docker]] | ||
+ | |||
+ | ==== Manual Installation ==== | ||
+ | |||
+ | ProxCP Daemon now manages its own SSL certificates and generates the configuration file during the first start up. | ||
+ | |||
+ | * Ensure your daemon server meets the ProxCP Daemon minimum requirements | ||
+ | * Download the latest version of ProxCP Daemon from your [https://my.proxcp.com My ProxCP] account | ||
+ | * Upload the zip file to your daemon server; ensure the upload destination is not web-accessible (i.e. do not place the daemon in /var/www/html or /home/{user}/public_html) | ||
+ | * Extract the zip file in this directory; delete the zip file | ||
+ | * Start the Daemon with <code>./proxcp-daemon</code> and go through the first time configuration. | ||
+ | ** Note: The Daemon MySQL database settings should be the same as the ProxCP Web database settings (they should share 1 database). | ||
+ | * Once finished with initial configuration, stop the daemon with CTRL+C (^C). | ||
+ | * Start the Daemon once more with <code>forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh</code> or with screen: <code>./proxcp-daemon</code> or as a systemd service following the sample config below. | ||
+ | |||
+ | === ProxCP v 1.4 and earlier === | ||
* Ensure your daemon server meets the ProxCP Daemon minimum requirements | * Ensure your daemon server meets the ProxCP Daemon minimum requirements | ||
Line 22: | Line 49: | ||
* Copy/paste your ProxCP license key into the LICENSE.key file | * Copy/paste your ProxCP license key into the LICENSE.key file | ||
* Copy/move your SSL certificate files into the keys/ directory. Files must be named exactly as follows: | * Copy/move your SSL certificate files into the keys/ directory. Files must be named exactly as follows: | ||
− | ** ca.crt - Intermediate Certificate Authority | + | ** ca.crt - Intermediate Certificate Authority (For Let's Encrypt, the default file name is "chain") |
− | ** domain.crt - Your SSL certificate | + | ** domain.crt - Your SSL certificate (For Let's Encrypt, the default file name is "cert") |
− | ** domain.key - Your private key | + | ** domain.key - Your private key (For Let's Encrypt, the default file name is "privkey") |
− | ** If you do not already have a SSL certificate for ProxCP daemon, you can get a free certificate from [https://letsencrypt.org/ Let's Encrypt] | + | ** If you do not already have a SSL certificate for ProxCP daemon, you can get a free certificate from [https://letsencrypt.org/ Let's Encrypt] ([https://certbot.eff.org Let's Encrypt certbot]) |
− | * Edit the config.js file for appropriate settings. The comments in the file thoroughly explain each setting. The MySQL database used by ProxCP Web and ProxCP Daemon should be the same. You will need to paste the ProxCP | + | ** These files (ca.crt, domain.crt, domain.key) can also be symlinks to make SSL management a bit easier |
+ | * Edit the config.js file for appropriate settings. The comments in the file thoroughly explain each setting. The MySQL database used by ProxCP Web and ProxCP Daemon should be the same. You will need to paste the ProxCP secret key from the ProxCP Web installer into this file. | ||
* That's it, you're done! Run the proxcp-daemon executable using <code>forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh</code> This will run the binary with the [https://www.npmjs.com/package/forever forever] process monitor and log errors instead of killing the process. You could also run proxcp-daemon manually in [https://linux.die.net/man/1/screen screen] or as a background process. | * That's it, you're done! Run the proxcp-daemon executable using <code>forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh</code> This will run the binary with the [https://www.npmjs.com/package/forever forever] process monitor and log errors instead of killing the process. You could also run proxcp-daemon manually in [https://linux.die.net/man/1/screen screen] or as a background process. | ||
+ | |||
+ | == Optional: Linux Systemd Configuration == | ||
+ | |||
+ | * Below is an example systemd configuration file for the ProxCP Daemon so that it can be started as a service. | ||
+ | |||
+ | Location: /etc/systemd/system/proxcp.service | ||
+ | |||
+ | [Unit] | ||
+ | Description=ProxCP Daemon server (running in port 8000) | ||
+ | After=network.target | ||
+ | StartLimitBurst=5 | ||
+ | StartLimitIntervalSec=10 | ||
+ | |||
+ | [Install] | ||
+ | WantedBy=multi-user.target | ||
+ | |||
+ | [Service] | ||
+ | Type=simple | ||
+ | WorkingDirectory=/etc/proxcp | ||
+ | ExecStart=/etc/proxcp/RUN.sh | ||
+ | Restart=on-failure | ||
+ | |||
+ | * Then execute the following commands: | ||
+ | ** systemctl daemon-reload | ||
+ | ** systemctl start proxcp | ||
+ | ** systemctl enable proxcp | ||
== Appendix == | == Appendix == | ||
* Install forever: <code>[sudo] npm install forever -g</code> | * Install forever: <code>[sudo] npm install forever -g</code> | ||
− | * Install screen: <code>apt-get install screen</code> or <code>yum install screen</code> | + | * Install screen: <code>[sudo] apt-get install screen</code> or <code>[sudo] yum install screen</code> |
Latest revision as of 07:14, 2 September 2021
Contents
1. Web Application Installation
- Ensure your web server meets the ProxCP minimum requirements
- It is highly recommended to use HTTPS with ProxCP Web however it is not a requirement
- Create a new MySQL database and user for ProxCP Web. Save the connection details as you will need them during installation.
- Download the latest version of ProxCP from your My ProxCP account
- Upload the zip file to your web server's directory (i.e. /var/www/html)
- Extract the zip file in this directory; delete the zip file
- Navigate your browser to https://[your ProxCP domain]/install
- Step 1: Review and agree to the License Agreement
- Step 2: Review ProxCP requirements and make adjustments as needed
- Step 3: Enter your MySQL database settings, default Administrator credentials, license key, and the domain/port combination that ProxCP Daemon will run on (i.e. https://app.domain.com:8000)
- The ProxCP Daemon does require HTTPS connections and will not work over HTTP
- Step 4: The installer will complete and provide further security steps and a ProxCP secret key. This key is required during ProxCP Daemon installation and is used for data encryption (DO NOT share or lose this key)
- In order to change the location of the ProxCP Admin area, first rename the admin.php file to something of your choosing then edit the /core/init.php file to reflect the new admin.php file name in the admin/base section.
You will then be redirected to the ProxCP login page where initial configuration can continue
2. Daemon Installation
ProxCP v 1.5 and later
Docker Installation
Manual Installation
ProxCP Daemon now manages its own SSL certificates and generates the configuration file during the first start up.
- Ensure your daemon server meets the ProxCP Daemon minimum requirements
- Download the latest version of ProxCP Daemon from your My ProxCP account
- Upload the zip file to your daemon server; ensure the upload destination is not web-accessible (i.e. do not place the daemon in /var/www/html or /home/{user}/public_html)
- Extract the zip file in this directory; delete the zip file
- Start the Daemon with
./proxcp-daemon
and go through the first time configuration.- Note: The Daemon MySQL database settings should be the same as the ProxCP Web database settings (they should share 1 database).
- Once finished with initial configuration, stop the daemon with CTRL+C (^C).
- Start the Daemon once more with
forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh
or with screen:./proxcp-daemon
or as a systemd service following the sample config below.
ProxCP v 1.4 and earlier
- Ensure your daemon server meets the ProxCP Daemon minimum requirements
- Download the latest version of ProxCP Daemon from your My ProxCP account
- Upload the zip file to your daemon server; ensure the upload destination is not web-accessible (i.e. do not place the daemon in /var/www/html or /home/{user}/public_html)
- Extract the zip file in this directory; delete the zip file
- Copy/paste your ProxCP license key into the LICENSE.key file
- Copy/move your SSL certificate files into the keys/ directory. Files must be named exactly as follows:
- ca.crt - Intermediate Certificate Authority (For Let's Encrypt, the default file name is "chain")
- domain.crt - Your SSL certificate (For Let's Encrypt, the default file name is "cert")
- domain.key - Your private key (For Let's Encrypt, the default file name is "privkey")
- If you do not already have a SSL certificate for ProxCP daemon, you can get a free certificate from Let's Encrypt (Let's Encrypt certbot)
- These files (ca.crt, domain.crt, domain.key) can also be symlinks to make SSL management a bit easier
- Edit the config.js file for appropriate settings. The comments in the file thoroughly explain each setting. The MySQL database used by ProxCP Web and ProxCP Daemon should be the same. You will need to paste the ProxCP secret key from the ProxCP Web installer into this file.
- That's it, you're done! Run the proxcp-daemon executable using
forever start -a -l forever.log -e err.log -c /bin/bash RUN.sh
This will run the binary with the forever process monitor and log errors instead of killing the process. You could also run proxcp-daemon manually in screen or as a background process.
Optional: Linux Systemd Configuration
- Below is an example systemd configuration file for the ProxCP Daemon so that it can be started as a service.
Location: /etc/systemd/system/proxcp.service [Unit] Description=ProxCP Daemon server (running in port 8000) After=network.target StartLimitBurst=5 StartLimitIntervalSec=10 [Install] WantedBy=multi-user.target [Service] Type=simple WorkingDirectory=/etc/proxcp ExecStart=/etc/proxcp/RUN.sh Restart=on-failure
- Then execute the following commands:
- systemctl daemon-reload
- systemctl start proxcp
- systemctl enable proxcp
Appendix
- Install forever:
[sudo] npm install forever -g
- Install screen:
[sudo] apt-get install screen
or[sudo] yum install screen