---
title: "Deploy MS SQL Server 2017"
description: "Easily deploy an MSSQL Server 2017 instance with pre-configured settings"
category: "Storage"
url: https://railway.com/deploy/aNgXG5
---

# Deploy MS SQL Server 2017

Easily deploy an MSSQL Server 2017 instance with pre-configured settings

**[Deploy MS SQL Server 2017 on Railway](https://railway.com/template/aNgXG5)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/aNgXG5/manifest.json

- **Creator:** GrandGale Technologies
- **Category:** Storage
- **Total deploys:** 88

## Template content

### MS SQL Server 2017 https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTEE5uQrkRUmQnCgQ4hrzZRI1vdyba6oett_w&s

- **Image:** mcr.microsoft.com/mssql/server:2017-latest

## Documentation

# MSSQL Server 2017 

This template sets up an MSSQL Server 2017 container on Railway, pre-configured with essential environment variables and a secure autogenerated password for the SA user. Follow the instructions below to connect to the database using SQL Server Management Studio (SSMS).

## Features  
- **Preconfigured Environment Variables:**  
  - `ACCEPT_EULA="Y"`: Accept the MSSQL Server End User License Agreement.  
  - `MSSQL_SA_PASSWORD`: Secure password autogenerated upon deployment.  
  - `MSSQL_DATA_DIR="/var/opt/mssql"`: Data storage directory.  
- MSSQL Server 2017, perfect for development or production use.  
- Accessible via SQL Server Management Studio or other SQL tools.

---

## Deployment Instructions  

1. **Fork or Deploy Template**  
   - Use this template to deploy an MSSQL Server 2017 container on Railway.  
   - During deployment, provide a secure password for the `SA` user by setting the 'MSSQL_SA_PASSWORD' env variable

2. **Retrieve Connection Details**  
   - Go to your Railway project dashboard.  
   - Note down the following environment variables:  
     - **TCP Proxy URL**: You can see this from the settings tab of the service
     - **Username**: `SA` (system administrator).  
     - **Password**: Autogenerated in the `MSSQL_SA_PASSWORD` variable.  

---

## Connecting via SQL Server Management Studio (SSMS)  

1. Open SQL Server Management Studio (SSMS).  
2. In the "Connect to Server" dialog box, enter the following details:  
   - **Server Type**: Database Engine.  
   - **Server Name**: Use the Railway-provided `TCP Proxy URL` (e.g., `autorack.proxy.rlwy.net,43433`). NOTE: use ',' and not ':'   to separate the url from the port
   - **Authentication**: SQL Server Authentication.  
   - **Login**: `SA`.  
   - **Password**: Use the value from `MSSQL_SA_PASSWORD` in Railway environment settings.  

3. Click "Connect" to access your MSSQL instance.  

---

## Additional Notes  

- The `MSSQL_DATA_DIR` specifies the storage location for your database files. Customize it if needed.  
- Ensure your Railway service exposes port `1433` to allow external connections.  
- Secure your deployment by restricting access and rotating passwords regularly.  

Enjoy using MSSQL Server 2017 on Railway! 🎉

## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Garage S3 Storage](https://railway.com/deploy/garage-s3-storage) — Ultra-light S3 server: fast, open-source, plug-and-play.

Open this page in a browser: https://railway.com/deploy/aNgXG5
