Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ct/headers/tracktor
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__ __ __
/ /__________ ______/ /__/ /_____ _____
/ __/ ___/ __ `/ ___/ //_/ __/ __ \/ ___/
/ /_/ / / /_/ / /__/ ,< / /_/ /_/ / /
\__/_/ \__,_/\___/_/|_|\__/\____/_/

73 changes: 73 additions & 0 deletions ct/tracktor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#!/usr/bin/env bash
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://tracktor.bytedge.in/

APP="tracktor"
var_tags="${var_tags:-car;monitoring}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-4096}"
var_disk="${var_disk:-6}"
var_os="${var_os:-debian}"
var_version="${var_version:-12}"
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/tracktor ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi

RELEASE=$(curl -fsSL https://api.github.com/repos/javedh-dev/tracktor/releases/latest | jq -r '.tag_name' | sed 's/^v//')
if [[ "${RELEASE}" != "$(cat ~/.tracktor 2>/dev/null)" ]] || [[ ! -f ~/.tracktor ]]; then
msg_info "Stopping Service"
systemctl stop tracktor
msg_ok "Stopped Service"

msg_info "Creating Backup"
cp /opt/tracktor/app/server/.env /opt/tracktor.env
msg_ok "Created Backup"


setup_nodejs
fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor"

msg_info "Updating ${APP}"
cd /opt/tracktor
rm package-lock.json
$STD npm install
$STD npm run build
msg_ok "Updated $APP"

msg_info "Restoring Backup"
cp /opt/tracktor.env /opt/tracktor/app/server/.env
msg_ok "Restored Backup"

msg_info "Starting Service"
systemctl start tracktor
msg_ok "Started Service"
msg_ok "Updated Successfully"
else
msg_ok "Already up to date"
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 "${TAB}${GATEWAY}${BGN}http://${IP}:3000${CL}"
35 changes: 35 additions & 0 deletions frontend/public/json/tracktor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"name": "Tracktor",
"slug": "tracktor",
"categories": [
9
],
"date_created": "2025-08-06",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3000,
"documentation": "https://tracktor.bytedge.in/introduction.html",
"config_path": "/opt/tracktor/app/server/.env",
"website": "https://tracktor.bytedge.in/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/svg/tracktor.svg",
"description": "Tracktor is an open-source web application for comprehensive vehicle management.\nEasily track ⛽ fuel consumption, 🛠️ maintenance, 🛡️ insurance, and 📄 regulatory documents for all your vehicles in one place. ",
"install_methods": [
{
"type": "default",
"script": "ct/tracktor.sh",
"resources": {
"cpu": 1,
"ram": 1024,
"hdd": 6,
"os": "Debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}
59 changes: 59 additions & 0 deletions install/tracktor-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash

# Copyright (c) 2025 Community Scripts ORG
# Author: CrazyWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://tracktor.bytedge.in

source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os

setup_nodejs
fetch_and_deploy_gh_release "tracktor" "javedh-dev/tracktor" "tarball" "latest" "/opt/tracktor"

msg_info "Configuring Tracktor"
cd /opt/tracktor
rm package-lock.json
$STD npm install
$STD npm run build
mkdir /opt/tracktor-data
HOST_IP=$(hostname -I | awk '{print $1}')
cat <<EOF >/opt/tracktor/app/server/.env
NODE_ENV=production
PUBLIC_DEMO_MODE=false
DB_PATH=/opt/tracktor-data/vehicles.db
PUBLIC_API_BASE_URL=http://$HOST_IP:3000
PORT=3000
EOF
msg_ok "Configured Tracktor"

msg_info "Creating service"
cat <<EOF >/etc/systemd/system/tracktor.service
[Unit]
Description=Tracktor Service
After=network.target

[Service]
Type=simple
WorkingDirectory=/opt/tracktor
EnvironmentFile=/opt/tracktor/app/server/.env
ExecStart=/usr/bin/npm start

[Install]
WantedBy=multi-user.target
EOF
systemctl enable -q --now tracktor
msg_ok "Created service"

motd_ssh
customize

msg_info "Cleaning up"
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"