Skip to main content
DeepLX supports configuration through environment variables. These variables are read during initialization and can be overridden by command-line flags.

Server Configuration

IP
string
default:"0.0.0.0"
The IP address to bind the server to. Use 0.0.0.0 to listen on all network interfaces, or specify a specific IP address to restrict access.Example:
export IP="127.0.0.1"
PORT
integer
default:"1188"
The port number the server will listen on. Must be a valid port number between 1 and 65535.Example:
export PORT=8080

Authentication

TOKEN
string
default:""
Access token for authenticating requests to the /translate, /v1/translate, and /v2/translate endpoints. When set, clients must provide this token either as a query parameter or in the Authorization header.
If not set, the API endpoints are publicly accessible without authentication.
Example:
export TOKEN="your-secret-token-here"
See the Authentication page for more details on how to use this token.
DL_SESSION
string
default:""
DeepL Pro account session cookie for the /v1/translate endpoint. This is required to use the Pro API endpoint which provides access to DeepL Pro features.
This must be a valid Pro account session. Free account sessions (containing a . character) will be rejected.
Example:
export DL_SESSION="your-dl-session-cookie"

Network Configuration

PROXY
string
default:""
HTTP/HTTPS proxy URL for outgoing requests to DeepL. Useful when DeepLX needs to route traffic through a proxy server.Example:
# HTTP proxy
export PROXY="http://proxy.example.com:8080"

# HTTPS proxy
export PROXY="https://proxy.example.com:8080"

# SOCKS5 proxy
export PROXY="socks5://proxy.example.com:1080"

Complete Example

# Using environment variables with Docker
docker run -d \
  -e IP="0.0.0.0" \
  -e PORT=8080 \
  -e TOKEN="my-secret-token" \
  -e DL_SESSION="your-dl-session" \
  -e PROXY="http://proxy.example.com:8080" \
  -p 8080:8080 \
  ghcr.io/owo-network/deeplx:latest
Environment variables have lower precedence than command-line flags. If both are set, the flag value will be used.

Build docs developers (and LLMs) love