@@ -217,7 +217,7 @@ infrastructure. Skip this section if you already have a server or VM available.
217
217
218
218
![ name and region] ( docs/name_and_region.png )
219
219
220
- 1 . Under Firewall, check ** Allow HTTPS traffic** :
220
+ 1 . Under Firewall, check both ** Allow HTTP traffic ** and ** Allow HTTPS traffic** :
221
221
222
222
![ firewall] ( docs/firewall.png )
223
223
@@ -238,3 +238,89 @@ infrastructure. Skip this section if you already have a server or VM available.
238
238
the SSH button:
239
239
240
240
![ VM instances page] ( docs/vm_instances.png )
241
+
242
+
243
+ ## Starting the server
244
+
245
+ Follow these steps to launch this project. They assume you are sitting at a shell prompt on the
246
+ server or VM on which you want to host your instance. If the domain you used as the authorized
247
+ redirect URI when registering the OAuth application does not yet point to the server or VM, first
248
+ configure your domain's nameserver to serve an A record (and/or AAAA record, if applicable) mapping
249
+ that domain to the server or VM's IP address.
250
+
251
+ 1 . Run the command: ` $ unshare --version `
252
+
253
+ If the current version number is less than 2.38, run the following additional commands, verifying
254
+ that the version number printed by the last line is now 2.38:
255
+ ```
256
+ $ sudo apt install binutils uidmap
257
+ $ curl -o util-linux-2.38-2_amd64.deb http://snapshot.debian.org/archive/debian/20220413T031740Z/pool/main/u/util-linux/util-linux_2.38-2_amd64.deb
258
+ $ ar x util-linux-2.38-2_amd64.deb data.tar.xz
259
+ $ tar xf data.tar.xz ./usr/bin/unshare
260
+ $ curl -o libc6_2.33-1_amd64.deb http://snapshot.debian.org/archive/debian/20211212T154235Z/pool/main/g/glibc/libc6_2.33-1_amd64.deb
261
+ $ ar x libc6_2.33-1_amd64.deb data.tar.xz
262
+ $ tar xf data.tar.xz ./lib/x86_64-linux-gnu/ld-2.33.so ./lib/x86_64-linux-gnu/libc.so.6 ./lib/x86_64-linux-gnu/libc-2.33.so ./lib/x86_64-linux-gnu/libnss_files.so.2 ./lib/x86_64-linux-gnu/libnss_files-2.33.so
263
+ $ rm data.tar.xz
264
+ $ cat >unshare <<-tac
265
+ #!/bin/sh
266
+
267
+ mypath="\`realpath "\$0"\`"
268
+ mydir="\`dirname "\$mypath"\`"
269
+ exec "\$mydir/lib/x86_64-linux-gnu/ld-2.33.so" --library-path "\$mydir/lib/x86_64-linux-gnu" "\$mydir/usr/bin/unshare" "\$@"
270
+ tac
271
+ $ chmod +x unshare
272
+ $ sudo ln -s "$PWD/unshare" /usr/local/bin
273
+ $ `which unshare` --version
274
+ ```
275
+
276
+ 1 . Run the command: ` $ sudo apt install python3-certbot-apache `
277
+
278
+ 1 . Run the command: ` $ sudo certbot --apache `
279
+
280
+ 1 . Answer the configuration prompts and wait for verification to complete. (Note that this requires
281
+ HTTP to be allowed through any firewall(s) in addition to HTTPS.)
282
+
283
+ 1 . Run the command: `$ sudo cp /etc/apache2/sites-available/000-default-le-ssl.conf
284
+ /etc/apache2/sites-available/openvscode-gdrive.conf`
285
+
286
+ 1 . Edit the ` openvscode-gdrive.conf ` file, replacing the ` DocumentRoot ` line with the following:
287
+ ```
288
+ ProxyPass / http://localhost:8000/
289
+ ProxyPassReverse / http://localhost:8000/
290
+ RewriteEngine on
291
+ RewriteCond %{HTTP:Upgrade} websocket [NC]
292
+ RewriteCond %{HTTP:Connection} upgrade [NC]
293
+ RewriteRule ^/?(.*) "ws://localhost:8000/$1" [P,L]
294
+ ```
295
+
296
+ 1 . Run the command: ` $ sudo a2dissite 000-default 000-default-le-ssl `
297
+
298
+ 1 . Run the command: ` $ sudo a2enmod proxy_http proxy_wstunnel `
299
+
300
+ 1 . Run the command: ` $ sudo a2ensite openvscode-gdrive `
301
+
302
+ 1 . Run the command: ` $ sudo systemctl restart apache2 `
303
+
304
+ 1 . Run the command: ` $ sudo apt install unzip `
305
+
306
+ 1 . Follow the Deno installation instructions at [ deno.land] ( https://deno.land ) , being sure to use a
307
+ version no older than 1.21.0.
308
+
309
+ 1 . Run the command: ` $ sudo apt install git `
310
+
311
+ 1 . Use ` git clone ` to clone this repository, then ` cd ` into the resulting directory.
312
+
313
+ 1 . Run the command: ` $ ./deps.ts `
314
+
315
+ 1 . Answer each of the configuration prompts or hit enter to select its default. If you want support
316
+ for GUI applications, be sure to answer ` y ` at the appropriate time.
317
+
318
+ 1 . Upload the JSON file you downloaded when registering the OAuth application and rename it to
319
+ ` config.json ` .
320
+
321
+ 1 . Run the command: ` $ sudo apt install fuse3 `
322
+
323
+ 1 . If you do not want your instance to support GUI applications, skip this step. Otherwise, run the
324
+ command: ` $ sudo apt install xkb-data x11-xkb-utils x11-xserver-utils `
325
+
326
+ 1 . Run the command: ` $ ./main.ts `
0 commit comments