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
Copy file name to clipboardExpand all lines: deployment-strategies/docker-compose.md
+18-16Lines changed: 18 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -225,28 +225,30 @@ server {
225
225
226
226
## Deploying Gateway service
227
227
228
-
You'll need a token to deploy the Gateway service. You'll have to set it as DEFGUARD\_TOKEN environment variable. Details on how to obtain the token [here](gateway.md).
228
+
Before deploying a new Gateway service, make sure you have a running Defguard Core instance.
229
229
230
-
For gateway to control the WireGuard kernel as well as network, it's recommended to run in the _host_ network mode as well as there are needed some docker CAPs:
230
+
On the network level, your Gateway must be able to reach the Core service’s gRPC endpoint. This address is passed as the `DEFGUARD_GRPC_URL` parameter when deploying the Gateway. The Gateway uses it to communicate with Core, fetch its configuration, and publish operational statistics.
231
+
232
+
You’ll also need a Location created in the Defguard Core Admin Panel.
233
+
234
+
Each Location is identified by a unique token, which must be provided to the Gateway as the `DEFGUARD_TOKEN` parameter. The Gateway uses this token to authenticate with Core over the gRPC channel and retrieve the correct configuration for that specific Location. For detailed steps on how to create a Location and obtain its token, see [this section](gateway.md).
235
+
236
+
For the most basic configuration use the following Docker Compose file:
231
237
232
238
```
233
239
services:
234
240
gateway:
235
-
image: ghcr.io/defguard/gateway:latest
236
-
restart: unless-stopped
237
-
network_mode: "host"
238
-
environment:
241
+
image: ghcr.io/defguard/gateway:latest
242
+
restart: unless-stopped
243
+
network_mode: "host"
244
+
environment:
239
245
- DEFGUARD_GRPC_URL=https://core-ip:50055
240
-
- DEFGUARD_GRPC_CA=/ca.pem
241
-
- DEFGUARD_STATS_PERIOD=30
242
-
# to get the token add a VPN location and get the token
The Docker Compose configuration runs the Gateway in host network mode and includes the required Docker capabilities. This setup is necessary because the Gateway needs direct access to the host network stack and WireGuard kernel module to create and manage VPN interfaces properly.
0 commit comments