CLI Commands Reference
OpenRegister provides several CLI commands for administration, debugging, and maintenance tasks. All commands are executed using Nextcloud's 'occ' command-line tool.
Quick Reference
| Command | Purpose | Use Case |
|---|---|---|
| 'openregister:solr:manage' | Production SOLR management | Setup, optimize, maintain SOLR |
| 'openregister:solr:debug' | SOLR debugging | Troubleshoot SOLR issues |
| Standard Nextcloud OCC | App & system management | Enable/disable, maintenance |
Command Execution
Basic Syntax
# From host machine (recommended for WSL/Docker)
docker exec -u 33 <nextcloud-container> php /var/www/html/occ <command>
# From within container
php /var/www/html/occ <command>
# With increased memory limit (for large operations)
docker exec -u 33 <nextcloud-container> php -d memory_limit=4G /var/www/html/occ <command>
Common Container Names
- Development: 'master-nextcloud-1'
- Production: Usually 'nextcloud' or your custom container name
- Find your container: 'docker ps | grep nextcloud'
OpenRegister Commands
1. SOLR Management Command ('openregister:solr:manage')
Purpose: Production-ready SOLR management for setup, optimization, and maintenance.
Available Actions:
Setup
Initialize complete SOLR infrastructure including configSets, collections, and schema.
docker exec -u 33 master-nextcloud-1 php /var/www/html/occ openregister:solr:manage setup
What it does:
- Creates SOLR configSet
- Creates base collection
- Deploys schema with ObjectEntity fields
- Creates tenant-specific collection
- Validates setup
Optimize
Optimize SOLR index for better query performance.
# Optimize index
docker exec -u 33 master-nextcloud-1 php /var/www/html/occ openregister:solr:manage optimize
# Optimize and commit immediately
docker exec -u 33 master-nextcloud-1 php /var/www/html/occ openregister:solr:manage optimize --commit
When to use: After large bulk imports, during maintenance windows, before high-traffic periods.
Warm
Pre-load SOLR caches for better performance.
docker exec -u 33 master-nextcloud-1 php /var/www/html/occ openregister:solr:manage warm
When to use: After server restarts, deployments, or SOLR restarts.