Skip to content

Commit 543d75d

Browse files
authored
Merge pull request #2222 from mfelipe/feature/OpenViking
Add OpenViking
2 parents 8122789 + 5f98535 commit 543d75d

3 files changed

Lines changed: 333 additions & 0 deletions

File tree

‎ct/openviking.sh‎

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
#!/usr/bin/env bash
2+
# Engine comes from community-scripts/core; this repo only ships the scripts.
3+
# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core),
4+
# so a fork or branch of core can be tested without editing this file.
5+
_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func"
6+
source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func")
7+
# Copyright (c) 2021-2026 community-scripts ORG
8+
# Author: Marcos Felipe (mfelipe)
9+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
10+
# Source: https://github.com/volcengine/OpenViking
11+
12+
APP="OpenViking"
13+
var_tags="${var_tags:-ai;memory;rag}"
14+
var_arm64="${var_arm64:-yes}"
15+
var_unprivileged="${var_unprivileged:-1}"
16+
if [[ -z "${var_os:-}" ]] && command -v pveversion >/dev/null 2>&1; then
17+
var_os=$(msg_menu "Choose the container OS" \
18+
"debian" "Debian 13 (recommended)" \
19+
"alpine" "Alpine 3.24 (smaller footprint)")
20+
fi
21+
22+
if [[ "${var_os:-}" == "alpine" ]]; then
23+
var_cpu="${var_cpu:-1}"
24+
var_ram="${var_ram:-1024}"
25+
var_disk="${var_disk:-8}"
26+
var_version="${var_version:-3.24}"
27+
else
28+
var_cpu="${var_cpu:-2}"
29+
var_ram="${var_ram:-2048}"
30+
var_disk="${var_disk:-8}"
31+
var_version="${var_version:-13}"
32+
fi
33+
34+
header_info "$APP"
35+
variables
36+
color
37+
catch_errors
38+
39+
update_deb_based() {
40+
if [[ ! -d /opt/openviking ]]; then
41+
msg_error "No ${APP} Installation Found!"
42+
exit
43+
fi
44+
45+
msg_info "Updating Debian Packages"
46+
$STD apt update
47+
$STD apt -y upgrade
48+
msg_ok "Updated Debian Packages"
49+
50+
if check_for_gh_release "openviking-server" "volcengine/OpenViking"; then
51+
msg_info "Stopping Service"
52+
systemctl stop openviking
53+
msg_ok "Stopped Service"
54+
55+
msg_info "Updating ${APP}"
56+
$STD uv pip install --python /opt/openviking/bin/python --upgrade openviking
57+
msg_ok "Updated ${APP}"
58+
59+
msg_info "Starting Service"
60+
systemctl start openviking
61+
msg_ok "Started Service"
62+
msg_ok "Updated successfully!"
63+
fi
64+
}
65+
66+
update_alpine() {
67+
if [[ ! -d /opt/openviking ]]; then
68+
msg_error "No ${APP} Installation Found!"
69+
exit
70+
fi
71+
72+
msg_info "Updating Alpine Packages"
73+
$STD apk -U upgrade
74+
msg_ok "Updated Alpine Packages"
75+
76+
if check_for_gh_release "openviking-server" "volcengine/OpenViking"; then
77+
msg_info "Stopping Service"
78+
$STD rc-service openviking stop
79+
msg_ok "Stopped Service"
80+
81+
msg_info "Updating ${APP}"
82+
$STD uv pip install --python /opt/openviking/bin/python --upgrade openviking
83+
msg_ok "Updated ${APP}"
84+
85+
msg_info "Starting Service"
86+
$STD rc-service openviking start
87+
msg_ok "Started Service"
88+
msg_ok "Updated successfully!"
89+
fi
90+
}
91+
92+
function update_script() {
93+
header_info
94+
check_container_storage
95+
check_container_resources
96+
run_os_update
97+
exit
98+
}
99+
100+
start
101+
build_container
102+
description
103+
104+
msg_ok "Completed Successfully!\n"
105+
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
106+
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
107+
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:1933/studio${CL}"
108+
echo -e "${INFO}${YW}Root API Key:${CL}"
109+
echo -e "${TAB}${DGN}$(pct exec "$CTID" -- sed -n 's/.*"root_api_key": "\([^"]*\)".*/\1/p' /opt/openviking_data/ov.conf)${CL}"
110+
echo -e "${INFO}${YW}Model API keys are configured in /opt/openviking_data/ov.conf${CL}"
111+
echo -e "${TAB}${DGN}Edit the file and restart the openviking service afterwards${CL}"

‎install/openviking-install.sh‎

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
#!/usr/bin/env bash
2+
3+
# Copyright (c) 2021-2026 community-scripts ORG
4+
# Author: Marcos Felipe (mfelipe)
5+
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
6+
# Source: https://github.com/volcengine/OpenViking
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+
_ov_install_server() {
17+
PYTHON_VERSION="3.12" setup_uv
18+
19+
msg_info "Installing OpenViking"
20+
$STD uv venv --python 3.12 /opt/openviking
21+
$STD uv pip install --python /opt/openviking/bin/python openviking
22+
cat <<EOF >~/.openviking-server
23+
$(get_latest_github_release "volcengine/OpenViking")
24+
EOF
25+
msg_ok "Installed OpenViking"
26+
27+
msg_info "Configuring OpenViking"
28+
ROOT_API_KEY=$(openssl rand -hex 32)
29+
mkdir -p /opt/openviking_data
30+
cat <<EOF >/opt/openviking_data/ov.conf
31+
{
32+
"server": {
33+
"host": "0.0.0.0",
34+
"port": 1933,
35+
"root_api_key": "${ROOT_API_KEY}",
36+
"cors_origins": ["*"]
37+
},
38+
"storage": {
39+
"workspace": "/opt/openviking_data/data",
40+
"agfs": { "backend": "local" },
41+
"vectordb": { "backend": "local" }
42+
},
43+
"embedding": {
44+
"dense": {
45+
"api_base": "https://api.openai.com/v1",
46+
"api_key": "REPLACE_WITH_YOUR_EMBEDDING_API_KEY",
47+
"provider": "openai",
48+
"dimension": 1536,
49+
"model": "text-embedding-3-small"
50+
}
51+
},
52+
"vlm": {
53+
"api_base": "https://api.openai.com/v1",
54+
"api_key": "REPLACE_WITH_YOUR_VLM_API_KEY",
55+
"provider": "openai",
56+
"model": "gpt-4o"
57+
}
58+
}
59+
EOF
60+
chmod 600 /opt/openviking_data/ov.conf
61+
msg_ok "Configured OpenViking"
62+
}
63+
64+
_ov_wait_ready() {
65+
local ready=0
66+
for _ in {1..30}; do
67+
if curl -fsS -o /dev/null "http://127.0.0.1:1933/health"; then
68+
ready=1
69+
break
70+
fi
71+
sleep 2
72+
done
73+
if [[ "$ready" -ne 1 ]]; then
74+
msg_error "OpenViking did not become healthy within 60 seconds — check 'systemctl status openviking' (Debian) or 'rc-service openviking status' (Alpine)"
75+
exit 1
76+
fi
77+
}
78+
79+
setup_deb_based() {
80+
msg_info "Installing Dependencies"
81+
$STD apt install -y openssl
82+
msg_ok "Installed Dependencies"
83+
84+
_ov_install_server
85+
86+
msg_info "Creating Service"
87+
cat <<EOF >/etc/systemd/system/openviking.service
88+
[Unit]
89+
Description=OpenViking HTTP Server
90+
After=network.target
91+
92+
[Service]
93+
Type=simple
94+
User=root
95+
WorkingDirectory=/opt/openviking_data
96+
Environment="OPENVIKING_CONFIG_FILE=/opt/openviking_data/ov.conf"
97+
ExecStart=/opt/openviking/bin/openviking-server
98+
Restart=always
99+
RestartSec=5
100+
101+
[Install]
102+
WantedBy=multi-user.target
103+
EOF
104+
systemctl enable -q --now openviking
105+
_ov_wait_ready
106+
msg_ok "Created Service"
107+
}
108+
109+
setup_alpine() {
110+
msg_info "Installing Dependencies"
111+
$STD apk add openssl
112+
msg_ok "Installed Dependencies"
113+
114+
_ov_install_server
115+
116+
msg_info "Creating Service"
117+
cat <<'EOF' >/etc/init.d/openviking
118+
#!/sbin/openrc-run
119+
name="OpenViking"
120+
description="OpenViking - a self-evolving context database for AI agents"
121+
122+
command="/opt/openviking/bin/openviking-server"
123+
command_user="root"
124+
supervisor=supervise-daemon
125+
output_log="/var/log/openviking.log"
126+
error_log="/var/log/openviking.log"
127+
pidfile="/run/${RC_SVCNAME}.pid"
128+
respawn_delay=10
129+
130+
depend() {
131+
need net
132+
after firewall
133+
}
134+
135+
start_pre() {
136+
checkpath -d -m 0750 -o root:root /opt/openviking_data
137+
checkpath -f -m 0640 "$output_log"
138+
}
139+
EOF
140+
chmod +x /etc/init.d/openviking
141+
cat <<EOF >/etc/conf.d/openviking
142+
export OPENVIKING_CONFIG_FILE=/opt/openviking_data/ov.conf
143+
EOF
144+
$STD rc-update add openviking default
145+
$STD rc-service openviking start
146+
_ov_wait_ready
147+
msg_ok "Created Service"
148+
}
149+
150+
run_os_setup
151+
152+
msg_info "Running OpenViking Doctor"
153+
if OPENVIKING_CONFIG_FILE=/opt/openviking_data/ov.conf /opt/openviking/bin/openviking-server doctor >/dev/null 2>&1; then
154+
msg_ok "Doctor check passed"
155+
else
156+
msg_warn "Doctor check reported warnings — configure the model API keys in /opt/openviking_data/ov.conf and restart the service"
157+
fi
158+
159+
motd_ssh
160+
customize
161+
cleanup_lxc

‎json/openviking.json‎

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
{
2+
"name": "OpenViking",
3+
"slug": "openviking",
4+
"categories": [
5+
20
6+
],
7+
"date_created": "2026-08-25",
8+
"type": "ct",
9+
"updateable": true,
10+
"privileged": false,
11+
"architectures": [
12+
"amd64",
13+
"arm64"
14+
],
15+
"interface_port": 1933,
16+
"documentation": "https://docs.openviking.ai/",
17+
"website": "https://www.openviking.ai/",
18+
"repository": "https://github.com/volcengine/OpenViking",
19+
"logo": "https://raw.githubusercontent.com/volcengine/OpenViking/main/web-studio/public/icon-512.png",
20+
"description": "OpenViking is a self-evolving context database for AI agents that unifies agent memory, knowledge RAG and skills. Run it as a standalone HTTP server and connect any client (Python SDK, CLI, or the bundled Web Studio).",
21+
"install_methods": [
22+
{
23+
"type": "default",
24+
"script": "ct/openviking.sh",
25+
"config_path": "/opt/openviking_data/ov.conf",
26+
"resources": {
27+
"cpu": 2,
28+
"ram": 2048,
29+
"hdd": 8,
30+
"os": "Debian",
31+
"version": "13"
32+
}
33+
},
34+
{
35+
"type": "alpine",
36+
"script": "ct/openviking.sh",
37+
"config_path": "/opt/openviking_data/ov.conf",
38+
"resources": {
39+
"cpu": 1,
40+
"ram": 1024,
41+
"hdd": 8,
42+
"os": "Alpine",
43+
"version": "3.24"
44+
}
45+
}
46+
],
47+
"default_credentials": {
48+
"username": null,
49+
"password": null
50+
},
51+
"notes": [
52+
{
53+
"text": "Model API keys must be configured in /opt/openviking_data/ov.conf (embedding and VLM sections) before the server can store or retrieve memory. Edit the file and restart the service afterwards.",
54+
"type": "warning"
55+
},
56+
{
57+
"text": "A root API key is generated during install and printed at the end of the setup; it is also stored as server.root_api_key in /opt/openviking_data/ov.conf.",
58+
"type": "info"
59+
}
60+
]
61+
}

0 commit comments

Comments
 (0)