Commit Graph
37 Commits
Author SHA1 Message Date
Juan DenisandClaude Opus 4.5 cb809ee4dd feat(1-1): add routing diagnostic API endpoints
New endpoints for debugging domain/container routing:
- GET /api/v1/domains/debug/diagnose/{app_id}: Full diagnostic report
  with app config, domains, nginx status, docker containers, health
  assessment and actionable recommendations
- POST /api/v1/domains/debug/test-routing/{app_id}: Active routing
  tests to verify traffic flow

Both endpoints require admin access.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:05:05 -05:00
Juan DenisandClaude Opus 4.5 f14af7107e feat(1-1): add Nginx config diagnostics and routing checks
Add diagnostic methods to NginxService:
- get_site_config(): Get config content, enabled status, parsed info
- diagnose_site(): Full diagnostic with health check and recommendations
- check_site_routing(): Test the complete routing chain

Includes automatic health assessment and actionable recommendations.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:04:29 -05:00
Juan DenisandClaude Opus 4.5 5182d2326c feat(1-1): add port accessibility and container network diagnostics
Add diagnostic methods to DockerService:
- check_port_accessible(): Test if a port has something listening
- get_container_port_bindings(): Get port mappings for a container
- get_container_network_info(): Get full network settings including IPs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:03:51 -05:00
Juan Denis 6ea84d1482 Improve file service error handling and add root dir
Added '/var/serverkit' to ALLOWED_ROOTS for file browsing. Enhanced error handling for owner/group resolution to support missing pwd/grp modules and additional exception types. Improved get_disk_usage to check for path existence, handle permission errors, and avoid division by zero.
2026-01-19 00:38:20 -05:00
Juan Denis 122f099167 Fix log display for array and string formats
Updated log fetching logic in LogsTab to handle both array and string formats for Docker and regular app logs, ensuring logs are displayed correctly regardless of backend response structure.
2026-01-19 00:34:39 -05:00
Juan Denis b619779059 Add dynamic ServerKit version endpoint and UI
Introduces a new /system/version API endpoint in the backend to provide the current ServerKit version, reading from possible VERSION files. Updates the frontend About section to fetch and display the version dynamically instead of hardcoding it.
2026-01-19 00:11:49 -05:00
Juan Denis c7eaafab6a Enhance app deletion and improve port allocation logic
App deletion now performs Docker cleanup, removes app folders, and cleans up Nginx configs, returning detailed cleanup results. TemplateService port variable generation now avoids ports in use by Docker containers and system processes, improving reliability for dynamic port assignment.
2026-01-19 00:01:33 -05:00
Juan Denis bf237c698d Add Docker database and app management endpoints
Implements endpoints for managing and querying MySQL/PostgreSQL databases running in Docker containers, including listing containers, databases, tables, and executing queries. Adds endpoints for retrieving app logs and real-time status for Docker apps. Updates template variable processing to flag auto-generated and hidden variables. Extends DatabaseService with Docker MySQL/PostgreSQL discovery and query utilities.
2026-01-18 23:55:12 -05:00
Juan Denis 8d9f7f383f Add Docker app nginx config automation and port detection
Automatically create, update, and delete nginx configs for Docker applications when domains are added or removed. Adds an endpoint to manually regenerate nginx configs for Docker apps. Updates TemplateService to detect port from multiple possible variable names (PORT, HTTP_PORT, WEB_PORT) when creating Docker app records.
2026-01-18 23:51:04 -05:00
Juan DenisandClaude Opus 4.5 2701a49140 fix: Correct db import in template_service
Import db from 'app' not 'app.models'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:27:45 -05:00
Juan DenisandClaude Opus 4.5 bac265d80a fix: Add error tracing to template install endpoint
Added try-except with traceback logging to help debug 500 errors
during template installation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:24:22 -05:00
Juan DenisandClaude Opus 4.5 e36017bed6 fix: validate-install endpoint handles list-format variables
Same bug as before - the validate_installation function was using
.items() on variables expecting a dict, but templates now use
list format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:19:20 -05:00
Juan DenisandClaude Opus 4.5 22d5074834 fix: Template validation now handles list-format variables
The validate_template function was failing because it expected
variables in dict format but templates now use list format.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:04:31 -05:00
Juan DenisandClaude Opus 4.5 65ee8ea4cd Fix more templates: ghost, gitea, nextcloud, nginx-proxy-manager
- Convert variables to list format
- Use ${APP_NAME} for container names
- Standardize service names and port variables

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:55:21 -05:00
Juan DenisandClaude Opus 4.5 e673be785d Fix template installation and variable handling
- Add APP_NAME as automatic variable for all template installs
- Handle both list and dict formats for template variables
- Update uptime-kuma, portainer, node-app templates with proper format
- Use ${APP_NAME} for container names instead of hardcoded values
- Standardize port variable names to HTTP_PORT

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:53:36 -05:00
Juan DenisandClaude Opus 4.5 9ec1a25f33 Fix: Support Docker container logs for apps
- get_app_logs now checks for docker-compose.yml first
- Uses 'docker compose logs' for containerized apps
- Falls back to nginx logs for host-based apps
- Added /var/serverkit and /var/www to allowed log directories

Fixes 'Failed to load logs' error for Docker-deployed apps.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:39:03 -05:00
Juan DenisandClaude Opus 4.5 cab18a32b7 Consolidate templates into backend/templates marketplace
- Removed duplicate root templates/ folder
- Added PHP, Python, Node.js templates to marketplace (YAML format)
- Templates now installable via web UI Templates page
- CLI create-app now points users to web UI
- All 63 templates in one place: backend/templates/

New templates:
- php-app: Custom PHP 8.0-8.3 with Apache
- python-app: Custom Python 3.9-3.12 (Flask/FastAPI/Django)
- node-app: Custom Node.js 18-21 (Express/Next.js)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:23:50 -05:00
jhd3197andClaude Opus 4.5 63a04d3319 Fix SQLite database path for Docker volume mount
- Create /app/instance directory in Dockerfile with proper permissions
- Update DATABASE_URL default to use absolute path (/app/instance/serverkit.db)
- Ensures the non-root appuser can write to the database location
- Fixes "unable to open database file" error on fresh installs

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 01:47:02 +00:00
Juan Denis 893df4753b Add admin panel with user, settings, and audit log management
Introduces backend endpoints and models for admin features including user management, system settings, and audit logging. Adds RBAC middleware, audit log and system settings models, and services for audit and settings. Updates authentication to support setup flow and registration control. On the frontend, adds settings tabs for users and audit logs, a setup page, and updates routing and context to support setup and registration state. Styles and API service are updated to support new features.
2026-01-18 05:01:49 -05:00
Juan Denis 2fa790ac85 Refactor to consistently use app.root_path and update deployment model
Replaced all uses of app.path with app.root_path in backend API and service layers for consistency and correctness. Renamed the 'metadata' field to 'extra_data' in the Deployment model to avoid SQLAlchemy reserved word conflicts and updated related methods. Also updated frontend to import Toast context from the correct location and added new border and font size variables in styles.
2026-01-18 04:20:30 -05:00
Juan Denis 87c3a7ee79 Add application templates for multiple popular services
Added YAML templates for a wide range of self-hosted applications, including Authelia, BookStack, Caddy, Code Server, CrowdSec, Directus, Drone CI, Duplicati, Excalidraw, File Browser, GitLab Runner, Grafana, Grav, Home Assistant, Immich, Jaeger, Jellyfin, Jenkins, Jitsi, Keycloak, Loki, Matrix Synapse, Mattermost, MinIO, Mongo Express, Mosquitto, n8n, Navidrome, Netdata, Node-RED, Outline, Payload, pgAdmin, PhotoPrism, phpMyAdmin, Plex, Prometheus, Redis Commander, Registry, Rocket.Chat, Seafile, SonarQube, Strapi, Syncthing, Traefik, Umami, Vault, Vaultwarden, Wiki.js, WordPress, and Zigbee2MQTT. Updated index.json to include all new templates and categories, providing a comprehensive catalog for deployment.
2026-01-18 03:57:44 -05:00
Juan Denis 6d0b84bc91 Add template management API and frontend integration
Introduces backend API endpoints and service logic for managing application templates, including listing, installing, updating, and repository management. Adds several example template YAML files and an index for templates. Updates frontend to support template browsing and installation, including new page, sidebar link, API integration, and styles. Removes the obsolete ROADMAP.md.
2026-01-18 03:42:41 -05:00
Juan Denis f696faedcc Add build and deployment API with models and services
Introduces REST API endpoints for build and deployment management, including build configuration, triggering, logs, deployment history, rollback, and diff functionality. Adds new models for Deployment and DeploymentDiff, and implements BuildService and DeploymentService for orchestrating build and deploy workflows. Updates application initialization to register the new API blueprint and adjusts model exports accordingly. Frontend and style changes are not included in this summary.
2026-01-18 03:31:05 -05:00
Juan Denis c358a85217 Add branch selection and webhook logs to deploy tab
Implements backend and frontend support for listing remote Git branches (by app or repo URL) and selecting them during deployment configuration. Adds webhook log viewing for debugging, with backend endpoints and UI in the deploy tab. Updates webhook verification to support GitHub, GitLab, and Bitbucket, and introduces new styles for the deploy tab.
2026-01-18 03:19:03 -05:00
Juan Denis f7f8e18852 Add database query runner and notification preferences
Implements backend API endpoints and service logic for executing SQL queries (MySQL, PostgreSQL, SQLite) with readonly enforcement and table structure retrieval. Adds user notification preferences model and API for per-user alert settings. Extends notification service to support email notifications with HTML templates. Introduces a frontend QueryRunner component for interactive SQL execution, table browsing, and result export. Updates related frontend and backend files to support new features.
2026-01-18 03:10:55 -05:00
Juan Denis 83d7997b1a Add Dockerfile, contributing guide, and docs updates
Introduces a production-ready Dockerfile, a comprehensive CONTRIBUTING.md, and new documentation files (API, installation, roadmap). Updates .env.example with improved comments and structure, enhances .gitignore, and refines the README with expanded features, requirements, and setup instructions. Roadmap and planning files are reorganized, and obsolete HTML is removed.
2026-01-18 02:03:51 -05:00
Juan Denis 278f683d9f Add security module with ClamAV and integrity monitoring
Introduces backend security API and service for malware scanning (ClamAV), file integrity monitoring, suspicious activity detection, and security event logging. Adds frontend Security page, navigation, and styles for managing scans, quarantine, integrity checks, and viewing security events. Integrates security routes and UI into the application.
2026-01-18 01:24:27 -05:00
Juan Denis 7833d78fc5 Add notification webhooks support (Discord, Slack, etc.)
Introduces backend and frontend support for notification webhooks, including Discord, Slack, Telegram, and generic webhooks. Adds new API endpoints for managing and testing notification channels, updates monitoring service to send alerts to these channels, and provides a new UI for configuring and testing notification integrations in settings. Also adds required styles and updates dependencies to include the requests library.
2026-01-18 01:13:30 -05:00
Juan Denis 3f5746cfe4 Add two-factor authentication (2FA) support
Implements TOTP-based two-factor authentication for user accounts. Adds backend endpoints and services for 2FA setup, confirmation, disabling, backup code management, and login verification. Updates the User model with 2FA fields and logic. Extends frontend login and settings pages to support 2FA flows, including modals for setup, disabling, and backup code management. Adds new styles for 2FA UI components. Updates requirements to include pyotp and qrcode.
2026-01-18 01:03:56 -05:00
Juan Denis e9455a7167 Add environment variable management feature
Introduces backend and frontend support for encrypted environment variable management, including CRUD API endpoints, history tracking, bulk import/export, and UI components. Updates requirements to include cryptography, and adds related documentation for competitive analysis, feature gaps, and market positioning.
2026-01-18 00:40:41 -05:00
Juan Denis fc55530d8f Add server uptime tracking and visualization
Introduces backend API endpoints and service for tracking server uptime, including statistics and history. Adds a new UptimeGraph React component to the frontend dashboard, updates API service methods, and includes new styles for uptime visualization. Removes the old uptime display from the dashboard and integrates the new graph-based component.
2026-01-17 13:37:40 -05:00
Juan Denis 4cbde38363 Add cron job management (backend & frontend UI)
Introduces backend API endpoints and service for managing cron jobs, including listing, creating, deleting, toggling, and running jobs. Adds a new Cron Jobs page to the frontend with UI for managing scheduled tasks, updates the sidebar navigation, and includes related styles. Also updates the API service to support cron job operations.
2026-01-17 13:23:36 -05:00
Juan Denis 9def699bee Add firewall management API and service
Introduces backend API endpoints and service logic for managing firewalld and ufw, including status, rules, IP blocking, and installation. Updates CORS settings, improves Windows compatibility in file and FTP services, and adds required dependencies. Frontend changes include new Firewall and PHP pages, updated sidebar, and related styles.
2026-01-17 13:05:39 -05:00
Juan Denis 12a969bf80 Add file manager and FTP server backend and frontend
Implemented backend API endpoints and services for file management and FTP server control, including file browsing, editing, upload/download, and FTP user management. Added corresponding frontend pages, components, and API integrations for File Manager and FTP Server features. Updated styles and documentation to reflect new functionality.
2026-01-17 12:31:31 -05:00
Juan Denis c1d60f112f Add ServerKit CLI, install script, and deployment improvements
Introduces a comprehensive Bash CLI tool (`serverkit`) for managing ServerKit services, users, and database operations. Adds a quick-install script (`install.sh`) for Ubuntu, a sample environment file (`.env.example`), and a Python CLI backend (`backend/cli.py`) for administrative tasks. Updates Docker Compose for production readiness, enhances deployment documentation, and adds Click to backend requirements. Also updates references to the correct GitHub repository.
2026-01-17 12:13:22 -05:00
Juan Denis f677d760dd Add backup, monitoring, and deployment APIs
Introduces new API endpoints and services for backups, monitoring, and Git deployment. Adds security middleware, account lockout on failed logins, and improves domain/SSL management. Updates Dockerfiles, deployment configs, and frontend to support new features and UI components.
2026-01-17 12:08:02 -05:00
Juan Denis c0a2a01fc1 Initial project structure and core API implementation
Add backend and frontend foundations for ServerKit, including Flask API structure, SQLAlchemy models, service layers, and React app with authentication context and service hooks. Implement core API endpoints for authentication, application management, Docker, databases, and system operations. Update README with project overview, tech stack, and setup instructions. Add development roadmap and example environment configuration.
2026-01-17 04:22:12 -05:00