> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plugins.avenvault.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Discord Bot Core Connection (Outbound Traffic)

> Configure outbound TCP traffic on ports 443 and 80 so your Discord bot can connect to the Discord gateway and send messages.

For a Discord bot to come online, send messages, and receive gateway events, the host machine must be allowed to make outbound connections to the internet.

## Does My Bot Need Port Forwarding?

No. Standard Discord bots do not require inbound port forwarding.

## What You Need to Allow

Your VPS, container, or host machine's firewall must allow **Outbound TCP Traffic on Port 443 (HTTPS) and Port 80 (HTTP)**.

If your host rigidly blocks outbound traffic (common on strict enterprise networks or school networks), the bot will fail to start and throw one of the following errors:

* `java.net.UnknownHostException` (Java)
* `Error: getaddrinfo ENOTFOUND discord.com` (Node.js)
* `WebSocket connection refused`

## How to Fix

Ensure your host firewall (like UFW or Windows Defender) allows outgoing traffic. On most standard Linux VPS providers (Ubuntu, Debian), outbound traffic is open by default. Unsure? Check out the [Port 443 guide](/en/network-and-firewall-guides/allowing-port-443) for detailed instructions.
