acs/acspanel-core
ACSPanel Core powers ACSPanel, a Symfony-based server administration panel. Manage multiple servers and services with role-based access, plans, audit logs, themes, and multilingual UI. Integrates DNS, web, database, and FTP backends.
Installation Clone the repository and install via Composer:
composer create-project altctrlsupr/acspanel-core acspanel
cd acspanel
composer install
Database Configuration
Configure .env or app/config/parameters.yml with your database credentials:
# app/config/parameters.yml
parameters:
database_driver: pdo_mysql
database_host: localhost
database_port: null
database_name: acspanel
database_user: root
database_password: null
First Use Case: Basic User Setup Run migrations and load fixtures (if available):
php bin/console doctrine:migrations:migrate
Register a Superadmin via the CLI or manually in the database:
INSERT INTO user (username, password, role) VALUES ('admin', '$2y$10$...', 'superadmin');
Role-Based Access Control (RBAC)
Role entities (e.g., superadmin, admin, reseller).// Example: Check if user has 'manage_servers' permission
if (!$this->get('security.authorization_checker')->isGranted('ROLE_SUPERADMIN')) {
throw $this->createAccessDeniedException();
}
Plan Management
Basic, Premium) with resource limits (CPU, RAM, storage).Plan entity:
$user->setPlan($this->getDoctrine()->getRepository(Plan::class)->find(1));
$this->getDoctrine()->getManager()->flush();
Service Integration (e.g., PowerDNS, Apache)
Server entity to track decentralized services:
$server = new Server();
$server->setType('dns'); // 'web', 'dns', etc.
$server->setHost('192.168.1.100');
$server->setConfig($configArray); // Serialized config
$this->getDoctrine()->getManager()->persist($server);
Logging Actions
StofDoctrineExtensionsBundle for audit logs:
// Example: Log a DNS record change
$dnsRecord->setTtl(3600);
$this->getDoctrine()->getManager()->flush();
// Automatically logged via Doctrine lifecycle events.
PanelWordpressBundle) by injecting ACSPanelCoreBundle services.LiipThemeBundle:
# app/config/config.yml
liip_theme:
themes: [default, custom_theme]
FOSRestBundle to expose endpoints for headless clients.Archived Status
Doctrine Extensions Dependency
StofDoctrineExtensionsBundle requires manual setup for audit logs. Ensure:
# app/config/config.yml
stof_doctrine_extensions:
orm:
default:
timestampable: true
loggable: true
Multiserver Complexity
Missing Mobile Frontend
/app_dev.php/_profiler) to debug RBAC issues.php bin/console doctrine:migrations:rollback
Custom Roles/Plans
Extend the Role and Plan entities to add domain-specific permissions:
// src/Acspanel/CoreBundle/Entity/CustomRole.php
class CustomRole extends Role {
// Add fields like 'max_clients', 'whitelisted_ips'
}
Service Adapters
Create adapters for unsupported services (e.g., Nginx, Postfix) by implementing the ServerInterface:
class NginxServerAdapter implements ServerInterface {
public function applyConfig(array $config) { ... }
}
Translation
Add missing languages via translations/ directories or use Crowdin for community contributions.
app/Resources/views/ has a base.html.twig for theming..env (never in parameters.yml).How can I help you explore Laravel packages today?