> For the complete documentation index, see [llms.txt](https://docs.pteroca.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pteroca.com/core-configuration/pterodactyl-integration/server-ip-allocation.md).

# Server IP Allocation

***

## Overview

Server IP addresses displayed in PteroCA come from **Pterodactyl's node configuration**, not from PteroCA itself. PteroCA acts as a client area interface and displays the server information that Pterodactyl provides.

When a server is created through PteroCA:

1. PteroCA sends a creation request to Pterodactyl via API
2. Pterodactyl assigns an IP address and port from the **node's allocation pool**
3. PteroCA retrieves and displays this information from Pterodactyl

{% hint style="info" %}
**Key Point:** PteroCA does not manage or assign IP addresses. All server networking configuration happens in Pterodactyl's node and allocation system.
{% endhint %}

***

## How Server IPs Work

### Allocation Pools in Pterodactyl

Pterodactyl nodes maintain **allocation pools** - collections of IP address and port combinations available for assignment to game servers. Each allocation consists of:

* An IP address (e.g., `203.0.113.50`)
* A port number (e.g., `25565`)
* Assignment status (available, assigned, or reserved)

When creating a server, Pterodactyl automatically selects an available allocation from the node's pool and assigns it to the new server.

### The Assignment Process

Here's what happens when you create a server in PteroCA:

1. **User purchases a server** in PteroCA
2. **PteroCA calls Pterodactyl API** to create the server
3. **Pterodactyl selects a node** based on configuration (usually defined in your product settings)
4. **Pterodactyl assigns an allocation** from that node's available pool
5. **Server is created** with the assigned IP:Port combination
6. **PteroCA retrieves server details** including the assigned IP
7. **User sees the IP** in their PteroCA client area

### Data Flow

```
Pterodactyl Node Config → Allocation Pool → Server Creation → PteroCA Display
```

PteroCA always displays what Pterodactyl has in its database - it does not modify or override IP addresses.

***

## Understanding Node Allocations

### What Are Allocations?

In Pterodactyl, allocations are the network endpoints (IP:Port combinations) that game servers use to accept player connections. Think of them as "parking spaces" for your game servers - each server needs its own unique IP:Port combination.

### How to View Allocations

In your Pterodactyl panel:

1. Log in as administrator
2. Navigate to **Admin** → **Nodes**
3. Select a node
4. Click the **Allocation** tab

Here you'll see all IP addresses and ports configured for this node, along with their assignment status.

### Relationship Between Wings and Allocations

**Important distinction:**

* **Wings `api.host` setting** - Determines what network interface the Wings daemon listens on (e.g., `0.0.0.0` to listen on all interfaces)
* **Node allocations** - Define what IP addresses are assigned to **game servers**

These are **NOT the same thing**. Wings `api.host` is for Wings itself, while allocations are for the game servers that Wings manages.

***

## Common IP Scenarios

### Why You See 0.0.0.0

The most common support issue is servers showing `0.0.0.0` as their IP address. This happens when:

1. **Allocations inherited from Wings config:** If your node's allocations were automatically created based on the Wings configuration where `api.host: 0.0.0.0`, these allocations may have `0.0.0.0` as the IP
2. **Manual misconfiguration:** Someone manually added `0.0.0.0` as an allocation IP
3. **Default/placeholder allocation:** Initial setup used `0.0.0.0` as a placeholder

**Why it's a problem:**

* `0.0.0.0` is a special address meaning "all interfaces" - valid for server binding but not for client connections
* Players cannot connect to `0.0.0.0` - they need a specific public IP address
* While Wings can listen on `0.0.0.0`, game servers need real routable IP addresses

### Why You See 127.0.0.1 (Localhost)

Seeing `127.0.0.1` means your node's allocations are configured with the localhost address. This happens when:

* Testing/development setup was used for production
* Node was configured on a local machine
* Misconfiguration during initial Pterodactyl setup

**The problem:** `127.0.0.1` only works on the same machine. Players trying to connect from the internet cannot reach this address.

### Why You See Internal Network IPs (192.168.x.x, 10.x.x.x)

Internal/private IP addresses like `192.168.1.100` or `10.0.0.50` indicate your node is configured with LAN addresses. Common causes:

* Server behind NAT/router without proper port forwarding setup
* Pterodactyl configured with internal IP instead of public IP
* Cloud/VPS with separate internal and external IPs, but only internal configured

**The problem:** These addresses only work within your local network. Internet players cannot connect to private IP ranges.

***

## Configuring Server IPs Correctly

### Method 1: Configure Allocations in Pterodactyl Panel (Recommended)

This is the proper way to set up server IP addresses:

**Step 1: Access Node Allocations**

1. Log into your Pterodactyl panel as administrator
2. Go to **Admin** → **Nodes**
3. Select the node you want to configure
4. Click the **Allocation** tab

**Step 2: Remove Incorrect Allocations**

If you see allocations with `0.0.0.0`, `127.0.0.1`, or internal IPs:

1. Select each incorrect allocation
2. Click **Delete** (or bulk delete if available)
3. Confirm deletion

{% hint style="warning" %}
**Important:** Only delete allocations that are not currently assigned to servers, or you'll break existing servers. Check the "Assigned To" column before deleting.
{% endhint %}

**Step 3: Add Correct Public IP**

1. Click **Create Allocation** button
2. Enter your **public IP address** (the IP players will connect to)
   * For dedicated servers: Your server's public IP
   * For VPS/cloud: Your instance's public IP
   * Check with `curl ifconfig.me` or `ip addr show` on your server
3. Enter a port or port range
   * For Minecraft: `25565-25665` (100 ports)
   * For other games: Appropriate port range
   * Ensure ports are open in your firewall
4. Click **Submit**

**Step 4: Verify Allocations**

After adding, you should see entries like:

```
203.0.113.50:25565  [Available]
203.0.113.50:25566  [Available]
203.0.113.50:25567  [Available]
...
```

New servers created will now receive proper public IP addresses from this pool.

### Method 2: Understanding Wings Configuration

While Wings configuration doesn't directly set server IPs, understanding it helps avoid confusion:

**Wings Config (`/etc/pterodactyl/config.yml`):**

```yaml
api:
  host: 0.0.0.0  # ← This is CORRECT for Wings
  port: 8080
  ssl:
    enabled: true
    cert: /etc/letsencrypt/live/wings.example.com/fullchain.pem
    key: /etc/letsencrypt/live/wings.example.com/privkey.pem
```

**What this means:**

* `host: 0.0.0.0` - Wings daemon listens on all network interfaces (correct!)
* This does **NOT** set game server IPs
* Game server IPs come from the Pterodactyl panel's allocation system

**Best practice:**

1. Leave Wings `api.host` as `0.0.0.0` (or your server's public IP if you prefer)
2. Configure game server IPs in Pterodactyl panel allocations (as shown in Method 1)
3. Don't confuse the two - they serve different purposes

### Method 3: Bulk Allocation via CLI (Advanced)

For advanced users, Pterodactyl provides CLI commands to manage allocations:

```bash
cd /var/www/pterodactyl
php artisan p:location:make  # Create location
php artisan p:node:make      # Create node (will prompt for IP configuration)
```

During node creation, you'll be prompted for the allocation IP. Enter your public IP address here.

***

## Troubleshooting

### Issue: Server Shows 0.0.0.0

**Diagnosis:**

* Check Pterodactyl Admin → Nodes → \[Your Node] → Allocation
* Look for allocations with IP `0.0.0.0`

**Solution:**

1. Follow [Method 1](#method-1-configure-allocations-in-pterodactyl-panel-recommended) to add proper allocations
2. For **existing servers** - reassign allocation in Pterodactyl:
   * Go to server management in Pterodactyl admin
   * Network tab → Change primary allocation to one with correct IP
3. For **new servers** - they'll automatically use new allocations

### Issue: Server Shows Wrong IP (Internal/Local)

**Diagnosis:**

* Verify your server's public IP: `curl ifconfig.me`
* Compare with IP shown in PteroCA
* Check Pterodactyl allocations

**Solution:**

1. Delete allocations with incorrect IPs
2. Add allocations with your actual public IP
3. Ensure firewall/NAT allows traffic to these ports
4. If behind NAT, configure port forwarding on your router

### Issue: Players Cannot Connect

If the IP looks correct but players still can't connect:

**Check firewall:**

```bash
# Check if ports are open (example for port 25565)
sudo ufw status
sudo ufw allow 25565/tcp
sudo ufw allow 25565/udp
```

**Check if service is listening:**

```bash
# See what's listening on the port
sudo netstat -tulpn | grep 25565
```

**Verify allocation assignment:**

1. In Pterodactyl admin, go to the server
2. Check Network tab
3. Ensure primary allocation shows correct public IP:Port

**Test connectivity:**

```bash
# From another machine, test if port is reachable
telnet YOUR_PUBLIC_IP 25565
# or
nc -zv YOUR_PUBLIC_IP 25565
```

### Issue: All Allocations Used Up

If you see errors about no available allocations:

**Solution:**

1. Go to Admin → Nodes → \[Your Node] → Allocation
2. Add more port allocations:
   * Use your public IP
   * Add larger port range (e.g., `25565-26000`)
3. Or, add additional IP addresses if you have multiple IPs

***

## Best Practices

### For Self-Hosted Setups

1. **Use Public IPs in Allocations:**
   * Always configure allocations with your server's public IP
   * Never use `0.0.0.0`, `127.0.0.1`, or `192.168.x.x` for allocations
2. **Plan Port Ranges:**
   * Allocate sufficient ports for expected growth
   * Example: 100 ports per node (e.g., `25565-25665`)
   * Keep ranges consistent across nodes for easier management
3. **Document Your IPs:**
   * Know your server's public IP(s)
   * Document which IP is used for which node
   * Keep track of port range assignments

### For Hosting Providers

1. **Pre-configure Correct Allocations:**
   * Set up all nodes with proper public IPs before offering services
   * Test server creation to verify correct IP assignment
2. **Provide Clear Documentation:**
   * Explain to customers that IPs come from Pterodactyl
   * Point them to connection information in PteroCA client area
3. **Monitor Allocation Usage:**
   * Track available vs. assigned allocations
   * Add more allocations before running out
   * Alert when nodes reach capacity

### For All Users

1. **Verify After Setup:**
   * Create a test server
   * Check that it receives correct public IP
   * Test actual connectivity from external network
2. **Don't Mix Wings Config with Allocations:**
   * Remember: Wings `api.host` ≠ server allocations
   * Configure them separately
   * Different purposes, different settings
3. **Keep Pterodactyl Updated:**
   * Updates may include allocation management improvements
   * Follow official Pterodactyl documentation

***

## Related Documentation

### PteroCA Documentation

* [Pterodactyl Settings](/core-configuration/core-configuration/pterodactyl-settings.md) - General Pterodactyl configuration
* [API Configuration](/core-configuration/pterodactyl-integration/api-configuration.md) - Setting up API connection
* [Allowed Origins](/core-configuration/pterodactyl-integration/allowed-origins.md) - Wings CORS/WebSocket configuration
* [Managing Servers (Client)](/using-pteroca/using-pteroca/managing-servers.md) - User view of server allocations

### Pterodactyl Official Documentation

* [Pterodactyl Node Configuration](https://pterodactyl.io/panel/1.0/getting_started.html) - Official guide for setting up nodes
* [Wings Configuration](https://pterodactyl.io/wings/1.0/installing.html) - Official Wings installation and configuration
* [Adding Allocations](https://pterodactyl.io/panel/1.0/getting_started.html#adding-allocations) - Step-by-step allocation setup

***

## Summary

**Key Takeaways:**

1. ✅ **Server IPs come from Pterodactyl** - PteroCA only displays what Pterodactyl assigns
2. ✅ **Configure allocations in Pterodactyl panel** - Admin → Nodes → Allocations
3. ✅ **Use your public IP for allocations** - Never `0.0.0.0`, `127.0.0.1`, or private IPs
4. ✅ **Wings config ≠ Server IPs** - These are separate configurations with different purposes
5. ✅ **Test connectivity** - Always verify players can actually connect after setup

**If you're seeing wrong IPs in PteroCA**, the fix is in Pterodactyl's allocation configuration, not in PteroCA itself.

{% hint style="success" %}
**Need more help?**

If you're still experiencing issues with server IP addresses:

* Join our [Discord community](https://discord.com/invite/Gz5phhuZym) for support
* Check [Troubleshooting Guide](https://github.com/PteroCA-Org/pteroca-homepage/blob/docs/help-and-maintenance/troubleshooting/README.md) for common errors
* Review [FAQ](/help-and-maintenance/faq.md) for quick answers
  {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.pteroca.com/core-configuration/pterodactyl-integration/server-ip-allocation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
