You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve the external access documentation structure and clarity:
- Add clear sections for Docker and Kubernetes deployments
- Include comprehensive Nginx and Caddy examples for Docker
- Add Kubernetes Gateway API example alongside Ingress
- Document WebSocket requirements and troubleshooting tips
- Remove redundant configuration details
The guide now clearly states that Bytebase doesn't provide native HTTPS
and guides users to appropriate reverse proxy solutions based on their
deployment method.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-authored-by: Claude <[email protected]>
description: Configure external access, WebSocket, and ingress for your Bytebase deployment
4
4
---
5
5
6
-
This guide covers how to configure external access for your Bytebase deployment, including WebSocket support for SQL Editor and Kubernetes ingress configuration.
6
+
This guide covers how to configure external access for your Bytebase deployment across different deployment methods.
7
7
8
-
## Enable WebSocket for SQL Editor
8
+
<Note>
9
+
Bytebase service itself does not provide native HTTPS support. We recommend using a reverse proxy (Nginx, Caddy) on the same VM for Docker deployments, or ingress/gateway for Kubernetes deployments.
10
+
</Note>
11
+
12
+
## Docker Deployment with Reverse Proxy
9
13
10
-
SQL Editor autocomplete requires WebSocket. If you access Bytebase via a gateway, you need to enable WebSocket there. Here is a sample NGINX configuration (including the optional HTTPS mentioned below):
14
+
When deploying Bytebase with Docker on a VM, use a reverse proxy for external access and HTTPS termination.
15
+
16
+
### Nginx Configuration
17
+
18
+
For Docker deployments using Nginx as a reverse proxy:
11
19
12
20
```nginx
13
21
@@ -47,50 +55,153 @@ http {
47
55
}
48
56
```
49
57
50
-
## Enable HTTPS
58
+
### Caddy Configuration
59
+
60
+
For Docker deployments using Caddy (automatic HTTPS with Let's Encrypt):
61
+
62
+
```caddy
63
+
bytebase.example.com {
64
+
# Automatic HTTPS with Let's Encrypt
65
+
66
+
# Reverse proxy to Bytebase
67
+
reverse_proxy localhost:8080 {
68
+
# Timeouts for long-running operations
69
+
transport http {
70
+
read_timeout 3600s
71
+
write_timeout 3600s
72
+
}
73
+
}
74
+
}
75
+
```
76
+
77
+
To use this Caddy configuration:
78
+
1. Install Caddy on your VM
79
+
2. Save the configuration to `/etc/caddy/Caddyfile`
80
+
3. Run: `caddy reload`
51
81
52
-
Bytebase does not support enabling HTTPS in server configuration. We suggest use [NGINX](https://nginx.org/) or [Caddy](https://caddyserver.com/) as a reverse proxy in front of Bytebase to enable HTTPS.
82
+
## Kubernetes Deployment
53
83
54
-
##Kubernetes Ingress Configuration
84
+
For Kubernetes deployments, use ingress controllers or gateways to configure external access with HTTPS support.
55
85
56
-
### Deploy with Ingress
86
+
### Nginx Ingress Controller
57
87
58
-
We use [Ingress-Nginx Controller](https://kubernetes.github.io/ingress-nginx/deploy/) as ingress controller. You need to config `Ingress-Nginx Controller` according to your environment.
88
+
Deploy Bytebase with [Nginx Ingress Controller](https://kubernetes.github.io/ingress-nginx/deploy/):
If you use ingress, make sure to use https to access bytebase.
92
-
</Note>
122
+
### Kubernetes Gateway API
123
+
124
+
For modern Kubernetes deployments using Gateway API:
125
+
126
+
```yaml
127
+
apiVersion: gateway.networking.k8s.io/v1
128
+
kind: HTTPRoute
129
+
metadata:
130
+
name: bytebase-route
131
+
namespace: default
132
+
spec:
133
+
parentRefs:
134
+
- name: gateway
135
+
namespace: default
136
+
hostnames:
137
+
- bytebase.example.com
138
+
rules:
139
+
- matches:
140
+
- path:
141
+
type: PathPrefix
142
+
value: /
143
+
backendRefs:
144
+
- name: bytebase-service
145
+
port: 8080
146
+
---
147
+
apiVersion: gateway.networking.k8s.io/v1
148
+
kind: Gateway
149
+
metadata:
150
+
name: gateway
151
+
namespace: default
152
+
spec:
153
+
gatewayClassName: nginx
154
+
listeners:
155
+
- name: https
156
+
protocol: HTTPS
157
+
port: 443
158
+
tls:
159
+
mode: Terminate
160
+
certificateRefs:
161
+
- name: bytebase-tls-secret
162
+
- name: http
163
+
protocol: HTTP
164
+
port: 80
165
+
# Redirect HTTP to HTTPS
166
+
allowedRoutes:
167
+
namespaces:
168
+
from: Same
169
+
```
170
+
171
+
### Service Configuration
172
+
173
+
Ensure your Bytebase service is configured correctly:
174
+
175
+
```yaml
176
+
apiVersion: v1
177
+
kind: Service
178
+
metadata:
179
+
name: bytebase-service
180
+
namespace: default
181
+
spec:
182
+
selector:
183
+
app: bytebase
184
+
ports:
185
+
- protocol: TCP
186
+
port: 8080
187
+
targetPort: 8080
188
+
type: ClusterIP
189
+
```
190
+
191
+
## Additional Configuration
192
+
193
+
### Configure External URL
194
+
195
+
For production usage, configure the External URL to match your domain. See [Configure External URL](/get-started/install/external-url) for details.
196
+
197
+
### WebSocket Support
198
+
199
+
SQL Editor autocomplete requires WebSocket support. All configurations above include the necessary WebSocket settings. Key endpoints that require WebSocket:
200
+
- `/v1:adminExecute` - For SQL execution
201
+
- `/lsp`- For Language Server Protocol (autocomplete)
93
202
94
-
## Configure External URL
203
+
### Troubleshooting
95
204
96
-
For production usage, you should configure a proper External URL. Check [Configure External URL](/get-started/install/external-url) for details.
0 commit comments