Skip to content

Commit 4f03bc5

Browse files
authored
Configuring TLS with the OpenOps script (DOC-90) (#133)
1 parent a208dd6 commit 4f03bc5

File tree

4 files changed

+22
-76
lines changed

4 files changed

+22
-76
lines changed

getting-started/deployment/aws-ec2.mdx

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ icon: 'aws'
66

77
import AutoInstall from '/snippets/auto-install.mdx'
88
import Disclaimer from '/snippets/non-production-disclaimer.mdx';
9+
import TLS from '/snippets/tls.mdx';
910
import UpdateCredentials from '/snippets/env-update-credentials.mdx';
1011
import UpdateLink from '/snippets/update-link.mdx';
1112

@@ -96,72 +97,7 @@ After making changes, restart the Docker Compose containers:
9697
sudo docker compose down && sudo docker compose up -d
9798
```
9899

99-
## Configuring TLS (HTTPS) and a custom domain
100-
101-
For production usage, it’s recommended to enable TLS (HTTPS). In addition to the security aspect, this also ensures that [workflow templates](/workflow-management/workflow-templates/) load properly in all browsers.
102-
103-
TLS requires configuring a custom domain (e.g., `https://openops.your-company.com`) to serve your OpenOps installation instead of its public IP address.
104-
105-
To get a custom domain with TLS up and running, you need to set up an AWS Application Load Balancer (ALB) with a valid TLS certificate from AWS Certificate Manager (ACM), then create a new DNS record and update your OpenOps configuration.
106-
107-
### Request an ACM certificate
108-
109-
1. Open the [ACM console](https://console.aws.amazon.com/acm/home).
110-
2. Request a public certificate for your domain (e.g., `openops.your-company.com`).
111-
3. Validate the domain using DNS. If you're using Route 53, ACM can create the necessary records automatically.
112-
4. Wait until the certificate status changes to **Issued**.
113-
114-
### Create an Application Load Balancer
115-
116-
<Warning>Once the ALB is in place, all access should go through it — you can no longer use the EC2 public IP directly.</Warning>
117-
118-
1. In the **EC2 > Load Balancers** section, click **Create Load Balancer**.
119-
2. Choose **Application Load Balancer**, and configure the following:
120-
* **Scheme**: Internet-facing
121-
* **Listeners**:
122-
* Add a listener for **HTTPS (443)** using the ACM certificate.
123-
* Optionally, add a listener on port **80** with a rule to redirect HTTP traffic to HTTPS.
124-
3. Under **Security Groups**, create a security group that allows inbound traffic on **port 443**.
125-
4. Create a target group:
126-
* **Target type**: Instance
127-
* **Protocol**: HTTP
128-
* **Port**: 80
129-
* **Health check path**: `/api/v1/health`
130-
5. Register your EC2 instance as a target.
131-
6. Finish creating the ALB and wait for its status to become **Active**.
132-
133-
### Create a DNS record
134-
135-
1. In **Route 53** (or your DNS provider), create a DNS record:
136-
- **Name**: `openops.your-company.com`
137-
- **Type**: `A` (Alias) or `CNAME`
138-
- **Value**: The DNS name of your ALB (for example, `openops-alb-123456789.us-east-1.elb.amazonaws.com`)
139-
2. Save and wait for DNS changes to propagate.
140-
141-
### Update OpenOps configuration
142-
143-
1. SSH into your EC2 instance or use CloudShell.
144-
2. Update the `.env` file to reflect your new domain:
145-
```env
146-
OPS_PUBLIC_URL=https://openops.your-company.com
147-
```
148-
3. Restart the containers:
149-
```bash
150-
sudo docker compose down && sudo docker compose up -d
151-
```
152-
153-
### Troubleshooting
154-
155-
If you encounter a 503 error:
156-
- Ensure you restarted Docker containers after updating `.env`.
157-
- Confirm that the ALB's health check is configured with the correct path (`/api/v1/health`).
158-
- Make sure the EC2 instance's security group allows traffic from the ALB.
159-
- Look for more cues in the Nginx container logs:
160-
```bash
161-
sudo docker compose logs nginx
162-
```
163-
164-
For more troubleshooting guidance, see [this AWS troubleshooting guide](https://repost.aws/knowledge-center/alb-troubleshoot-503-errors).
100+
<TLS target="EC2 instance"/>
165101

166102
<UpdateLink/>
167103

getting-started/deployment/azure-vm.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ icon: 'microsoft'
66

77
import AutoInstall from '/snippets/auto-install.mdx'
88
import Disclaimer from '/snippets/non-production-disclaimer.mdx';
9+
import TLS from '/snippets/tls.mdx';
910
import UpdateCredentials from '/snippets/env-update-credentials.mdx';
1011
import UpdateLink from '/snippets/update-link.mdx';
1112

@@ -81,11 +82,7 @@ You can now access the application by navigating to the public IP address of you
8182

8283
See [this guide](https://docs.google.com/document/d/1WhwMk3he4d4vEv_7hIw7u_4ZIz_8ZewUS1yUKxpdYR0/edit?tab=t.0#heading=h.4lq77bkice4n).
8384

84-
## TLS
85-
86-
For production usage, it’s recommended to enable TLS (HTTPS). You can achieve this by adding an Azure Application Gateway to serve traffic to your VM.
87-
88-
Without TLS, cloud templates may not load properly when using the Safari browser.
85+
<TLS target="VM"/>
8986

9087
<UpdateLink/>
9188

getting-started/deployment/gcp-vm.mdx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ icon: 'google'
77
import AutoInstall from '/snippets/auto-install.mdx'
88
import Disclaimer from '/snippets/non-production-disclaimer.mdx';
99
import RestartContainers from '/snippets/restart-containers.mdx';
10+
import TLS from '/snippets/tls.mdx';
1011
import UpdateCredentials from '/snippets/env-update-credentials.mdx';
1112
import UpdateLink from '/snippets/update-link.mdx';
1213

@@ -115,11 +116,7 @@ If you remove or disable the `db` profile in `.env` or in Docker Compose, that c
115116

116117
<RestartContainers/>
117118

118-
## TLS
119-
120-
For production usage, it’s recommended to serve the application over HTTPS. One way to achieve this on GCP is by using a HTTPS Load Balancer to terminate SSL/TLS and forward traffic to your VM. Alternatively, you can configure a TLS proxy or run a reverse proxy like Nginx with Certbot on your VM.
121-
122-
Without TLS, some features (such as certain cloud templates) may not load properly in Safari.
119+
<TLS target="VM"/>
123120

124121
<UpdateLink/>
125122

snippets/tls.mdx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Enabling TLS
2+
3+
For production usage, it’s recommended to enable TLS (HTTPS). In addition to the security aspect, this also ensures that [workflow templates](/workflow-management/workflow-templates/) load properly in all browsers.
4+
5+
The easiest way to enable TLS is to use an OpenOps script that requests and sets up a TLS certificate from Let's Encrypt. Before running the script, make sure you have a domain name that points to your {target}'s external IP address. If you're configuring DNS right before running the script, you may need to wait for the DNS change to propagate.
6+
7+
1. Run the following command in your terminal:
8+
```shell
9+
curl -fsS https://openops.sh/tls | sh
10+
```
11+
2. When prompted, enter a domain name that points to the external IP address of your {target}.
12+
3. When prompted, enter an email address to receive certificate-related notifications from Let's Encrypt.
13+
14+
The script will use the Certbot library to request a certificate for your domain from Let's Encrypt. It receives and saves the certificate, updates the OpenOps configuration file accordingly, and restarts OpenOps.
15+
16+
By default, the certificate expires in 3 months. See https://certbot.org/renewal-setup if you want to configure auto-renewal.

0 commit comments

Comments
 (0)