2.6 KiB
Microsoft SQL Server Express
Overview
Microsoft SQL Server 2022 Express runs alongside PostgreSQL for Silver projects that require Microsoft SQL Server compatibility.
Status:
Operational
Verified version:
Microsoft SQL Server 2022 Express Edition (64-bit)
Linux
Version 16.0.4255.1
Service Information
| Property | Value |
|---|---|
| Container | mssql |
| Image | mcr.microsoft.com/mssql/server:2022-latest |
| Edition | Express |
| Docker network | internal |
| Compose location | /srv/docker/mssql/docker-compose.yml |
| Data location | /srv/docker/mssql/data |
Port 1433 is not published by Docker or exposed through Nginx Proxy Manager. Applications connect privately over the internal Docker network using hostname mssql.
Server-side administration must use docker exec or another container attached to internal; there is no host-bound SQL port in the current configuration.
Secrets
The SA password is provided by Infisical at runtime:
MSSQL_SA_PASSWORD
Never commit the value to Git or place it directly in the Compose file.
Deployment
The stack is deployed with Infisical injection instead of a local secrets file:
slcompose up mssql
Secrets are injected into the environment before Docker Compose evaluates variables such as ${MSSQL_SA_PASSWORD}.
Validate startup:
docker ps
docker logs mssql
Expected log message:
SQL Server is now ready for client connections.
Data Directory Permissions
The SQL Server container runs as UID and GID 10001. For a new, empty deployment, initialize the bind-mounted directory with:
sudo mkdir -p /srv/docker/mssql/data
sudo chown -R 10001:10001 /srv/docker/mssql/data
sudo chmod -R 700 /srv/docker/mssql/data
Do not delete or recreate the directory after databases exist. Removing /srv/docker/mssql/data destroys the persisted SQL Server data.
Troubleshooting
Variable Is Not Set
If Compose reports that MSSQL_SA_PASSWORD is unset and defaults to a blank string, run the stack through slcompose so Infisical injects the value before Docker Compose evaluates the environment.
System Directory Permission Denied
If [/.system] cannot be created, verify that /srv/docker/mssql/data is owned by 10001:10001 with mode 700.
Password Validation Failed
Confirm that the password meets SQL Server complexity requirements and that Compose resolved MSSQL_SA_PASSWORD from Infisical.
Related Documentation
- docs/server.md
- docs/services.md
- docs/security.md
- docs/secrets.md
- docs/backups.md
- dbgate/README.md
- postgres/README.md