Windows VPS & RDP

Create and edit.rdp files: the settings that matter

An.rdp file is a plain text list of Remote Desktop settings. Learn the lines that matter, from the address with port 3389 to screen mode, redirection and reconnect.

IntermediateWindows server5 min read

An .rdp file stores everything about one Remote Desktop connection: the server address, the screen size, which local devices are shared and how audio behaves. It is plain text, so you can read and change it in Notepad. This guide explains the lines worth knowing, so you can build a reliable connection file for your server and share it without leaking anything sensitive.

Before you start

  • A Windows 10 or 11 PC with Remote Desktop Connection (mstsc).
  • Your server's IP address and username from your VPS provider's control panel.
  • Windows VPS and Admin RDP servers listen on TCP port 3389, so the address line must include :3389.

Create a starting file

The easiest way to get a valid file is to let mstsc write it.

  1. Press Win + R, type mstsc and press Enter.
  2. Click Show Options.
  3. On the General tab, enter 203.0.113.10:3389 as the computer and your username.
  4. Click Save As and save it, for example as server1.rdp on your desktop.

You now have a file with sensible defaults that you can edit.

Open the file in Notepad

Double-clicking an .rdp file connects straight away, so open it for editing instead:

  • Right-click the file and choose Open with → Notepad, or
  • run notepad "C:\Users\admin\Desktop\server1.rdp".

Each line has three parts separated by colons: the setting name, a type (s for text, i for a number, b for binary) and the value. For example:

full address:s:203.0.113.10:3389

Save the file in Notepad when you are done. Keep the existing encoding; Notepad does this by default.

Tip: You can also edit settings in the normal window with mstsc /edit "C:\Users\admin\Desktop\server1.rdp" and then click Save.

Address and sign-in lines

full address:s:203.0.113.10:3389
username:s:admin
prompt for credentials:i:0
administrative session:i:0
  • full address is the server and port. Use a host name such as rdp.example.com:3389 if you have one.
  • username pre-fills the user name. On Admin RDP use the exact username from your VPS provider's control panel.
  • prompt for credentials:i:1 always asks for a password, even if one is saved in Windows.
  • administrative session:i:1 is the file version of mstsc /admin.

Display lines

screen mode id:i:2
desktopwidth:i:1920
desktopheight:i:1080
use multimon:i:0
session bpp:i:32
smart sizing:i:1
dynamic resolution:i:1
  • screen mode id is 1 for a window and 2 for full screen.
  • desktopwidth and desktopheight set the resolution when you use a window.
  • use multimon:i:1 spreads the session across all your monitors.
  • session bpp is colour depth. 32 looks best; 16 saves bandwidth on slow links.
  • smart sizing:i:1 scales the picture when you resize the window instead of adding scrollbars.
  • dynamic resolution:i:1 lets the remote desktop resize to match the window.

Redirection lines

These control which local resources the server can use.

redirectclipboard:i:1
redirectprinters:i:0
drivestoredirect:s:
redirectsmartcards:i:0
  • redirectclipboard:i:1 enables copy and paste between your PC and the server.
  • redirectprinters:i:1 makes your local printers available in the session.
  • drivestoredirect lists local drives to share. Leave it empty to share none, use * for all drives, or name one drive such as D:\;. Sharing only what you need is safer.
  • redirectsmartcards:i:1 passes your smart card reader through.

Audio lines

audiomode:i:0
audiocapturemode:i:0
  • audiomode is 0 to play sound on your PC, 1 to leave it on the server, or 2 for no sound.
  • audiocapturemode:i:1 sends your microphone to the server.

Reconnect and network lines

autoreconnection enabled:i:1
autoreconnect max retries:i:20
connection type:i:7
networkautodetect:i:1
bandwidthautodetect:i:1
  • autoreconnection enabled:i:1 makes the client try again when the network drops.
  • connection type:i:7 with the two auto-detect lines lets the client choose quality based on the link. Lower values with auto-detect off force a fixed profile, which can help on very slow connections.

Share a file safely

An .rdp file is handy for colleagues, but treat it with some care.

  • mstsc does not write your password into the file as plain text. Saved passwords live in Windows Credential Manager on your own PC, not in the file.
  • The file does show the server address and, if set, the username. Send it only to people who should have access.
  • Before sharing, remove or blank the username line so each person signs in with their own account. Each team member should have a separate Windows user.
  • If you shared all drives with drivestoredirect:s:*, change it to a single folder or empty value first.

Warning: Never paste the server password into a chat or email next to the .rdp file. Share the password through a password manager instead.

Check it works

  1. Save the file and double-click it.
  2. Confirm the connection prompt shows 203.0.113.10:3389 and your username.
  3. After signing in, check the screen mode, clipboard and drives behave as you set them. In File Explorer inside the session, shared drives appear under This PC as Drive on your-pc-name.

Troubleshooting

  • Changes are ignored: you may have edited a copy while opening another file. Check the path, or open it with mstsc /edit to confirm the values.
  • Notepad shows odd spacing between letters: that is just the file's Unicode encoding. Edit as normal and save without changing the encoding.
  • Windows warns that the publisher is unknown: this is normal for files you create yourself. It is shown because the file is not signed. Check the address and click Connect.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.