Skip to content

Commit 54cb821

Browse files
authored
Merge pull request #2316 from visbran/feat/openseo
feat: add OpenSEO LXC script
2 parents a776752 + fcc04f2 commit 54cb821

3 files changed

Lines changed: 209 additions & 0 deletions

File tree

‎ct/openseo.sh‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
#!/usr/bin/env bash
2+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
3+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
4+
# Copyright (c) 2021-2026 community-scripts ORG
5+
# Author: Brandon Visca (visbran)
6+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
7+
# Source: https://github.com/every-app/open-seo
8+
9+
APP="OpenSEO"
10+
var_tags="${var_tags:-seo;analytics;marketing}"
11+
var_cpu="${var_cpu:-2}"
12+
var_ram="${var_ram:-4096}"
13+
var_disk="${var_disk:-10}"
14+
var_os="${var_os:-debian}"
15+
var_version="${var_version:-13}"
16+
#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified
17+
var_unprivileged="${var_unprivileged:-1}"
18+
export var_dataforseo_api_key="${var_dataforseo_api_key:-}"
19+
20+
header_info "$APP"
21+
variables
22+
color
23+
catch_errors
24+
25+
function update_script() {
26+
header_info
27+
check_container_storage
28+
check_container_resources
29+
30+
if [[ ! -d /opt/openseo ]]; then
31+
msg_error "No ${APP} Installation Found!"
32+
exit
33+
fi
34+
35+
if check_for_gh_release "openseo" "every-app/open-seo"; then
36+
msg_info "Stopping OpenSEO"
37+
systemctl stop openseo
38+
msg_ok "Stopped OpenSEO"
39+
40+
create_backup /opt/openseo/.env /opt/openseo/.wrangler
41+
42+
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "openseo" "every-app/open-seo" "tarball"
43+
44+
restore_backup
45+
46+
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/openseo/package.json)
47+
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION:-10.30.1}" setup_nodejs
48+
49+
msg_info "Building OpenSEO"
50+
cd /opt/openseo
51+
$STD pnpm install --frozen-lockfile
52+
# The Cloudflare vite plugin serializes the whole process env into .dev.vars; run with a clean env so it only sees /opt/openseo/.env
53+
$STD env -i PATH="$PATH" HOME=/root pnpm run db:migrate:local
54+
$STD env -i PATH="$PATH" HOME=/root pnpm run build
55+
msg_ok "Built OpenSEO"
56+
57+
msg_info "Starting OpenSEO"
58+
systemctl start openseo
59+
msg_ok "Started OpenSEO"
60+
msg_ok "Updated successfully!"
61+
fi
62+
exit
63+
}
64+
65+
start
66+
build_container
67+
description
68+
69+
msg_ok "Completed Successfully!\n"
70+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
71+
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
72+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:3001${CL}"

‎install/openseo-install.sh‎

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: Brandon Visca (visbran)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/every-app/open-seo
7+
8+
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
9+
color
10+
verb_ip6
11+
catch_errors
12+
setting_up_container
13+
network_check
14+
update_os
15+
16+
fetch_and_deploy_gh_release "openseo" "every-app/open-seo" "tarball"
17+
18+
PNPM_VERSION=$(sed -n 's/.*"packageManager": "pnpm@\([^"+]*\).*/\1/p' /opt/openseo/package.json)
19+
NODE_VERSION="22" NODE_MODULE="pnpm@${PNPM_VERSION:-10.30.1}" setup_nodejs
20+
21+
if [[ -z "${var_dataforseo_api_key:-}" ]]; then
22+
var_dataforseo_api_key=$(prompt_input "DataForSEO API key (base64 of login:password, leave empty to set later):" "" 120)
23+
fi
24+
25+
msg_info "Configuring OpenSEO"
26+
cat <<EOF >/opt/openseo/.env
27+
AUTH_MODE=local_noauth
28+
CLOUDFLARE_INCLUDE_PROCESS_ENV=true
29+
PORT=3001
30+
ALLOWED_HOST=
31+
DATAFORSEO_API_KEY=${var_dataforseo_api_key:-}
32+
OPENROUTER_API_KEY=
33+
OPENROUTER_MODEL=
34+
OPENSEO_TELEMETRY_DISABLED=
35+
VITE_SHOW_DEVTOOLS=false
36+
EOF
37+
msg_ok "Configured OpenSEO"
38+
39+
msg_info "Building OpenSEO"
40+
cd /opt/openseo
41+
$STD pnpm install --frozen-lockfile
42+
# The Cloudflare vite plugin serializes the whole process env into .dev.vars; run with a clean env so it only sees /opt/openseo/.env
43+
$STD env -i PATH="$PATH" HOME=/root pnpm run db:migrate:local
44+
$STD env -i PATH="$PATH" HOME=/root pnpm run build
45+
msg_ok "Built OpenSEO"
46+
47+
msg_info "Creating Service"
48+
cat <<EOF >/etc/systemd/system/openseo.service
49+
[Unit]
50+
Description=OpenSEO
51+
After=network.target
52+
53+
[Service]
54+
Type=simple
55+
User=root
56+
WorkingDirectory=/opt/openseo
57+
EnvironmentFile=/opt/openseo/.env
58+
ExecStart=/usr/bin/pnpm exec vite preview --host 0.0.0.0
59+
Restart=on-failure
60+
RestartSec=5
61+
62+
[Install]
63+
WantedBy=multi-user.target
64+
EOF
65+
systemctl enable -q --now openseo
66+
msg_ok "Created Service"
67+
68+
motd_ssh
69+
customize
70+
cleanup_lxc

‎json/openseo.json‎

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"name": "OpenSEO",
3+
"slug": "openseo",
4+
"categories": [
5+
9
6+
],
7+
"date_created": "2026-09-27",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"interface_port": 3001,
12+
"documentation": "https://github.com/every-app/open-seo/tree/main/docs",
13+
"website": "https://openseo.so/",
14+
"repository": "https://github.com/every-app/open-seo",
15+
"logo": "https://cdn.jsdelivr.net/gh/every-app/open-seo@main/public/android-chrome-192x192.png",
16+
"description": "OpenSEO is an open source SEO platform for keyword research, rank tracking, competitor analysis, backlinks and site audits, powered by the pay-as-you-go DataForSEO API.",
17+
"install_methods": [
18+
{
19+
"type": "default",
20+
"script": "ct/openseo.sh",
21+
"config_path": "/opt/openseo/.env",
22+
"resources": {
23+
"cpu": 2,
24+
"ram": 4096,
25+
"hdd": 10,
26+
"os": "Debian",
27+
"version": "13"
28+
}
29+
}
30+
],
31+
"default_credentials": {
32+
"username": null,
33+
"password": null
34+
},
35+
"app_vars": [
36+
{
37+
"name": "var_dataforseo_api_key",
38+
"label": "DataForSEO API Key",
39+
"type": "password",
40+
"secret": true,
41+
"required": false,
42+
"help": "Base64 of your DataForSEO login:password (printf 'email:password' | base64). Can be set later in /opt/openseo/.env."
43+
}
44+
],
45+
"notes": [
46+
{
47+
"text": "OpenSEO runs with AUTH_MODE=local_noauth: there is no login, anyone who reaches port 3001 is the admin. Keep it on a private network or behind an auth-protected reverse proxy.",
48+
"type": "warning"
49+
},
50+
{
51+
"text": "SEO data comes from the paid DataForSEO API (pay-as-you-go, $50 minimum top-up). DATAFORSEO_API_KEY is the base64 of your DataForSEO login:password.",
52+
"type": "info"
53+
},
54+
{
55+
"text": "The configuration is baked in at build time: after editing /opt/openseo/.env (DATAFORSEO_API_KEY, ALLOWED_HOST, OPENSEO_TELEMETRY_DISABLED...), a restart is not enough. Rebuild with 'cd /opt/openseo && env -i PATH=\"$PATH\" HOME=/root pnpm run build && systemctl restart openseo'.",
56+
"type": "warning"
57+
},
58+
{
59+
"text": "Behind a reverse proxy, set ALLOWED_HOST to the public hostname in /opt/openseo/.env, then rebuild.",
60+
"type": "info"
61+
},
62+
{
63+
"text": "OpenSEO sends an anonymous usage heartbeat. Set OPENSEO_TELEMETRY_DISABLED=1 in /opt/openseo/.env, then rebuild, to turn it off.",
64+
"type": "info"
65+
}
66+
]
67+
}

0 commit comments

Comments
 (0)