Skip to content

Commit 652644d

Browse files
dnilasorjeanp413
authored andcommitted
add oauth setup instructions
1 parent 5f7f85a commit 652644d

File tree

1 file changed

+68
-1
lines changed

1 file changed

+68
-1
lines changed

docs/guides/render/README.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,77 @@ Render starts the server automatically.
1919

2020
## Access OpenVSCode Server
2121

22-
When the deployment is complete, you will see your server listed in the <kbd>Services</kbd> section of the Dashboard. In there, you can see your server URL to access OpenVSCode Server.
22+
When the deployment is complete, you will see your server listed in the <kbd>Services</kbd> section of the Dashboard. Click the dashboard entry to see your server URL to access OpenVSCode Server.
2323

2424
![image showing where the URL can be found](https://user-images.githubusercontent.com/36797588/134728867-54de3d3f-31e5-4c08-a239-f6d2babeec7b.png)
2525

2626
## Teardown
2727

2828
Delete the service in your dashboard.
29+
30+
31+
---
32+
33+
34+
# Deploy Secure OpenVSCode Server to Render with OAuth
35+
36+
## Prerequisites
37+
38+
To complete this guide, you need:
39+
* a [Render](https://render.com/) account
40+
* an account with the [OAuth Provider](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider) of your choice.
41+
42+
## Set up provider account
43+
44+
Consult the [OAuth2-Proxy Provider Configuration Documentation](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider/), and select at least one provider to use for authenticating users of Open VSCode. Create an OAuth application with your provider of choice. For the Homepage/Base URI, enter a placeholder like `https:openvscode-secure-server.onrender.com`, and for the Callback/Redirect URI, enter a placeholder like `https:openvscode-secure-server.onrender.com/oauth2/callback`. You will update the OAuth2 app with your URIs once your OAuth2-Proxy Server deployment is complete. Save the Client Secret and ID in a secure place like a password manager for later reference.
45+
46+
47+
## Set up Open VSCode Server
48+
49+
To deploy Open VSCode to Render as a private service, click the following button and follow the instructions:
50+
51+
[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/render-examples/openvscode-private-server)
52+
53+
After that, create a name for the service group (for example `Private OpenVSCode Server`) and click <kbd>Apply</kbd>.
54+
55+
## Start the server
56+
57+
Render starts the server automatically. Copy the service address to the clipboard:
58+
![Image showing where the service address can be found](https://user-images.githubusercontent.com/36797588/135016293-fb9b351b-f764-4c22-a1a3-7bfdec386f50.jpeg)
59+
60+
61+
## Set up OAuth2-Proxy server
62+
63+
Fork the [OAuth2-Proxy Render Example Repository](https://github.com/dnilasor/oauth2-proxy). In the Render Dashboard, select <kbd>YAML</kbd> from the side navigation and click the <kbd>New From YAML</kbd> button:
64+
![Image showing where to initialize a new service from YAML](https://user-images.githubusercontent.com/36797588/135017966-06eb2d3a-1255-42df-800d-38413b8180d8.jpeg)
65+
66+
After that, use your connected GitHub account or the full URL of your public OAuth-Proxy fork to create a deployment based on the fork.
67+
68+
## Configure OAuth server
69+
70+
Create a name for the service group (for example, `Secure Access To Open VSCode`). Next, enter the environment variable values to configure OAuth.
71+
72+
- For `OAUTH2_PROXY_UPSTREAMS` enter http://<Service Address for Private Open VSCode Server>
73+
- For `OAUTH2_PROXY_CLIENT_ID` enter the Client ID from your OAuth App
74+
- For `OAUTH2_PROXY_CLIENT_SECRET` enter the Client Secret from your OAuth App or password manager
75+
- For `OAUTH2_PROXY_PROVIDER` enter the name of your OAuth provider
76+
77+
![Image showing YAML service creation and input of sync: false values](https://user-images.githubusercontent.com/36797588/135025049-fd399efb-3c17-4a12-9539-0d12e4306eeb.jpeg)
78+
79+
## Start the server
80+
81+
Render starts the server automatically.
82+
83+
## Access OpenVSCode Server
84+
85+
When the deployment is complete, you will see your OAuth server listed in the <kbd>Services</kbd> section of the Dashboard. Click the dashboard entry to see your server URL to access OpenVSCode Server. You will be prompted to authenticate and then redirected to the private Open VSCode service.
86+
87+
## Teardown
88+
89+
Delete the service in your dashboard.
90+
91+
92+
93+
94+
95+

0 commit comments

Comments
 (0)