Blame
| 5c5a0f | Hargata Softworks | 2024-01-29 03:14:33 | 1 | # Set Up HTTPS |
| 2 | ||||
| 3 | LubeLogger runs on Kestrel, which is a cross-platform standalone web server provided by .NET | |||
| 4 | ||||
| 5 | If you're running LubeLogger behind a reverse proxy(i.e. NGINX), then this walkthrough does not apply to you since the SSL certs will be served up by NGINX instead of Kestrel. | |||
| 6 | ||||
| 7 | This article covers the step-by-step process to set up HTTPS for a LubeLogger instance. | |||
| 8 | ||||
| 9 | ## Docker | |||
| 10 | If you're running LubeLogger on a Docker instance, first read [this article by Microsoft](https://learn.microsoft.com/en-us/aspnet/core/security/docker-compose-https?view=aspnetcore-8.0) | |||
| 11 | ||||
| 12 | 1. Convert the .PEM / .CRT files into .PFX, read [this StackOverflow post](https://stackoverflow.com/questions/808669/convert-a-cert-pem-certificate-to-a-pfx-certificate) | |||
| 13 | 2. Open and modify the .env file and add the following lines(note that in this example I used bob as the password for the cert) | |||
| 15772e | Hargata Softworks | 2024-10-04 02:41:52 | 14 | > [!NOTE] |
| 15 | > You can use the [LubeLogger Configurator](https://lubelogger.com/configure) | |||
| 9814e7 | Hargata Softworks | 2024-10-04 02:43:28 | 16 | > for this step |
| 5c5a0f | Hargata Softworks | 2024-01-29 03:14:33 | 17 | ``` |
| 18 | ASPNETCORE_Kestrel__Certificates__Default__Password=bob | |||
| 19 | ASPNETCORE_Kestrel__Certificates__Default__Path=/https/<yourPFXCertificateName>.pfx | |||
| 20 | ASPNETCORE_URLS=https://+:443;http://+:80 | |||
| 21 | ``` | |||
| 6b6617 | Hargata Softworks | 2024-10-08 14:33:39 | 22 | 3. Open and modify docker-compose.yml. You will need to bind a new volume to the Docker container so that Kestrel can access the certificate file. |
| 5c5a0f | Hargata Softworks | 2024-01-29 03:14:33 | 23 | ``` |
| 24 | volumes: | |||
| e9643b | Hargata Softworks | 2024-10-14 18:38:45 | 25 | - ./https/:/https:ro |
| 5c5a0f | Hargata Softworks | 2024-01-29 03:14:33 | 26 | ``` |
| 7ba7cd | Hargata Softworks | 2024-10-08 14:34:16 | 27 | 4. Check the port bindings to ensure that traffic is being forwarded to port 443 |
| 6b6617 | Hargata Softworks | 2024-10-08 14:33:39 | 28 | ``` |
| 29 | ports: | |||
| 30 | - 443:443 | |||
| 31 | ``` | |||
| 32 | 5. Run `docker-compose up -d` to start up the container and `https://localhost` will now have a valid cert. | |||
| 5c5a0f | Hargata Softworks | 2024-01-29 03:14:33 | 33 | |
| 34 | ## Windows | |||
| 261f08 | Hargata Softworks | 2025-10-15 13:25:18 | 35 | If you're running LubeLogger as the standalone Windows executable: |
| 5c5a0f | Hargata Softworks | 2024-01-29 03:14:33 | 36 | |
| 37 | 1. Convert the .PEM / .CRT files into .PFX, read [this StackOverflow post](https://stackoverflow.com/questions/808669/convert-a-cert-pem-certificate-to-a-pfx-certificate) | |||
| fde5bf | Hargata Softworks | 2025-10-15 13:24:32 | 38 | 2. Navigate to the Server Settings Configurator and click Next until you get to "Server Endpoints" |
| 8b717b | Hargata Softworks | 2025-10-15 13:26:19 | 39 | |
| fde5bf | Hargata Softworks | 2025-10-15 13:24:32 | 40 |  |
| 8b717b | Hargata Softworks | 2025-10-15 13:26:19 | 41 | |
| 42 | Note: Replace `0.0.0.0` with your IPv4 address | |||
| 5cac90 | Hargata Softworks | 2025-10-15 13:26:28 | 43 | |
| fde5bf | Hargata Softworks | 2025-10-15 13:24:32 | 44 | 3. Save the Settings by clicking to the end of the Server Settings Configurator and click "Save" |
| 45 | 4. Restart the app and `https://localhost` will now have a valid cert. |
