Commit Graph
61 Commits
Author SHA1 Message Date
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
github-actions[bot] afcf55bcd2 chore: bump version to 1.2.2 [skip ci] 2026-01-19 04:55:21 +00: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
github-actions[bot] 96bd4404fe chore: bump version to 1.2.1 [skip ci] 2026-01-19 04:51:12 +00: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
github-actions[bot] 2c244255a2 chore: bump version to 1.2.0 [skip ci] 2026-01-19 04:38:21 +00:00
Juan DenisandClaude Opus 4.5 2c4976e4f5 feat: Add Docker cleanup to install/update and --force flag
- Add docker network prune and docker system prune before builds
- Use --no-cache for docker compose build to ensure fresh builds
- Add --force / -f flag to skip version check during update
- Helps prevent Docker networking issues

Usage: sudo serverkit update --force

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:38:13 -05:00
github-actions[bot] fb8915a891 chore: bump version to 1.1.6 [skip ci] 2026-01-19 04:27:52 +00: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
github-actions[bot] d34495deec chore: bump version to 1.1.5 [skip ci] 2026-01-19 04:24:30 +00: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
github-actions[bot] fa69285bcc chore: bump version to 1.1.4 [skip ci] 2026-01-19 04:19:27 +00: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
github-actions[bot] ba99b69115 chore: bump version to 1.1.3 [skip ci] 2026-01-19 04:14:16 +00:00
Juan DenisandClaude Opus 4.5 d5409d74a9 Remove PHP management page from UI
PHP apps should now be deployed via Docker using the php-app template.
This removes the host PHP management UI in favor of containerized deployments.

Removed:
- PHP.jsx page component
- PHP navigation link from sidebar
- PHP route from App.jsx
- PHP styles (_php.less)

The php-app template remains available for deploying PHP apps in Docker.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:14:08 -05:00
github-actions[bot] 01b1d3f4c4 chore: bump version to 1.1.2 [skip ci] 2026-01-19 04:07:19 +00:00
Juan DenisandClaude Opus 4.5 49d6ef27d4 fix: Version comparison not exiting early due to set -e
The compare_versions function returns non-zero values to indicate
version differences, but 'set -e' was causing bash to exit.
Now temporarily disabling exit-on-error during version comparison.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:07:11 -05:00
github-actions[bot] 823654d60d chore: bump version to 1.1.1 [skip ci] 2026-01-19 04:04:40 +00: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
github-actions[bot] 5d0cc7b92e chore: bump version to 1.1.0 [skip ci] 2026-01-19 04:00:25 +00:00
Juan DenisandClaude Opus 4.5 8bccfcdcf8 feat: Add automatic versioning system
- Add VERSION file (starting at 1.0.0)
- Add GitHub Actions workflow to auto-bump version on push
  - patch: default for all commits
  - minor: commits starting with "feat:" or "feature:"
  - major: commits starting with "BREAKING:" or "major:"
- Add CLI commands: version, check-update
- Update 'serverkit update' to show semantic versions
- Compare local vs remote version before updating

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 23:00:10 -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 b43bae9a49 Fix: Copy app templates to /etc/serverkit/templates during install
- Install script now copies bundled YAML templates to system directory
- Update command syncs templates on each update
- Creates /var/serverkit/apps directory for installed apps

Fixes 'No templates found' in Templates page.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:41:10 -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 736deb0832 Fix: Prevent getcwd errors by ensuring valid working directory
- install.sh now starts with cd /tmp to ensure valid directory
- uninstall command moves to /tmp before deleting install dir
- Shows reinstall command after uninstall

Prevents 'cannot access parent directories' errors when running
install from a deleted directory.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:33:40 -05:00
Juan DenisandClaude Opus 4.5 2c8f8f4b64 Fix: Restore executable permissions after git update
The update command now restores chmod +x on serverkit and scripts
after git reset --hard to prevent permission denied errors.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:26:45 -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
Juan DenisandClaude Opus 4.5 e65c680ba2 Add Docker-based app templates for PHP, Python, and Node.js
No need to install PHP/Python/Node on the host - each app runs
in its own isolated Docker container with the exact version needed.

Templates:
- PHP: nginx + php-fpm (8.0, 8.1, 8.2, 8.3)
- Python: Flask/FastAPI/Django (3.9-3.12)
- Node.js: Express/Next.js (18, 20, 21)

New CLI commands:
- create-app <type> <name> [port] - Create new app from template
- list-apps - List all deployed apps
- start-app <name> - Start an app
- stop-app <name> - Stop an app
- app-logs <name> - View app logs

Usage:
  sudo serverkit create-app php myblog
  sudo serverkit create-app python myapi 8200
  sudo serverkit add-site myblog.domain.com 8100

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:17:46 -05:00
Juan DenisandClaude Opus 4.5 eebb37fd5b Add multi-site support with host nginx reverse proxy
- Host nginx routes domains to different apps
- ServerKit frontend moved to port 8080 (internal)
- New CLI commands: setup-proxy, add-site, list-sites, remove-site
- Site config templates for easy domain setup
- Install script now sets up nginx proxy automatically

Usage:
  sudo serverkit add-site test.example.com 3000
  sudo serverkit list-sites
  sudo serverkit remove-site test.example.com

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 22:04:26 -05:00
Juan DenisandClaude Opus 4.5 958c15b012 Add production server specs to dev docs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 21:56:36 -05:00
Juan DenisandClaude Opus 4.5 1c0dbe923c Add local development setup for Windows/WSL
- docker-compose.dev.yml for quick Docker-based testing
- dev.bat Windows helper script
- dev-setup.sh WSL/Linux setup script
- docs/LOCAL_DEVELOPMENT.md comprehensive guide

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 21:54:34 -05:00
Juan Denis f23384889b Bind Gunicorn to all interfaces in service file
Changed the Gunicorn bind address from 127.0.0.1 to 0.0.0.0 in serverkit-backend.service to allow external connections. This enables access to the backend from outside the local machine.
2026-01-18 21:31:47 -05:00
Juan Denis c95d01b2fb Refactor to run backend on host, frontend in Docker
Removed docker-compose.prod.yml and updated docker-compose.yml to only run the frontend in Docker, with the backend now running as a systemd service on the host. Updated nginx and frontend nginx.conf to proxy API requests to the backend on the host. Added serverkit-backend.service for systemd management of the backend. Refactored install.sh and serverkit CLI to support the new architecture, including improved installation, update, and management commands.
2026-01-18 21:15:31 -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 bd788cbbf6 Redesign dashboard layout and improve database tab UX
Refactored the dashboard page to a two-column layout with a new server status bar, compact metrics grid, and improved cards for services, databases, and applications. Updated styles for a cleaner, more modern look. Enhanced the Databases page to show an empty state when MySQL or PostgreSQL is not installed, instead of disabling tabs.
2026-01-18 12:41:26 -05: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 499b7d919a Comment out HTTPS server block in nginx.conf
The HTTPS server configuration is now disabled by default for development. Instructions are added to enable it by mounting SSL certificates and uncommenting the block.
2026-01-18 04:23:28 -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 30fde845b0 Refactor stat card and page styles for consistency
Unified stat card and stat icon styles across components and pages for a more consistent UI. Updated grid layouts, color variables, and spacing in _cards.less, _backups.less, and _monitoring.less. Improved use of LESS variables and responsive design, and removed redundant or hardcoded color values.
2026-01-17 13:55:32 -05:00