# TLS / HTTPs

## Overview

CS-DRIVE supports SSL/TLS encryption for secure communications. By default, it runs on:

* HTTP port: 80 (configurable via `-http-port` flag)
* HTTPS port: 443 (configurable via `-https-port` flag)

## Certificate Requirements

You need two files:


1. SSL/TLS certificate file (`.crt`)
2. Private key file (`.key`)

### Default Configuration

By default, the application looks for certificates at:

* Certificate: `/root/domain.crt`
* Private Key: `/root/domain.key`

## Setup Steps


1. Obtain SSL/TLS Certificate
   * You can get a certificate from a Certificate Authority (CA)
   * For development, you can create a self-signed certificate
2. Place Certificate Files
   * Put your certificate file (`.crt`) and private key file (`.key`) in the paths listed above
   * Make sure the application has read permissions for these files
3. Start the Application

   ```bash
   # Using default ports
   ./filedrive
   
   # Using custom ports
   ./filedrive -http-port 8080 -https-port 8443
   ```

## Important Notes


1. The application runs both HTTP and HTTPS servers simultaneously
2. Make sure your certificates are valid and not expired
3. Keep your private key secure and restrict access permissions
4. For production environments, always use certificates from trusted Certificate Authorities

## Troubleshooting

If you encounter SSL/TLS issues:


1. Verify certificate and key file paths are correct
2. Check file permissions
3. Ensure certificate is valid and not expired
4. Verify certificate and private key match



---


:::info
tags:

* TLS / HTTPs
* Secure connection
* 443

:::

---

**Documents**

- [1.0 Getting Started](https://outline.cybersift.io/s/cs-drive/doc/10-getting-started-uRQNa8gyos)
- [2.0 Updating](https://outline.cybersift.io/s/cs-drive/doc/20-updating-MLRKSOfzo0)
- [3.0 Development](https://outline.cybersift.io/s/cs-drive/doc/30-development-UcOt6ecH7O)
- [FAQ](https://outline.cybersift.io/s/cs-drive/doc/faq-Qu4pHGbI2B)