160 lines
5.8 KiB
Markdown
160 lines
5.8 KiB
Markdown
---
|
||
tags:
|
||
- Windows
|
||
---
|
||
# Initial Server Setup with Windows Server 2019
|
||
|
||
Windows Server 2019 is a powerful and versatile operating system designed to meet the needs of modern enterprises and home lab environments. Proper initial setup ensures your server is secure, efficient, and ready to handle the roles and workloads you assign to it. This guide walks you through essential configuration steps to establish a reliable and secure foundation for your server.
|
||
|
||
---
|
||
|
||
## Why Initial Server Setup Matters
|
||
|
||
Configuring a server correctly from the beginning prevents security vulnerabilities, ensures system stability, and provides a solid foundation for deploying services. Whether you’re running a web server, a domain controller, or hosting applications, these steps are critical for smooth operations.
|
||
|
||
---
|
||
|
||
## Logging In for the First Time
|
||
|
||
After installing Windows Server 2019:
|
||
|
||
1. Log in with the local administrator account and the password you set during installation.
|
||
2. If using a virtual machine, ensure you have access to the hypervisor console for direct management in case of network misconfigurations.
|
||
|
||
---
|
||
|
||
### Secure the Administrator Account
|
||
|
||
1. **Change the Password:**
|
||
|
||
- Press `Ctrl + Alt + Del`, select **Change a password**, and set a strong password.
|
||
2. **Rename the Administrator Account:**
|
||
|
||
- Open **Computer Management** > **Local Users and Groups** > **Users**.
|
||
- Right-click the administrator account and select **Rename**.
|
||
- Assign a non-standard name to reduce the risk of brute-force attacks.
|
||
|
||
---
|
||
|
||
## Setting Up Network Configuration
|
||
|
||
### Configure a Static IP Address
|
||
|
||
1. Open **Network and Sharing Center** > **Change adapter settings**.
|
||
2. Right-click your network adapter, select **Properties**, and double-click **Internet Protocol Version 4 (TCP/IPv4)**.
|
||
3. Enter the following details:
|
||
- **IP Address**: Static IP for the server.
|
||
- **Subnet Mask**: Typically `255.255.255.0`.
|
||
- **Default Gateway**: Your network’s gateway IP.
|
||
- **DNS Servers**: Use your preferred DNS server (e.g., `127.0.0.1` for domain controllers or Google’s `8.8.8.8`).
|
||
|
||
Test connectivity using:
|
||
|
||
```cmd
|
||
ping <gateway-ip>
|
||
```
|
||
|
||
---
|
||
|
||
## Installing Windows Updates
|
||
|
||
Keeping your server updated is vital for security and performance:
|
||
|
||
1. Go to **Settings** > **Update & Security** > **Windows Update**.
|
||
2. Click **Check for updates**.
|
||
3. Configure **Active Hours** to minimize update reboots during working hours.
|
||
4. Automate updates via Group Policy:
|
||
- Open **Group Policy Editor** (`gpedit.msc`).
|
||
- Navigate to **Computer Configuration** > **Administrative Templates** > **Windows Components** > **Windows Update**.
|
||
- Enable **Configure Automatic Updates** and set the desired schedule.
|
||
|
||
---
|
||
|
||
## Configuring Roles and Features
|
||
|
||
Windows Server 2019 allows you to add only the features and roles you need:
|
||
|
||
1. Open **Server Manager** and select **Add roles and features**.
|
||
2. Choose **Role-based or feature-based installation**.
|
||
3. Select the server and pick the required roles (e.g., Active Directory Domain Services, Web Server (IIS)).
|
||
4. Confirm and complete the installation.
|
||
|
||
---
|
||
|
||
## Setting Up Windows Firewall
|
||
|
||
Enable and configure the firewall to secure your server:
|
||
|
||
1. Open **Windows Defender Firewall with Advanced Security**.
|
||
2. Review and customize inbound and outbound rules.
|
||
3. Allow essential traffic:
|
||
- **For SSH:**
|
||
|
||
```none
|
||
netsh advfirewall firewall add rule name="Allow SSH" dir=in action=allow protocol=TCP localport=22
|
||
```
|
||
|
||
- **For RDP:**
|
||
|
||
```none
|
||
netsh advfirewall firewall set rule group="Remote Desktop" new enable=yes
|
||
```
|
||
|
||
- For custom services, create new rules as needed.
|
||
|
||
---
|
||
|
||
## Enabling Remote Desktop
|
||
|
||
1. Open **System Properties** and navigate to the **Remote** tab.
|
||
2. Select **Allow remote connections to this computer**.
|
||
3. Add authorized users under **Select Users**.
|
||
4. Verify the firewall rule for Remote Desktop is enabled.
|
||
|
||
---
|
||
|
||
## Synchronizing Time and Date
|
||
|
||
Accurate time settings are essential for logging and domain environments:
|
||
|
||
1. Open **Settings** > **Time & Language** > **Date & Time**.
|
||
2. Ensure the time zone is correct and enable automatic time synchronization.
|
||
3. Sync with a reliable NTP server:
|
||
|
||
```cmd
|
||
w32tm /config /manualpeerlist:"pool.ntp.org" /syncfromflags:manual /reliable:yes /update
|
||
w32tm /resync
|
||
```
|
||
|
||
|
||
---
|
||
|
||
## Creating Backups
|
||
|
||
Before deploying additional services, create a full backup of the server:
|
||
|
||
1. Install **Windows Server Backup** via Server Manager.
|
||
2. Open **Windows Server Backup** and select **Backup Schedule**.
|
||
3. Configure the backup to include:
|
||
- **System State**: Essential for disaster recovery.
|
||
- **OS Volume**: Protects the base operating system.
|
||
- **Critical Data**: Back up specific application data or directories.
|
||
4. Choose a dedicated drive or network share as the backup destination.
|
||
|
||
---
|
||
|
||
## Regular Maintenance
|
||
|
||
1. **Monitor Resource Usage:** Use tools like Task Manager, Resource Monitor, or Performance Monitor to track CPU, RAM, and disk activity.
|
||
2. **Check Logs:** Open the Event Viewer to review warnings or errors.
|
||
3. **Update Regularly:** Keep roles, features, and applications up-to-date to avoid vulnerabilities.
|
||
|
||
---
|
||
|
||
## Conclusion
|
||
|
||
By following these steps, your Windows Server 2019 environment is secure, functional, and ready for additional configurations. This guide provides a foundation for deploying services and applications tailored to your specific needs, whether for a home lab, development, or production use. Taking the time to configure your server correctly now will save you time and trouble down the road.
|
||
|
||
---
|
||
|
||
Return to the [Table of Contents](https://wiki.kitpro.us/table-of-contents) for more guides and tutorials. |