Install SQL Server Express on a Windows VPS
Install SQL Server Express and SSMS, create a database and app login, and allow remote connections only from your own IP address.
- Intermediate
- Windows VPS
- 3 min read
SQL Server Express is Microsoft's free edition of SQL Server. It suits small websites, line-of-business apps and development, within the database size and resource limits Microsoft sets for Express. Check Microsoft's edition comparison for the limits of the version you install.
1. Download and install
- On the server, open Microsoft's SQL Server downloads page and download Express.
- Run the installer and choose Basic for a standard setup with sensible defaults, or Custom to choose the install folder and features.
- Accept the licence terms and wait for the install to finish. Note the instance name it shows, usually
SQLEXPRESS.
2. Install SQL Server Management Studio
The installer's final screen links to SQL Server Management Studio (SSMS), a separate free download. Install it, then connect to localhost\SQLEXPRESS with Windows Authentication.
3. Create a database and a login for your app
In SSMS, open a New Query window and run (change the names and use a strong password):
CREATE DATABASE ShopDb;
GO
CREATE LOGIN shop_app WITH PASSWORD = 'Use-A-Long-Unique-Passphrase-1!';
GO
USE ShopDb;
CREATE USER shop_app FOR LOGIN shop_app;
ALTER ROLE db_owner ADD MEMBER shop_app;SQL logins need SQL Server and Windows Authentication mode: right-click the server in SSMS, open Properties → Security, choose that mode, then restart the SQL Server service.
4. Local apps only? You are done
If your website or app runs on the same server, connect with Server=localhost\SQLEXPRESS;Database=ShopDb;... and do not open any ports.
5. Remote access (only if you need it)
- Open SQL Server Configuration Manager → SQL Server Network Configuration → Protocols for SQLEXPRESS and enable TCP/IP.
- In TCP/IP properties, on the IP Addresses tab under IPAll, clear TCP Dynamic Ports and set TCP Port to
1433. - Restart the SQL Server (SQLEXPRESS) service.
- Allow the port only from your own IP address:
New-NetFirewallRule -DisplayName "SQL 1433 from office" -Direction Inbound -Protocol TCP -LocalPort 1433 -RemoteAddress 198.51.100.10 -Action AllowNever open port 1433 to the whole internet. SQL Server is a constant target for password-guessing bots. Restrict by IP, or connect through RDP and use SSMS on the server itself.
Troubleshooting
- "A network-related or instance-specific error": check the instance name, that the service is running (
Get-Service *SQL*), and for remote connections that TCP/IP is enabled and the firewall allows your IP. - "Login failed for user": confirm mixed-mode authentication is enabled and the service was restarted.
Next steps
- Back up a Windows VPS (include your
.bakfiles). - Check CPU, RAM and disk use on Windows
Was this guide helpful?
Still stuck?
Ask RunRacks AI for a quick answer, or open a ticket and our team will take a look at your server.
Related guides
Windows VPS & RDP
RunRacks RDP port 12230: how to connect to your Windows VPS and Admin RDP
RunRacks Windows VPS and Admin RDP servers accept Remote Desktop on port 12230, not 3389. Here is how to connect from every device and keep the port open.
- Beginner
- Windows VPS · Admin RDP
- 5 min read
Windows VPS & RDP
Allow or block multiple RDP sessions for one user
Understand why a new Remote Desktop login takes over your old session, how the single-session policy works on Windows Server, and which setting suits a team.
- Advanced
- Windows VPS
- 5 min read
Windows VPS & RDP
Create Windows users with Remote Desktop access
Give each person their own Windows login, add them to Remote Desktop Users, test the account and remove access cleanly later.
- Beginner
- Windows VPS · Admin RDP
- 2 min read