Skip to content

New Script: bolt.diy #2528

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

Merged
merged 2 commits into from
Feb 23, 2025
Merged
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
71 changes: 71 additions & 0 deletions ct/boltdiy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/stackblitz-labs/bolt.diy/

APP="boltdiy"
TAGS="code;ai"
var_cpu="2"
var_ram="3072"
var_disk="6"
var_os="debian"
var_version="12"
var_unprivileged="1"

header_info "$APP"
variables
color
catch_errors

function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/bolt.diy ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -s https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ "${RELEASE}" != "$(cat /opt/boltdiy_version.txt)" ]] || [[ ! -f /opt/boltdiy_version.txt ]]; then
msg_info "Stopping $APP"
systemctl stop boltdiy
msg_ok "Stopped $APP"

msg_info "Updating $APP to v${RELEASE}"
temp_dir=$(mktemp -d)
temp_file=$(mktemp)
cd $temp_dir
wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
tar xzf $temp_file
cp -rf bolt.diy-${RELEASE}/* /opt/bolt.diy
cd /opt/bolt.diy
$STD pnpm install
msg_ok "Updated $APP to v${RELEASE}"

msg_info "Starting $APP"
systemctl start boltdiy
msg_ok "Started $APP"

msg_info "Cleaning Up"
rm -rf $temp_file
rm -rf $temp_dir
msg_ok "Cleanup Completed"

echo "${RELEASE}" >/opt/boltdiy_version.txt
msg_ok "Update Successful"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"
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}:5173${CL}"
74 changes: 74 additions & 0 deletions install/boltdiy-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#!/usr/bin/env bash

# Copyright (c) 2021-2025 community-scripts ORG
# Author: Slaviša Arežina (tremor021)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/stackblitz-labs/bolt.diy/

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

msg_info "Installing Dependencies"
$STD apt-get install -y \
curl \
sudo \
mc \
gnupg \
git
msg_ok "Installed Dependencies"

msg_info "Setup Node.js Repository"
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
msg_ok "Setup Node.js Repository"

msg_info "Setup Node.js"
$STD apt-get update
$STD apt-get install -y nodejs
$STD npm install -g pnpm
msg_ok "Setup Node.js"

msg_info "Setup bolt.diy"
temp_file=$(mktemp)
RELEASE=$(curl -s https://api.github.com/repos/stackblitz-labs/bolt.diy/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
wget -q "https://github.com/stackblitz-labs/bolt.diy/archive/refs/tags/v${RELEASE}.tar.gz" -O $temp_file
tar xzf $temp_file
mv bolt.diy-${RELEASE} /opt/bolt.diy
cd /opt/bolt.diy
$STD pnpm install
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
msg_ok "Setup bolt.diy"

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

[Service]
Type=simple
User=root
WorkingDirectory=/opt/bolt.diy
ExecStart=/usr/bin/pnpm run dev --host
Restart=always

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

motd_ssh
customize

msg_info "Cleaning up"
rm -f $temp_file
$STD apt-get -y autoremove
$STD apt-get -y autoclean
msg_ok "Cleaned"
34 changes: 34 additions & 0 deletions json/boltdiy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "bolt.diy",
"slug": "boltdiy",
"categories": [
20
],
"date_created": "2025-02-21",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 5173,
"documentation": "https://stackblitz-labs.github.io/bolt.diy/",
"website": "https://github.com/stackblitz-labs/bolt.diy",
"logo": "https://github.com/stackblitz-labs/bolt.diy/raw/refs/heads/main/icons/logo-text.svg",
"description": "The official open source version of Bolt.new (previously known as oTToDev and bolt.new ANY LLM), which allows you to choose the LLM that you use for each prompt! Currently, you can use OpenAI, Anthropic, Ollama, OpenRouter, Gemini, LMStudio, Mistral, xAI, HuggingFace, DeepSeek, or Groq models - and it is easily extended to use any other model supported by the Vercel AI SDK!",
"install_methods": [
{
"type": "default",
"script": "ct/boltdiy.sh",
"resources": {
"cpu": 2,
"ram": 3072,
"hdd": 6,
"os": "debian",
"version": "12"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": []
}