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
-`USERS`: comma separated list of usernames that can access Xray. `Required`.
15
+
-`LOG_LEVEL`: the verbosity of Xray logs. `Optional, default = warn`.
15
16
3.`docker compose up -d`
16
17
4. Test your connection.
17
18
18
19
## Docker Volume
19
-
All d2ray logs and private/public key pairs are stored in `/etc/d2ray` in the container. You can mount an external folder to that location to persist settings. See the example `docker-compose.yml`.
20
+
The logs and private key are stored in `/etc/d2ray` in the container. You can mount an external folder to that location to persist settings. Otherwise d2ray creates an anonymous Docker volume.
20
21
21
22
## Key Generation
22
-
d2ray checks whether a key file exists at path `/etc/xray/certs/keys` and generates a new key pair if not found.
23
+
If `PRIVATE_KEY` is provided, d2ray uses that key. Otherwise, d2ray generates a new key pair and persists it in `/etc/xray/certs/keys`. The corresponding public key is always printed to the container log (`docker logs`), which clients use to connect.
23
24
24
-
You can either supply a pre-generated private key using `xray x25519` or let d2ray generate one. The corresponding public key is printed to the container log (`docker logs`), which clients use to connect.
25
-
26
-
If you are generating the keys yourself, the key file must contain exactly the output of `xray x25519`.
25
+
To make d2ray regenerate a new key pair, manually delete the key file `/etc/xray/certs/keys` from the mounted volume.
0 commit comments