Repository navigation
FleetPilot #2417
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
ChristianHandy
wants to merge
1
commit into
community-scripts:main
from
ChristianHandy:feat/fleetpilot
Closed
FleetPilot #2417
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| #!/usr/bin/env bash | ||
| _CS_DEFAULT_URL="https://raw.githubusercontent.com/community-scripts/DevScripts/main" | ||
| _cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" | ||
| source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") | ||
| # Copyright (c) 2021-2026 community-scripts ORG | ||
| # Author: ChristianHandy | ||
| # License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE | ||
| # Source: https://github.com/ChristianHandy/FleetPilot | ||
|
|
||
| APP="FleetPilot" | ||
| var_tags="${var_tags:-monitoring;infrastructure}" | ||
| var_cpu="${var_cpu:-2}" | ||
| var_ram="${var_ram:-2048}" | ||
| var_disk="${var_disk:-8}" | ||
| var_os="${var_os:-debian}" | ||
| var_version="${var_version:-13}" | ||
| #var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified | ||
| var_unprivileged="${var_unprivileged:-1}" | ||
|
|
||
| header_info "$APP" | ||
| variables | ||
| color | ||
| catch_errors | ||
|
|
||
| function update_script() { | ||
| header_info | ||
| check_container_storage | ||
| check_container_resources | ||
|
|
||
| if [[ ! -d /opt/fleetpilot ]]; then | ||
| msg_error "No FleetPilot Installation Found!" | ||
| exit | ||
| fi | ||
|
|
||
| if check_for_gh_release "fleetpilot" "ChristianHandy/FleetPilot"; then | ||
| msg_info "Stopping FleetPilot" | ||
| systemctl stop fleetpilot | ||
| msg_ok "Stopped FleetPilot" | ||
|
|
||
| create_backup /opt/fleetpilot/.env | ||
|
|
||
| CLEAN_INSTALL=1 CLEAN_INSTALL_KEEP="data logs venv" fetch_and_deploy_gh_release "fleetpilot" "ChristianHandy/FleetPilot" "tarball" | ||
|
|
||
| restore_backup | ||
| PYTHON_VERSION="3.13" setup_uv | ||
|
|
||
| msg_info "Updating Python Environment" | ||
| $STD uv pip install -p /opt/fleetpilot/venv/bin/python -r /opt/fleetpilot/requirements.txt | ||
| msg_ok "Updated Python Environment" | ||
|
|
||
| msg_info "Starting FleetPilot" | ||
| systemctl start fleetpilot | ||
| msg_ok "Started FleetPilot" | ||
| msg_ok "Updated successfully!" | ||
| fi | ||
| exit | ||
| } | ||
|
|
||
| start | ||
| build_container | ||
| description | ||
|
|
||
| msg_ok "Completed Successfully!\n" | ||
| echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" | ||
| echo -e "${INFO}${YW}Access it using the following URL:${CL}" | ||
| echo -e "${GATEWAY}${BGN}https://${IP}${CL}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright (c) 2021-2026 community-scripts ORG | ||
| # Author: ChristianHandy | ||
| # License: MIT | https://github.com/community-scripts/DevScripts/raw/main/LICENSE | ||
| # Source: https://github.com/ChristianHandy/FleetPilot | ||
|
|
||
| source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" | ||
| color | ||
| verb_ip6 | ||
| catch_errors | ||
| setting_up_container | ||
| network_check | ||
| update_os | ||
|
|
||
| msg_info "Installing Dependencies" | ||
| $STD apt install -y \ | ||
| nginx \ | ||
| smartmontools | ||
| msg_ok "Installed Dependencies" | ||
|
|
||
| fetch_and_deploy_gh_release "fleetpilot" "ChristianHandy/FleetPilot" "tarball" | ||
| PYTHON_VERSION="3.13" setup_uv | ||
|
|
||
| msg_info "Setting up Python Environment" | ||
| $STD uv venv /opt/fleetpilot/venv | ||
| $STD uv pip install -p /opt/fleetpilot/venv/bin/python -r /opt/fleetpilot/requirements.txt | ||
| msg_ok "Set up Python Environment" | ||
|
|
||
| msg_info "Configuring FleetPilot" | ||
| mkdir -p /opt/fleetpilot/data /opt/fleetpilot/logs /root/.ssh | ||
| chmod 700 /opt/fleetpilot/data /root/.ssh | ||
| # FleetPilot signs in to the servers it manages with this key. | ||
| ssh-keygen -q -t ed25519 -N "" -C "fleetpilot@$(hostname)" -f /root/.ssh/id_ed25519 | ||
| cat <<EOT >/opt/fleetpilot/.env | ||
| SECRET_KEY=$(openssl rand -hex 32) | ||
| FLEETPILOT_DATA_DIR=/opt/fleetpilot/data | ||
| DASHBOARD_USERNAME=admin | ||
| DASHBOARD_PASSWORD=$(random_password) | ||
| GUNICORN_BIND=127.0.0.1:5000 | ||
| FLEETPILOT_PRODUCTION=true | ||
| FLEETPILOT_TRUST_PROXY=true | ||
| FLEETPILOT_COOKIE_SECURE=true | ||
| FLEETPILOT_HSTS=false | ||
| EOT | ||
| chmod 600 /opt/fleetpilot/.env | ||
| msg_ok "Configured FleetPilot" | ||
|
|
||
| create_self_signed_cert "fleetpilot" | ||
|
|
||
| msg_info "Configuring Nginx" | ||
| cat <<EOT >/etc/nginx/sites-available/fleetpilot | ||
| server { | ||
| listen 80; | ||
| server_name _; | ||
| return 301 https://\$host\$request_uri; | ||
| } | ||
|
|
||
| server { | ||
| listen 443 ssl; | ||
| http2 on; | ||
| server_name _; | ||
|
|
||
| ssl_certificate /etc/ssl/fleetpilot/fleetpilot.crt; | ||
| ssl_certificate_key /etc/ssl/fleetpilot/fleetpilot.key; | ||
| ssl_protocols TLSv1.2 TLSv1.3; | ||
| client_max_body_size 16m; | ||
|
|
||
| location = /system/backups/restore { | ||
| client_max_body_size 512m; | ||
| proxy_pass http://127.0.0.1:5000; | ||
| proxy_set_header Host \$host; | ||
| proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto \$scheme; | ||
| } | ||
|
|
||
| location / { | ||
| proxy_pass http://127.0.0.1:5000; | ||
| proxy_set_header Host \$host; | ||
| proxy_set_header X-Forwarded-For \$proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto \$scheme; | ||
| proxy_read_timeout 300s; | ||
| proxy_buffering off; | ||
| } | ||
| } | ||
| EOT | ||
| nginx_enable_site "fleetpilot" | ||
| msg_ok "Configured Nginx" | ||
|
|
||
| msg_info "Creating Service" | ||
| cat <<EOT >/etc/systemd/system/fleetpilot.service | ||
| [Unit] | ||
| Description=FleetPilot | ||
| Wants=network-online.target | ||
| After=network-online.target | ||
|
|
||
| [Service] | ||
| Type=exec | ||
| User=root | ||
| WorkingDirectory=/opt/fleetpilot | ||
| EnvironmentFile=/opt/fleetpilot/.env | ||
| ExecStart=/opt/fleetpilot/venv/bin/gunicorn --config /opt/fleetpilot/gunicorn.conf.py app:app | ||
| Restart=on-failure | ||
| RestartSec=5 | ||
|
|
||
| [Install] | ||
| WantedBy=multi-user.target | ||
| EOT | ||
| systemctl enable -q --now fleetpilot | ||
| msg_ok "Created Service" | ||
|
|
||
| motd_ssh | ||
| customize | ||
| cleanup_lxc | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,49 @@ | ||||||||||||||
| { | ||||||||||||||
| "name": "FleetPilot", | ||||||||||||||
| "slug": "fleetpilot", | ||||||||||||||
| "categories": [ | ||||||||||||||
| 9 | ||||||||||||||
| ], | ||||||||||||||
| "date_created": "2026-10-12", | ||||||||||||||
| "type": "ct", | ||||||||||||||
| "updateable": true, | ||||||||||||||
| "privileged": false, | ||||||||||||||
| "interface_port": 443, | ||||||||||||||
| "documentation": "https://github.com/ChristianHandy/FleetPilot/blob/main/docs/user-guide.md", | ||||||||||||||
| "website": "https://github.com/ChristianHandy/FleetPilot", | ||||||||||||||
| "repository": "https://github.com/ChristianHandy/FleetPilot", | ||||||||||||||
| "logo": "https://cdn.jsdelivr.net/gh/ChristianHandy/FleetPilot@main/static/fleetpilot-logo.svg", | ||||||||||||||
| "description": "Self-hosted operations dashboard for home labs and small companies: server updates, SMART disk health, routers (FRITZ!Box, OpenWrt, OPNsense, pfSense, MikroTik), Proxmox VMs, TrueNAS/Unraid storage, backup servers and fans, managed over SSH and APIs without agents.", | ||||||||||||||
| "install_methods": [ | ||||||||||||||
| { | ||||||||||||||
| "type": "default", | ||||||||||||||
| "script": "ct/fleetpilot.sh", | ||||||||||||||
| "config_path": "/opt/fleetpilot/.env", | ||||||||||||||
| "resources": { | ||||||||||||||
| "cpu": 2, | ||||||||||||||
| "ram": 2048, | ||||||||||||||
| "hdd": 8, | ||||||||||||||
| "os": "Debian", | ||||||||||||||
| "version": "13" | ||||||||||||||
| } | ||||||||||||||
| } | ||||||||||||||
| ], | ||||||||||||||
| "default_credentials": { | ||||||||||||||
| "username": "admin", | ||||||||||||||
| "password": null | ||||||||||||||
| }, | ||||||||||||||
| "notes": [ | ||||||||||||||
| { | ||||||||||||||
| "text": "Open https://<container-ip> and accept the self-signed certificate once. Sign in as admin; the password is DASHBOARD_PASSWORD in /opt/fleetpilot/.env. Change it after the first sign-in under My Profile and set up two-factor sign-in.", | ||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| "type": "info" | ||||||||||||||
| }, | ||||||||||||||
| { | ||||||||||||||
| "text": "FleetPilot manages other machines over SSH with the key /root/.ssh/id_ed25519.pub inside the container. Add that key to each server's authorized_keys, or use Manage Hosts → Install Key. To manage the Proxmox node itself, add the node as a host the same way.", | ||||||||||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| "type": "info" | ||||||||||||||
| }, | ||||||||||||||
| { | ||||||||||||||
| "text": "Update FleetPilot with this script's update function. The in-app 'FleetPilot update' page expects a git checkout and does not apply to this container.", | ||||||||||||||
| "type": "warning" | ||||||||||||||
| } | ||||||||||||||
|
Comment on lines
+43
to
+47
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
| ] | ||||||||||||||
| } | ||||||||||||||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.