Skip to content

Commit e0a1220

Browse files
committed
move self-signed cert guide to bottom
1 parent e8063c7 commit e0a1220

File tree

1 file changed

+45
-45
lines changed

1 file changed

+45
-45
lines changed

docs/ipad.md

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -45,51 +45,6 @@ can add this to `keybindings.json`:
4545

4646
4. Test the command by using `cmd+w` to close an active file.
4747

48-
## Access code-server with a self-signed certificate on an iPad
49-
50-
If you've installed code-server and are [running it with a self-signed
51-
certificate](./guide.md#using-a-self-signed-certificate), you may see multiple
52-
security warnings from Safari. To fix this, you'll need to install the
53-
self-signed certificate generated by code-server as a profile on your device (you'll also need to do this to
54-
enable WebSocket connections).
55-
56-
### Certificate requirements
57-
58-
- We're assuming that you're using the self-signed certificate code-server
59-
generates for you (if not, make sure that your certificate [abides by the
60-
guidelines issued by Apple](https://support.apple.com/en-us/HT210176)).
61-
- We've noticed that the certificate has to include `basicConstraints=CA:true`.
62-
- Your certificate must have a subject alt name that matches the hostname you'll
63-
use to access code-server from the iPad. You can pass this name to code-server
64-
so that it generates the certificate correctly using `--cert-host`.
65-
66-
### Sharing a self-signed certificate with an iPad
67-
68-
To share a self-signed certificate with an iPad:
69-
70-
1. Get the location of the certificate code-server generated; code-server prints
71-
the certificate's location in its logs:
72-
73-
```console
74-
[2020-10-30T08:55:45.139Z] info - Using generated certificate and key for HTTPS: ~/.local/share/code-server/mymbp_local.crt
75-
```
76-
77-
2. Send the certificate to the iPad, either by emailing it to yourself or using
78-
Apple's Airdrop feature.
79-
80-
3. Open the `*.crt` file so that you're prompted to go into Settings to install.
81-
82-
4. Go to **Settings** > **General** > **Profile**, and select the profile. Tap **Install**.
83-
84-
5. Go to **Settings** > **About** > **Certificate Trust Settings** and [enable
85-
full trust for your certificate](https://support.apple.com/en-us/HT204477).
86-
87-
You should be able to access code-server without all of Safari's warnings now.
88-
89-
**warning**: Your iPad must access code-server via a domain name. It could be local
90-
DNS like `mymacbookpro.local`, but it must be a domain name. Otherwise, Safari will
91-
not allow WebSockets connections.
92-
9348
## Access code-server using Servediter
9449

9550
If you are unable to get the self-signed certificate working, or you do not have a domain
@@ -199,3 +154,48 @@ In the meantime, you can manually define a shortcut as a workaround:
199154
```
200155

201156
_Source: [StackOverflow](https://stackoverflow.com/a/52735954/3015595)_
157+
158+
## Access code-server with a self-signed certificate on an iPad
159+
160+
If you've installed code-server and are [running it with a self-signed
161+
certificate](./guide.md#using-a-self-signed-certificate), you may see multiple
162+
security warnings from Safari. To fix this, you'll need to install the
163+
self-signed certificate generated by code-server as a profile on your device (you'll also need to do this to
164+
enable WebSocket connections).
165+
166+
### Certificate requirements
167+
168+
- We're assuming that you're using the self-signed certificate code-server
169+
generates for you (if not, make sure that your certificate [abides by the
170+
guidelines issued by Apple](https://support.apple.com/en-us/HT210176)).
171+
- We've noticed that the certificate has to include `basicConstraints=CA:true`.
172+
- Your certificate must have a subject alt name that matches the hostname you'll
173+
use to access code-server from the iPad. You can pass this name to code-server
174+
so that it generates the certificate correctly using `--cert-host`.
175+
176+
### Sharing a self-signed certificate with an iPad
177+
178+
To share a self-signed certificate with an iPad:
179+
180+
1. Get the location of the certificate code-server generated; code-server prints
181+
the certificate's location in its logs:
182+
183+
```console
184+
[2020-10-30T08:55:45.139Z] info - Using generated certificate and key for HTTPS: ~/.local/share/code-server/mymbp_local.crt
185+
```
186+
187+
2. Send the certificate to the iPad, either by emailing it to yourself or using
188+
Apple's Airdrop feature.
189+
190+
3. Open the `*.crt` file so that you're prompted to go into Settings to install.
191+
192+
4. Go to **Settings** > **General** > **Profile**, and select the profile. Tap **Install**.
193+
194+
5. Go to **Settings** > **About** > **Certificate Trust Settings** and [enable
195+
full trust for your certificate](https://support.apple.com/en-us/HT204477).
196+
197+
You should be able to access code-server without all of Safari's warnings now.
198+
199+
**warning**: Your iPad must access code-server via a domain name. It could be local
200+
DNS like `mymacbookpro.local`, but it must be a domain name. Otherwise, Safari will
201+
not allow WebSockets connections.

0 commit comments

Comments
 (0)