$npx -y skills add volcengine/OpenViking --skill ov-server-operateOperate and maintain OpenViking server - configure, install, start, stop, and cleanup the server. Use when need to setup or manage OpenViking service deployment.
| 1 | # OpenViking Server Operations |
| 2 | |
| 3 | This guide provides standard operating procedures for deploying, managing, and maintaining OpenViking servers in production environments. |
| 4 | |
| 5 | ## Table of Content |
| 6 | - Service Configuration |
| 7 | - Environment Setup with uv |
| 8 | - Server Startup with nohup |
| 9 | - Server Shutdown |
| 10 | - Data Cleanup Procedure |
| 11 | - Verification and Troubleshooting |
| 12 | |
| 13 | ## Service Configuration |
| 14 | |
| 15 | ### Default Paths and Structure |
| 16 | |
| 17 | OpenViking uses the following standard directory structure under `~/.openviking/`: |
| 18 | |
| 19 | ``` |
| 20 | ~/.openviking/ |
| 21 | ├── ov.conf # Server configuration (required) |
| 22 | ├── ovcli.conf # CLI client configuration |
| 23 | ├── ov-venv/ # Virtual environment (created by uv) |
| 24 | ├── log/ # Server log directory |
| 25 | │ ├── openviking-server.log # server stdout log |
| 26 | │ └── openviking.log # server log |
| 27 | └── data/ # Workspace data (configured in ov.conf) |
| 28 | ├── ... |
| 29 | └── ... |
| 30 | ``` |
| 31 | |
| 32 | ### Configuration Files |
| 33 | |
| 34 | #### 1. Server Config (`~/.openviking/ov.conf`) |
| 35 | |
| 36 | Create the configuration file with at minimum the following configuration. |
| 37 | Note 1: Replace the api-key with your own api-key. If you don't have one, ask the user to get one (follow the Volcengine Ark platform guide). |
| 38 | Note 2: Replace the root_api_key with your own root-api-key. Ask the user to set one — it will be used for authentication when the CLI connects to the server. |
| 39 | |
| 40 | ```json |
| 41 | { |
| 42 | "server": { |
| 43 | "host": "0.0.0.0", |
| 44 | "port": 1933, |
| 45 | "root_api_key": "your-root-api-key" |
| 46 | }, |
| 47 | "storage": { |
| 48 | "workspace": "~/.openviking/data/" |
| 49 | }, |
| 50 | "parsers": { |
| 51 | "code": { |
| 52 | "gitlab_domains": ["code.byted.org"], |
| 53 | "azure_devops_domains": ["ssh.dev.azure.com", "vs-ssh.visualstudio.com"] |
| 54 | } |
| 55 | }, |
| 56 | "embedding": { |
| 57 | "dense": { |
| 58 | "model": "doubao-embedding-vision-251215", |
| 59 | "api_key": "your-volcengine-api-key", |
| 60 | "api_base": "https://ark.cn-beijing.volces.com/api/v3", |
| 61 | "dimension": 1024, |
| 62 | "input": "multimodal", |
| 63 | "provider": "volcengine" |
| 64 | } |
| 65 | }, |
| 66 | "vlm": { |
| 67 | "model": "doubao-seed-1-8-251228", |
| 68 | "api_key": "your-volcengine-api-key", |
| 69 | "api_base": "https://ark.cn-beijing.volces.com/api/v3", |
| 70 | "temperature": 0.0, |
| 71 | "max_retries": 2, |
| 72 | "provider": "volcengine", |
| 73 | "thinking": false |
| 74 | }, |
| 75 | "log": { |
| 76 | "level": "INFO", |
| 77 | "output": "file", |
| 78 | "rotation": true, |
| 79 | "rotation_days": 3, |
| 80 | "rotation_interval": "midnight" |
| 81 | } |
| 82 | } |
| 83 | ``` |
| 84 | |
| 85 | #### 2. CLI Config (`~/.openviking/ovcli.conf`) |
| 86 | |
| 87 | For client connections from localhost: |
| 88 | |
| 89 | ```json |
| 90 | { |
| 91 | "url": "http://localhost:1933", |
| 92 | "api_key": "your-root-api-key" |
| 93 | } |
| 94 | ``` |
| 95 | |
| 96 | For remote connections, set the url to the remote server address (for example, the server EIP). |
| 97 | |
| 98 | ## Environment Setup with uv |
| 99 | |
| 100 | ### Step 1: Install uv (if not already installed) |
| 101 | |
| 102 | ```bash |
| 103 | # macOS/Linux |
| 104 | curl -LsSf https://astral.sh/uv/install.sh | sh |
| 105 | |
| 106 | # Verify installation |
| 107 | uv --version |
| 108 | ``` |
| 109 | |
| 110 | ### Step 2: Create Virtual Environment |
| 111 | |
| 112 | Create a dedicated virtual environment at `~/.openviking/ov-venv`: |
| 113 | |
| 114 | ```bash |
| 115 | # Create venv with Python 3.10+ |
| 116 | cd ~/.openviking |
| 117 | uv venv --python 3.12 ov-venv |
| 118 | ``` |
| 119 | |
| 120 | ### Step 3: Activate and Install OpenViking |
| 121 | |
| 122 | ```bash |
| 123 | # Activate the virtual environment |
| 124 | source ~/.openviking/ov-venv/bin/activate |
| 125 | |
| 126 | # Install or upgrade to latest openviking |
| 127 | uv pip install --upgrade openviking --force-reinstall |
| 128 | |
| 129 | # Verify installation |
| 130 | which openviking-server |
| 131 | openviking-server --version |
| 132 | openviking-server --help |
| 133 | ``` |
| 134 | |
| 135 | ### Step 4: Create Log Directory |
| 136 | |
| 137 | ```bash |
| 138 | mkdir -p ~/.openviking/log |
| 139 | ``` |
| 140 | |
| 141 | ## Server Startup with nohup |
| 142 | |
| 143 | ### Standard Startup Procedure |
| 144 | |
| 145 | ```bash |
| 146 | # 1. Activate the virtual environment |
| 147 | source ~/.openviking/ov-venv/bin/activate |
| 148 | |
| 149 | # 2. Ensure log directory exists |
| 150 | mkdir -p ~/.openviking/log |
| 151 | |
| 152 | # 3. Start server with nohup |
| 153 | nohup openviking-server \ |
| 154 | > ~/.openviking/log/openviking-server.log 2>&1 & |
| 155 | |
| 156 | # 4. Save PID for later reference |
| 157 | echo $! > ~/.openviking/server.pid |
| 158 | |
| 159 | # 5. Verify startup after 10 secs |
| 160 | sleep 10 |
| 161 | curl -s http://localhost:1933/health |
| 162 | ``` |
| 163 | |
| 164 | ### Verify Server is Running |
| 165 | |
| 166 | ```bash |
| 167 | # Method 1: Check health endpoint |
| 168 | curl http://localhost:1933/health |
| 169 | # Expected: {"status": "ok"} |
| 170 | |
| 171 | # Method 2: Check readiness (includes storage checks) |
| 172 | curl http://localhost:1933/ready |
| 173 | |
| 174 | # Method 3: Check process |
| 175 | ps aux | grep openviking-server | grep -v grep |
| 176 | |
| 177 | # Method 4: Check log output |
| 178 | tail -10 ~/.openviking/log/openviking-server.log |
| 179 | tail -50 ~/.openviking/log/openviking.log |
| 180 | ``` |
| 181 | |
| 182 | ## Server Shutdown |
| 183 | |
| 184 | ### Graceful Shutdown Procedure |
| 185 | |
| 186 | ```bash |
| 187 | # 1. Find the server process |
| 188 | ps aux | grep openviking-server | grep -v grep |
| 189 | |
| 190 | # 2. Send SIGTERM for graceful shutdown |
| 191 | # Option A: Using saved PID |
| 192 | if [ -f ~/.openviking/server.pid ]; then |
| 193 | kill $(cat ~/.openviking/server.pid) |
| 194 | rm ~/.openviking/server.pid |
| 195 | fi |
| 196 | |
| 197 | # Option B: Using pgrep |
| 198 | pkill |