SQL Server has run on Linux since the 2017 release, and Microsoft's installation guide says in one sentence what this article is about: SQL Server is licensed the same for Linux and Windows. The database licence is priced by edition and by core, and the operating system under it is your choice. For a hosted server that means the Windows Server licence, which on a MassiveGRID Windows VPS is $6.31 per vCPU a month, simply disappears from the bill when the same SQL Server runs on Ubuntu. This guide covers what is and is not supported on Linux, the install on Ubuntu 22.04 command by command, the saving at three server sizes, and the cases where Windows is still the right host.
Why the licence does not care about the operating system
Microsoft sells SQL Server in editions (Express, Web, Standard, Enterprise, plus the free Developer and time-limited Evaluation editions), and the paid editions are licensed per core or, for Standard, per server plus client access licences. The licence terms say nothing about the operating system. Install media for Windows and packages for Linux are the same product with the same product keys, and the same edition limits apply on both: Express is capped at 10 GB per database and a 1,410 MB buffer pool, Web at 64 GB of buffer pool and 16 cores, Standard at 128 GB and 24 cores.
What does change is the operating system licence. Windows Server is a separate per-core licence, rented monthly through a hosting provider's SPLA agreement or brought under your own agreement. Ubuntu, Debian, Red Hat Enterprise Linux (with a subscription) and SUSE have no Microsoft licence attached. So a SQL Server that needs 4 cores costs the same SQL Server licence either way, and the Windows line is the only difference.
Microsoft supports SQL Server 2022 on Red Hat Enterprise Linux 8 and 9, SUSE Linux Enterprise Server 15 SP1 to SP4, and Ubuntu 20.04 and 22.04, on XFS or ext4 file systems, as read on Microsoft Learn on 8 November 2026. SQL Server 2025 adds Ubuntu 24.04 and RHEL 10 and drops SLES. The minimum is 2 GB of RAM, 6 GB of disk, two cores and a 2 GHz processor; in practice give the Database Engine at least 4 GB.
What works on Linux, and what does not
The Database Engine on Linux is the same engine as on Windows, and the differences are at the edges. From Microsoft's SQL Server 2022 on Linux editions page, read on 8 November 2026:
Supported: the Database Engine with full-text search, in-memory OLTP, columnstore, Query Store, temporal tables, JSON, graph, row-level security, Always Encrypted (without secure enclaves), transparent data encryption and backup encryption on Standard and Enterprise, Always On failover cluster instances and availability groups (with Pacemaker as the cluster manager instead of Windows Server Failover Clustering), log shipping, transactional and snapshot replication, SQL Server Agent for T-SQL job steps, SSIS, PolyBase, Machine Learning Services, and backup to URL for block blobs.
Not supported on Linux:
- Merge replication, Stretch Database and database mirroring (the last two deprecated on Windows too).
- Linked servers to anything other than SQL Server, and distributed queries with third-party connections; PolyBase is the route to other data sources.
- FILESTREAM and FileTable, Buffer Pool Extension, and CLR assemblies with EXTERNAL_ACCESS or UNSAFE permission.
- System extended stored procedures such as xp_cmdshell.
- SQL Server Agent subsystems other than T-SQL (CmdExec, PowerShell, SSIS, SSAS and SSRS job steps), Agent alerts, and Managed Backup.
- Analysis Services, Reporting Services, Data Quality Services and Master Data Services. Reporting Services can run on a Windows machine with its catalog databases on the Linux instance.
- Windows integrated authentication for linked servers and for availability group endpoints (certificates are used instead). Windows authentication for user logins does work once the Linux host is joined to Active Directory with adutil.
- Always Encrypted with secure enclaves, TLS 1.3, and FIPS compliance.
- Named instances. Linux supports a single default instance per host, so the SQL Server Browser service is not needed.
Read that list against your application. A web application, an API, a .NET or Java service, a reporting tool that queries over TCP, Power BI or Grafana dashboards: all fine. An application that calls xp_cmdshell, stores documents in FILESTREAM, or depends on SSRS on the same box: stay on Windows.
Install SQL Server 2022 on Ubuntu 22.04
These are Microsoft's quickstart commands for Ubuntu 22.04, as read on 8 November 2026, with the firewall and remote-connection steps added. Start from a fresh Ubuntu 22.04 Linux VPS with at least 4 GB of RAM and log in over SSH.
1. Add Microsoft's package repository
curl -fsSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/mssql-server-2022.list | sudo tee /etc/apt/sources.list.d/mssql-server.list
2. Install the engine and choose the edition
sudo apt-get update
sudo apt-get install -y mssql-server
sudo /opt/mssql/bin/mssql-conf setup
The setup prompt asks for the edition and the sa password. Evaluation, Developer and Express are free; Web, Standard and Enterprise accept a product key from a licence you hold. The password must be at least eight characters with three of the four character classes. Check the service:
systemctl status mssql-server --no-pager
3. Open the port and install the tools
sudo ufw allow from YOUR.OFFICE.IP.ADDRESS to any port 1433 proto tcp
curl -fsSL https://packages.microsoft.com/config/ubuntu/22.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo apt-get install -y mssql-tools18 unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools18/bin"' >> ~/.bashrc && source ~/.bashrc
Restrict port 1433 to the addresses that need it. A SQL Server listening to the whole internet is scanned within minutes of boot.
4. Connect and create a database
sqlcmd -S localhost -U sa -P 'YourStrongPassword' -C
1> CREATE DATABASE AppDb;
2> GO
The -C switch trusts the self-signed certificate the engine generates; replace it with a real certificate before production. Then create a sysadmin login of your own and disable sa, as Microsoft recommends.
5. Set the memory limit and enable the Agent
sudo /opt/mssql/bin/mssql-conf set memory.memorylimitmb 3072
sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true
sudo systemctl restart mssql-server
On Linux the engine takes 80 percent of physical memory by default. On a 4 GB server that leaves too little for the kernel; set memorylimitmb to about three quarters of RAM, and remember that the 2 GB minimum is what SQL Server itself needs to start. SQL Server Management Studio on your Windows laptop connects to the Linux host by IP or name exactly as it would to a Windows instance.
The same server, two bills
MassiveGRID prices Linux VPS and Windows VPS on identical rates for compute, RAM and NVMe on shared cores: $2.87 per vCPU, $0.80 per GB of RAM and $0.01 per GB of NVMe a month in New York, London and Frankfurt. The Windows Server licence is the only extra line, at $6.31 per vCPU. The table shows what that means at three sizes a SQL Server might run on; the SQL Server licence itself, whichever edition you hold, is the same on both rows and is left out.
| Server | Linux VPS (Ubuntu) | Windows VPS with licence | Windows licence share |
|---|---|---|---|
| 2 vCPU, 8 GB, 128 GB NVMe | $13.42 / month | $26.04 / month | $12.62 |
| 4 vCPU, 16 GB, 256 GB NVMe | $26.84 / month | $52.08 / month | $25.24 |
| 8 vCPU, 32 GB, 512 GB NVMe | $53.68 / month | $104.16 / month | $50.48 |
On shared cores the Windows licence roughly doubles the monthly server cost at every size. On the Dedicated VPS with reserved cores ($5.74 per vCPU, $1.60 per GB, $0.03 per GB) the proportion is smaller but the saving in dollars is the same $6.31 per vCPU: a 4 vCPU reserved server is $56.24 on Linux and $81.48 with Windows licensed. Over three years, the Linux route on the 4 vCPU shared server keeps $908.64 in your account.
Two caveats. Microsoft's 180-day evaluation of Windows Server costs nothing, so for six months the Windows VPS is as cheap as the Linux one; after that it either shuts down hourly or gets the licence. And the figures above are the self-managed VPS. If you want the operating system patched and backed up for you, the Managed Cloud Dedicated Server runs Linux at $18.75 per vCore and Windows Server Standard at $24.75; the $6.00 gap per vCore is the same Windows licence under a different product.
When Windows is still the right host
- You need SSRS, SSAS or Merge replication on the database server. These do not run on Linux. Reporting Services can live on a separate Windows machine, but if the budget is one server, make it Windows.
- The application and the database share a server and the application is Windows-only. A classic ASP.NET Framework site on IIS with SQL Server Express on the same VM is a Windows box; see ASP.NET and SQL Server hosting. .NET 8 and later run on Linux, so a modern app can follow the database.
- You want the Web edition licence rented with the server. Our managed SQL Server hosting bundles Windows Server Standard and SQL Server Web per vCore at $33.25, with the OS managed by us. There is no Linux equivalent of that bundle at present; on Linux you supply the SQL Server licence yourself or run Express, Developer or the evaluation.
- Your team administers Windows and nothing else. SQL Server on Linux is the same engine, but the host is still Linux: systemd, apt, ufw, log files under /var/opt/mssql. If nobody on the team is comfortable there, the Windows licence is cheaper than the outage.
- Active Directory authentication without a Windows server to join. Windows authentication on Linux works, but it needs a domain to join and the adutil setup; a SQL-authenticated application is simpler.
For a new application on .NET 8, Java, Python or Node.js that talks to SQL Server over TCP, with reports produced by the application or an external BI tool, Ubuntu is the default choice and the Windows licence is money left on the table. Start with the Linux VPS at 4 GB or more, install SQL Server 2022 Developer edition on staging and the paid edition you hold in production, and keep the backups off the server.
Frequently Asked Questions
Is SQL Server cheaper to license on Linux than on Windows?
The SQL Server licence costs the same on both; Microsoft licenses it by edition and core regardless of operating system. The saving is the Windows Server licence, which is a separate per-core charge. On a MassiveGRID Windows VPS that is $6.31 per vCPU a month, so a 4 vCPU server costs $25.24 a month less on Ubuntu with the same SQL Server on it.
Which Linux distributions does Microsoft support for SQL Server 2022?
Red Hat Enterprise Linux 8 and 9, SUSE Linux Enterprise Server 15 SP1 to SP4, and Ubuntu 20.04 and 22.04, on XFS or ext4, as listed on Microsoft Learn on 8 November 2026. SQL Server 2025 supports Ubuntu 22.04 and 24.04 and RHEL 9 and 10, and no longer supports SLES. Other distributions may work but are not supported.
Can I use SQL Server Management Studio with SQL Server on Linux?
Yes. SSMS runs on your Windows workstation and connects to the Linux instance over TCP port 1433 by IP address or host name, exactly as it would to a Windows instance. Visual Studio Code with the mssql extension, Azure Data Studio and sqlcmd also work from Windows, macOS and Linux.
What does not work on SQL Server for Linux?
Merge replication, Stretch Database, database mirroring, linked servers to non-SQL Server sources, FILESTREAM and FileTable, Buffer Pool Extension, CLR with EXTERNAL_ACCESS or UNSAFE, xp_cmdshell and other extended procedures, Agent job steps other than T-SQL, Analysis Services, Reporting Services, Data Quality Services, Master Data Services, Windows authentication for linked servers and availability group endpoints, Always Encrypted with secure enclaves and TLS 1.3. Named instances are not supported either; Linux runs one default instance per host.
Can I run SQL Server Express on a small Ubuntu VPS?
Yes. Express is free, installs with the same commands by choosing the Express edition in mssql-conf setup, and keeps its usual limits of 10 GB per database, a 1,410 MB buffer pool and the lesser of one socket or four cores. Microsoft's minimum for SQL Server on Linux is 2 GB of RAM, so a 2 vCPU, 4 GB, 64 GB Linux VPS at $9.58 a month on shared cores is a sensible floor for a small application database.
An Ubuntu server for SQL Server, without the Windows line
MassiveGRID Linux VPS runs Ubuntu 22.04 and 24.04 on a Proxmox HA cluster with NVMe storage in New York, London, Frankfurt or Singapore, from $3.99 a month, with the same per-vCPU, per-GB rates as the Windows VPS and no operating system licence. Reserved cores are available on the Dedicated VPS from $18.84. 100% uptime SLA, 15-day money-back guarantee.
Configure a Linux VPSFurther Reading
- Microsoft Learn: Install SQL Server on Ubuntu (quickstart)
- Microsoft Learn: Installation guidance for SQL Server on Linux (supported platforms, licensing note)
- Microsoft Learn: Editions and supported features of SQL Server 2022 on Linux (unsupported features)
- Microsoft Learn: Configure SQL Server on Linux with mssql-conf (memory limit, Agent)
- Microsoft: How to license SQL Server