We use cookies to make your experience better.
How to access your code-server installation using an iPad.
Once you've installed code-server, you can access it from an iPad.
To use code-server on an iPad, we recommend installing the code-server progressive web app (PWA):
You can now open code-server from the Home screen, and when you do, you'll be using the PWA. Running code-server as a PWA gets you more screen real estate and access to top-level keyboard shortcuts since its running like a native app.
For example, you can use cmd+w
to close an active file in the workbench. You
can add this to keybindings.json
:
Open code-server
Go to Command Palette > Open Keyboard Shortcuts (JSON)
Add the following to keybindings.json
{
"key": "cmd+w",
"command": "workbench.action.closeActiveEditor"
}
Test the command by using cmd+w
to close an active file.
If you are unable to get the self-signed certificate working, or you do not have a domain name to use, you can use Servediter for code-server.
Servediter for code-server is not officially supported by the code-server team!
To use Servediter:
We've heard of users having great success using code-server on an iPad connected to a Raspberry Pi via USB-C (the Raspberry Pi provides both power and direct network access). Setting this up requires you to turn on Network over USB-C on the Raspberry Pi, then continuing with code-server as usual on the iPad.
For more information, see:
You may also find the following tips from Acker Apple helpful:
Here are my keys to success. I bought a 4" touch screen with fan included that attaches as a case to the Pi. I use the touch screen for anytime I have connection issues, otherwise I turn off the Pi screen. I gave my Pi a network name so I can easily connect at home on wifi or when on go with 1 usb-c cable that supplys both power and network connectivity. Lastly, not all usb-c cables are equal and not all will work so try different usb-c cables if you are going mad (confirm over wifi first then move to cable).
Once you can access code-server on your iPad, you may find the following tips and tricks helpful:
cmd + n
opens new browser window instead of new file, and it's difficult
to set alternative as a workaroundctrl+c
does not stop a long-running process in the browser
Additionally, see issues in the code-server repo that are tagged with the iPad label for more information.
ctrl+c
not stopping a running process in the terminalThis's currently an issue with ctrl+c
not stopping a running process in the
integrated terminal. We have filed an issue upstream and are tracking
here.
In the meantime, you can manually define a shortcut as a workaround:
Open the Command Palette
Look for Preferences: Open Keyboard Shortcuts (JSON)
Add the following snippet:
{
"key": "ctrl+c",
"command": "workbench.action.terminal.sendSequence",
"args": {
"text": "\u0003"
},
"when": "terminalFocus"
}
Source: StackOverflow
If you've installed code-server and are running it with a self-signed certificate, you may see multiple security warnings from Safari. To fix this, you'll need to install the self-signed certificate generated by code-server as a profile on your device (you'll also need to do this to enable WebSocket connections).
basicConstraints=CA:true
.--cert-host
.To share a self-signed certificate with an iPad:
Get the location of the certificate code-server generated; code-server prints the certificate's location in its logs:
[2020-10-30T08:55:45.139Z] info - Using generated certificate and key for HTTPS: ~/.local/share/code-server/mymbp_local.crt
Send the certificate to the iPad, either by emailing it to yourself or using Apple's Airdrop feature.
Open the *.crt
file so that you're prompted to go into Settings to install.
Go to Settings > General > Profile, and select the profile. Tap Install.
Go to Settings > About > Certificate Trust Settings and enable full trust for your certificate.
You should be able to access code-server without all of Safari's warnings now.
warning: Your iPad must access code-server via a domain name. It could be local
DNS like mymacbookpro.local
, but it must be a domain name. Otherwise, Safari will
not allow WebSockets connections.
See an opportunity to improve our docs? Make an edit.