Secure Sparrow Services with SSL
Step 1: Run the Setup Script
Connect to VM via ssh
Navigate to the directory where the setup_nginx_proxy_ssl.sh script is located and run the following command:
cd /home
./setup_nginx_proxy_ssl.sh
Once executed, you’ll see a welcome message and a list of services:
========================================
Welcome to Sparrow
========================================
Let's begin with your domain setup.
Choose what you need to setup from the options below:
Note: Services marked with ✔ already have domain, SSL and NGINX configured.
[1] Backend [PORT: 9000]
[2] Socket [PORT: 9001] ✔ (sparrowsocket.test.com)
[3] App [PORT: 1422] ✔ (sparrowapp.test.com)
[4] Auth [PORT: 1421]
[5] Proxy [PORT: 3000]
[6] Exit
Step 2: Select the Service to Configure
When prompted, enter the number for the service you want to configure
(e.g., enter 1
for the Backend).
Services already configured will show a and the linked domain name.
Step 3: Follow the Prompts
For services not yet configured, the script will prompt you to:
-
Enter your custom domain (e.g.,
auth.sparrowdomain.com
) -
Enter your email for SSL certificate registration
The script will:
-
Create an NGINX configuration for the selected service
-
Enable and reload NGINX
-
Request an SSL certificate via Let’s Encrypt
You will be asked to:
-
Provide your email (used for security notifications and renewal alerts)
-
Accept the Let’s Encrypt Terms of Service
-
(Optional) Agree to share your email with EFF (Electronic Frontier Foundation)
If successful, you’ll see a message like:
nginx
Account registered successfully. SSL certificate issued and applied.
Step 4: Verify the Setup
After setup:
-
The service is now available at the configured domain (e.g.,
https://backend.sparrowdomain.com
) -
SSL/TLS is enabled and secure
-
A ✔ will appear beside the service name in future runs of the script