How to Set a Static IP on a VPS: Step-by-Step Guide

Using a static IP address on a VPS is essential for stable operation of web services, application servers, remote access, and more. Unlike dynamic IPs, a static address doesn't change after reboot and remains constant. This article explains how to assign a static IP address on popular operating systems.

Why Use a Static IP?

  • Reliable connection without IP changes;
  • Easier DNS and SSL certificate configuration;
  • Ability to create consistent firewall, NAT, VPN rules;
  • Required for apps needing precise IP access;
  • Convenient for SSH, FTP, and RDP access.

Setting Static IP on Linux (Ubuntu/Debian)

Most modern systems use Netplan. Open the configuration file:

sudo nano /etc/netplan/01-netcfg.yaml

Example configuration:

network:
  version: 2
  ethernets:
    eth0:
      dhcp4: no
      addresses:
        - 192.0.2.10/24
      gateway4: 192.0.2.1
      nameservers:
        addresses: [8.8.8.8, 1.1.1.1]

Apply the changes:

sudo netplan apply

Setting Static IP on Windows Server

1. Go to Network Connections → Adapter Settings.
2. Find IPv4 Protocol and open its properties.
3. Choose Use the following IP address and enter:

  • The IP address assigned by your hosting provider;
  • Subnet mask (typically 255.255.255.0);
  • Gateway address;
  • DNS servers: 8.8.8.8 and 1.1.1.1.

After saving the settings, restart the network adapter. Your server will now use the same IP address consistently.

Tips and Recommendations

  • Make sure the IP belongs to your VPS and doesn’t conflict with others;
  • Check server availability after applying the changes;
  • Update your firewall rules if the IP was changed;
  • Use a DNS name if IP change is possible in the future;
  • If issues arise — restart the network interface or the server itself.

← Back to Network section

If you're having trouble configuring your IP address or the server becomes unreachable — contact Bit.Hosting support. We'll help you set everything up! ⚙️

← Network and DNS on VPS

Bit.Hosting

Compare plans

Pricing is calculated for the selected billing period.