What is SQL Server?
Plenty of stacks are married to SQL Server - .NET shops, legacy line-of-business apps, vendors who only certify against MSSQL. What is less known: Microsoft licenses the Express edition for production at no cost, and SQL Server 2025 raised its ceiling to 50 GB per database. That covers a remarkable number of real workloads.
This template runs the official Linux container (mcr.microsoft.com/mssql/server:2025) internal-only - databases never get a public domain - with data on a persistent volume. Two variables: an explicit ACCEPT_EULA=Y (your acceptance, not baked in) and the sa password.
Need Standard or Enterprise? Set MSSQL_PID to your licensed edition - the container model is bring-your-own-license, and setting the PID is the attestation. Developer editions stay out of production; this template defaults to the edition that is actually free there.
What you get
- Official Microsoft image, SQL Server 2025 on Linux
- Express edition: free production license, 50 GB per database
- Full T-SQL, columnstore, JSON, and the tooling ecosystem (.NET, SSMS, sqlcmd)
- Explicit EULA acceptance via variable - nothing silently agreed
- BYOL path: switch MSSQL_PID to Standard/Enterprise you already own
- Internal-only, persistent /var/opt/mssql volume, non-root container
How it runs on Lyngbak
| Service | Role | Public |
|---|---|---|
mssql | SQL Server 2025 (:1433) | no (by design) |
Before you deploy
ACCEPT_EULAset Y to accept the Microsoft EULA - deliberate, not baked into the template
MSSQL_SA_PASSWORD8+ chars, 3 of 4 character classes
Sizing and billing
Express caps its buffer pool at ~1.4 GB, so 2 GiB is the natural fit - the edition cannot use more. BYOL Standard wants the next plans up. Note: amd64 only; SQL Server has no arm64 story at all.
A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 9.77 GiB of volumes cost $0.15 per GiB a month ($1.47/mo) for as long as they exist. One workspace can use both. See pricing
Compared with the managed service
| Service | Plan | Price | Includes |
|---|---|---|---|
| Azure SQL Database | Standard S0 | $15/mo | 10 DTU, 250 GB - the production-recommended floor (Basic at $4.90 exists: 5 DTU / 2 GB, genuinely tiny) |
| AWS RDS for SQL Server | Express, db.t3.small | $34/mo | 2 vCPU / 2 GiB + 20 GiB storage, Single-AZ |
Honest math: tiny Azure tiers undercut self-hosting on sticker price. The case here is locality (same project network as your apps), no per-database billing, and one workspace that also runs the apps. Prices from each vendor's pricing page, June 2026.
Run it locally first
The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.
Questions
Is it really legal to run SQL Server Express in production for free?
Yes - Microsoft offers a free production license for Express, linked from their own container deployment docs. The limits are technical, not legal: 50 GB per database (2025), ~1.4 GB buffer pool, up to 4 cores, no SQL Agent. The template defaults to Express for exactly this reason.
How does this compare to Azure SQL Database pricing?
Azure SQL meters compute (DTUs or vCores) plus storage per database, around the clock for always-on workloads. This stack fits a 2 GiB plan - and the same plan still hosts the app that talks to it.
Can I bring my own Standard or Enterprise license?
Yes - set MSSQL_PID=Standard (or Enterprise) and you attest to holding that license; the container does not validate keys. Raise the RAM in compose.miget.yaml accordingly - Standard 2025 can use up to 256 GB of buffer pool if you give it a plan that big.
How do my apps connect?
From the same Lyngbak project: Server=mssql,1433 with the sa credentials (or better, an app login you create on first boot via MSSQL_DB/MSSQL_USER/MSSQL_PASSWORD). The instance is private with no ingress route - exactly how a database should live.
Why is there no arm64 image?
Microsoft only builds SQL Server containers for x86-64, and the old arm64 workaround (Azure SQL Edge) was retired in September 2025. If your platform nodes are amd64 - as Lyngbak standard plans are - this is a non-issue.