Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Fix: Copy app templates to /etc/serverkit/templates during install

Juan Denisb43bae9a49e1
diff --git a/install.sh b/install.sh
index fa0ad37c..3950672c 100644
--- a/install.sh
+++ b/install.sh
@@ -120,6 +120,16 @@ mkdir -p "$LOG_DIR"
mkdir -p "$DATA_DIR"
mkdir -p "$INSTALL_DIR/backend/instance"
mkdir -p "$INSTALL_DIR/nginx/ssl"
+mkdir -p /etc/serverkit/templates
+mkdir -p /var/serverkit/apps
+
+# Copy bundled templates to system directory
+print_info "Installing app templates..."
+if [ -d "$INSTALL_DIR/backend/templates" ]; then
+ cp -r "$INSTALL_DIR/backend/templates/"*.yaml /etc/serverkit/templates/ 2>/dev/null || true
+ cp -r "$INSTALL_DIR/backend/templates/"*.yml /etc/serverkit/templates/ 2>/dev/null || true
+ print_success "Installed $(ls /etc/serverkit/templates/*.yaml 2>/dev/null | wc -l) app templates"
+fi
# Set up Python virtual environment
print_info "Setting up Python virtual environment..."
diff --git a/serverkit b/serverkit
index c9ae0da0..cc13a525 100644
--- a/serverkit
+++ b/serverkit
@@ -267,6 +267,12 @@ cmd_update() {
source "$VENV_DIR/bin/activate"
pip install -r "$INSTALL_DIR/backend/requirements.txt" --quiet
+ # Sync app templates
+ print_info "Syncing app templates..."
+ mkdir -p /etc/serverkit/templates
+ cp -r "$INSTALL_DIR/backend/templates/"*.yaml /etc/serverkit/templates/ 2>/dev/null || true
+ cp -r "$INSTALL_DIR/backend/templates/"*.yml /etc/serverkit/templates/ 2>/dev/null || true
+
# Rebuild frontend
print_info "Rebuilding frontend..."
docker compose build