Creating Primary IPs: A Step-by-Step Guide

When setting up a VPS or cloud server, one of the first steps is assigning a Primary IP. The Primary IP is the main IP address used for server management, internet communication, and connecting clients. At Cyberin, we guide developers, sysadmins, and cloud enthusiasts through practical, step-by-step, and secure server setups.

What is a Primary IP?

A Primary IP is the main IP address assigned to a server or network interface. It acts as the server’s unique identifier on the internet, allowing access and communication.

Key points about Primary IPs:

Why You Need a Primary IP

How to Create or Assign a Primary IP

Depending on whether you are creating a new server or updating an existing one, the steps differ slightly. Below, we explain exactly where and how to access network configuration on both VPS consoles and local computers.

1. During Server Creation

Most cloud providers (AWS, DigitalOcean, GCP, etc.) automatically assign a primary IP during server creation:

  1. Choose your server size and location.

  2. The system automatically assigns a primary IP (usually public).

  3. Configure your OS, credentials, and hostname.

Tip from Cyberin: Always note the primary IP—it is your main access point for SSH and web services.

2. Assigning a Primary IP to an Existing Server

Linux VPS Example (Ubuntu/Debian):

  1. Open your VPS console (through the cloud provider dashboard, e.g., AWS EC2 → Connect).

  2. Open the network configuration file:

    sudo nano /etc/netplan/01-netcfg.yaml
    
    sudo nano /etc/network/interfaces
    
  3. Add or update the primary IP for your network interface (e.g., eth0):

network:
  version: 2
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 203.0.113.10/24
      gateway4: 203.0.113.1
      nameservers:
        addresses: [8.8.8.8, 8.8.4.4]
  1. Save the file (CTRL+O, Enter) and exit (CTRL+X).

  2. Apply changes:

sudo netplan apply

Now your VPS is reachable via the new primary IP.

Windows Server Example (Local Computer or VPS via RDP):

  1. Open Network Settings:

  2. Right-click your network adapter → Properties → Select Internet Protocol Version 4 (TCP/IPv4) → Properties.

  3. Choose Use the following IP address, then enter:

  4. Click OK to save and close all windows.

3. Using a Cloud Provider Console

Many VPS/cloud providers allow you to manage Primary IPs directly from their dashboard:

This is often easier for beginners than manually editing network files.

Best Practices for Primary IPs

Conclusion

Assigning a Primary IP is a crucial step in server setup and management. Whether on a VPS, cloud server, or local machine, the primary IP serves as the main access point for your server.

Following Cyberin best practices ensures your server remains accessible, organized, and secure.

Tip: Always combine your primary IP with firewall rules and SSH key authentication to maintain a secure and reliable server environment.