Installation
Install REST Module
Follow these steps to install and configure the REST Module for your PoloCloud instance.
Set up the REST API module for programmatic PoloCloud management
Installation Steps
- Download from GitHub Releases
# Download the REST module JAR file from GitHub releases
wget https://github.com/polocloud/polocloud/releases/download/v3.0.0/rest-module-3.0.0.jar- Place in Local Modules Directory
# Copy to your PoloCloud local modules directory
cp rest-module-3.0.0.jar /polocloud/local/modules/- Stop PoloCloud
# Stop PoloCloud to load the module
systemctl stop polocloudConfiguration
Basic Configuration
Configure the REST module through your PoloCloud configuration file:
{
"hostname": "0.0.0.0",
"port": 8080,
"securePort": 443,
"sslEnabled": false,
"certPath": "",
"keyPath": ""
}Advanced Configuration
{
"hostname": "0.0.0.0",
"port": 8080,
"securePort": 443,
"sslEnabled": true,
"certPath": "/path/to/certificate.crt",
"keyPath": "/path/to/private.key"
}Local Hosting
For local development, you can change the port to avoid conflicts:
- Set
"port": 3000for local development - Enable SSL with
"sslEnabled": trueand provide certificate paths - Use
"hostname": "localhost"to restrict access to local machine only
Verification
Test the Installation
# Check if the module is loaded
curl http://localhost:8080/api/health
# Expected response: {"status": "healthy"}Success Indicators
- Module appears in PoloCloud logs
- Health endpoint responds with 200 status
- API endpoints are accessible
- No error messages in logs