|
1 | 1 | # Quick Start Guide |
2 | 2 |
|
3 | | -## ✅ Frontend Status |
4 | | -**Frontend is currently running on:** http://localhost:3000 |
| 3 | +## One-liner install |
5 | 4 |
|
6 | | -You can access it in your browser now! |
| 5 | +```bash |
| 6 | +curl -fsSL https://deepsql.ai/install.sh | bash |
| 7 | +``` |
| 8 | + |
| 9 | +This runs the complete install: clones the repo, builds the stack from source, and |
| 10 | +starts all services. The only input needed is an LLM API key — or skip it and |
| 11 | +configure later in Settings → AI Provider. |
7 | 12 |
|
8 | | -## 🚀 Starting the Backend |
| 13 | +## What you need |
9 | 14 |
|
10 | | -The backend requires Java 17+ and Maven. Here's how to set it up: |
| 15 | +- **Docker** with Compose v2 and buildx >= 0.17.0 |
| 16 | +- **~4 GB of memory** available to Docker |
| 17 | +- **An LLM API key** (optional — can configure later) |
11 | 18 |
|
12 | | -### Step 1: Install Java 17 |
| 19 | +On a fresh Ubuntu/Debian server: |
13 | 20 |
|
14 | | -**macOS (using Homebrew):** |
15 | 21 | ```bash |
16 | | -brew install openjdk@17 |
| 22 | +curl -fsSL https://raw.githubusercontent.com/DeepSQLAI/deepsql/main/scripts/self-host/bootstrap-server.sh | sudo bash |
17 | 23 | ``` |
18 | 24 |
|
19 | | -**Or download from:** |
20 | | -- https://adoptium.net/ (recommended) |
21 | | -- Select Java 17 LTS for macOS |
| 25 | +## With an LLM key |
22 | 26 |
|
23 | | -**Verify installation:** |
24 | 27 | ```bash |
25 | | -java -version |
26 | | -# Should show: openjdk version "17.x.x" |
| 28 | +DEEPSQL_CHAT_API_KEY=sk-your-key curl -fsSL https://deepsql.ai/install.sh | bash |
27 | 29 | ``` |
28 | 30 |
|
29 | | -### Step 2: Install Maven |
| 31 | +## Without an LLM key (keyless start) |
30 | 32 |
|
31 | | -**macOS (using Homebrew):** |
32 | 33 | ```bash |
33 | | -brew install maven |
| 34 | +DEEPSQL_INITIAL_ADMIN_EMAIL=admin@example.com curl -fsSL https://deepsql.ai/install.sh | bash |
34 | 35 | ``` |
35 | 36 |
|
36 | | -**Verify installation:** |
37 | | -```bash |
38 | | -mvn -version |
39 | | -``` |
| 37 | +Chat and AI features are disabled until you configure a key in Settings → AI Provider. |
40 | 38 |
|
41 | | -### Step 3: Start the Backend |
| 39 | +## After install |
42 | 40 |
|
43 | | -**Option A: Using the helper script** |
44 | | -```bash |
45 | | -./start-backend.sh |
46 | | -``` |
| 41 | +1. **Open** http://localhost:3000 |
| 42 | +2. **Log in** with the email and password from `~/deepsql/.env` |
| 43 | +3. **Connect a database** (Postgres or MySQL) |
| 44 | +4. **Start asking questions** in the Agent tab |
| 45 | + |
| 46 | +## Verify the install |
47 | 47 |
|
48 | | -**Option B: Manual start** |
49 | 48 | ```bash |
50 | | -cd backend |
51 | | -mvn spring-boot:run |
| 49 | +curl -fsS http://localhost:8080/api/actuator/health |
52 | 50 | ``` |
53 | 51 |
|
54 | | -The backend will start on: **http://localhost:8080** |
| 52 | +## Options |
55 | 53 |
|
56 | | -### Step 4: Verify Both Services |
| 54 | +- `--non-interactive` — never prompt (use with env vars) |
| 55 | +- `--fresh` — remove existing volumes before install |
| 56 | +- `--no-seed-demo` — skip demo database seeding |
| 57 | +- `--ref v1.3.0` — install a specific version |
57 | 58 |
|
58 | | -1. **Backend**: Open http://localhost:8080/api/connections |
59 | | - - Should return: `[]` (empty array) |
| 59 | +Example: |
60 | 60 |
|
61 | | -2. **Frontend**: Already running at http://localhost:3000 |
62 | | - - You should see the DBA Agent interface |
| 61 | +```bash |
| 62 | +curl -fsSL https://deepsql.ai/install.sh | bash -s -- --fresh --ref v1.3.0 |
| 63 | +``` |
63 | 64 |
|
64 | | -## 🎯 Next Steps |
| 65 | +## Ports |
65 | 66 |
|
66 | | -1. Open http://localhost:3000 in your browser |
67 | | -2. Click the Settings icon (⚙️) in the left panel |
68 | | -3. Connect to your MySQL or PostgreSQL database |
69 | | -4. View schema visualizations and DBA stats! |
| 67 | +| Service | Port | Override | |
| 68 | +|----------|------|-------------------------| |
| 69 | +| Frontend | 3000 | `DEEPSQL_FRONTEND_PORT` | |
| 70 | +| Backend | 8080 | `DEEPSQL_BACKEND_PORT` | |
| 71 | +| Postgres | 5432 | `DEEPSQL_POSTGRES_PORT` | |
| 72 | +| Valkey | 6379 | `DEEPSQL_VALKEY_PORT` | |
70 | 73 |
|
71 | | -## 📝 Notes |
| 74 | +## Troubleshooting |
72 | 75 |
|
73 | | -- The frontend is already running in the background |
74 | | -- You need to start the backend separately in a new terminal |
75 | | -- Both services need to be running for full functionality |
76 | | -- Backend stores encrypted credentials in `backend/data/vault.mv.db` |
| 76 | +**Docker permission denied:** |
| 77 | +```bash |
| 78 | +sudo usermod -aG docker $USER |
| 79 | +newgrp docker |
| 80 | +``` |
77 | 81 |
|
78 | | -## 🐛 Troubleshooting |
| 82 | +**buildx too old:** |
| 83 | +```bash |
| 84 | +curl -fsSL https://raw.githubusercontent.com/DeepSQLAI/deepsql/main/scripts/self-host/bootstrap-server.sh | sudo bash |
| 85 | +``` |
79 | 86 |
|
80 | 87 | **Backend won't start:** |
81 | | -- Ensure Java 17+ is installed: `java -version` |
82 | | -- Ensure Maven is installed: `mvn -version` |
83 | | -- Check if port 8080 is available: `lsof -i :8080` |
| 88 | +Check `docker compose logs backend` — usually a missing secret or port conflict. |
| 89 | + |
| 90 | +## Development |
| 91 | + |
| 92 | +For local development without Docker: |
| 93 | + |
| 94 | +```bash |
| 95 | +docker compose up -d postgres valkey |
| 96 | +cd backend && ./mvnw spring-boot:run # http://localhost:8080/api |
| 97 | +npm install && npm run dev # http://localhost:3000 |
| 98 | +``` |
84 | 99 |
|
85 | | -**Frontend can't connect to backend:** |
86 | | -- Ensure backend is running on port 8080 |
87 | | -- Check browser console for errors |
88 | | -- Verify `.env.local` has: `NEXT_PUBLIC_API_URL=http://localhost:8080` |
| 100 | +Requires **JDK 25** and **Node 22**. |
89 | 101 |
|
| 102 | +## Next steps |
90 | 103 |
|
| 104 | +- [README.md](../README.md) — full documentation |
| 105 | +- [docs/llms-full.txt](llms-full.txt) — AI agent setup runbook |
| 106 | +- [mcp/README.md](../mcp/README.md) — CLI and MCP server |
0 commit comments