Coding on iPad using self-hosted VSCode, Caddy, and code-server
This guide explains setting up coding on an iPad using VSCode, code-server, and Tailscale for secure access, requiring an Ubuntu server and configuration adjustments for security and functionality.
Read original articleThis guide outlines how to set up coding on an iPad using Visual Studio Code (VSCode), Caddy, and code-server, facilitated by Tailscale for secure access. VSCode is favored for its speed and extensive extensions, while code-server allows users to run VSCode on a server and access it from any device, including an iPad. Tailscale provides a secure connection, eliminating the need for public-facing proxies. The setup requires an iPad or laptop, a server (preferably running Ubuntu 20.04), and a Tailscale account. The process involves installing Tailscale on the server, followed by code-server, and configuring it to be accessible via Tailscale. Users must adjust the code-server configuration to allow access only through Tailscale, removing password authentication. Finally, Tailscale is installed on the iPad, allowing access to the VSCode instance via the server's Tailscale IP. Additional steps include setting up HTTPS for enhanced functionality and implementing firewall settings to restrict access to the server. This setup enables coding from various locations while ensuring security through Tailscale.
- Tailscale allows secure access to code-server from an iPad.
- The setup requires an Ubuntu server and a Tailscale account.
- Code-server must be configured to allow access only through Tailscale.
- HTTPS can be set up for enhanced functionality using Let's Encrypt.
- Firewall settings can be adjusted to restrict server access to Tailscale only.
Related
The FreeBSD-native-ish home lab and network
The author details a complex home lab setup with a FreeBSD server on a laptop, utilizing Jails for services like WordPress and emphasizing security measures and network configurations for efficiency and functionality.
Remote shell to a Raspberry Pi at 39,000 ft
The author shares their positive experience beta testing remote shell on Raspberry Pi Connect during a flight, praising its stability and efficiency for text commands. They highlight its advantages over VNC in low-bandwidth situations.
A bit more regarding UTM SE on the iPad
The author shares their experience using UTM SE on an M1 iPad Pro for local development, noting limitations and usability for running arm64 binaries. Comparisons with a-Shell and iSH are made, suggesting a small Linux single-board computer as a better option.
How to Use Tailscale VPN to Embrace Remote Work and Explore the World
The rise of remote work has led to increased interest in digital nomadism, with Tailscale recommended for secure, flexible internet access through a self-hosted VPN, enhancing privacy while traveling.
Host Your Own Copilot
Self-hosting coding co-pilots addresses privacy concerns and offers alternatives like DeepSeek-Coder-V2. Understanding licensing is vital, and tools like Continue.dev aid integration, making self-hosting a viable option.
Sadly, one discovers dozens of minor bugs and annoyances, that are mostly specific to doing productivity/dev work.
For example, when I use Cmd-Tab to switch tasks, there’s a ~ 1/20 chance that the Cmd key will become ‘soft-stuck’. That is, I’ll start typing and the OS will act as if I’m holding down Cmd, often messing with my browser or active project. I have to tap Cmd again to ‘unstick’ it. It’s not a hardware issue- An Apple store has already replaced the keyboard for me, and the problem persists.
I guess no one at Apple dogfoods the iPad for productivity? Which is sad, because here this thing is! It exists! Productivity features have been at least added to iOS!
On the plus-side, I’m getting deep into doing sound synthesis / music production in iOS. The ecosystem is kind of exciting. I spend most of my time inside Audulus (Max/PD-like data flow/DSP) - it is criminally underrated, and so much fun.
I could really go on about the pros and cons but will refrain. It’s just such a mixed bag.
Rich text editor, run PHP and NodeJS on device, manage Git repos, and view your projects in a built-in browser that includes dev tools.
Check it out! https://apps.apple.com/us/app/webforge-ide/id6450872424
EDIT: Web Development IDE, not web-based IDE. Thanks for pointing that out! :)
https://vscode.dev can connect to a remote vscode instance in a container e.g. over Remote Tunnels ; but browsers trap so many keyboard shortcuts.
Which container with code-server to run to connect to from vscode client?
You can specify a development container that contains code-server with devcontainer.json.
vscode, Codespaces and these tools support devcontainer.json, too:
coder/envbuilder: https://github.com/coder/envbuilder
loft-sh/devpod: https://github.com/loft-sh/devpod
lapce/lapdev: https://github.com/lapce/lapdev
JupyterHub and BinderHub can spawn containers that also run code-server. Though repo2docker and REES don't yet support devcontainer.json, they do support bringing your own Dockerfile.
VSCode, I dunno. It is nice to be accessible. It seems like a poor replacement for tmux+vim, which runs happily over bog standard ssh.
> There are a few caveats to coding on an iPad.
Well, thanks for being specific...The major issue is that apps & tabs are evicted unexpectedly. Any time you content switch, the app has a chance to be killed.
Of course there are mobile terminals , tmux and other tools to mitigate it, but it's still a major pain.
If I'm going ultra-light, I carry a raspberry pi + bt keyboard . Otherwise a laptop is preferred.
Also interested how it handles when network is lagging. Is the input laggy or does it smooth on the client and it syncs once network stable things sync?
[1] https://github.com/ipv6rslimited/cloudseeder </shameless>
I’ve just been hating siting at a desk for any period of time. I can’t figure out what it is about a desk. Maybe it’s an adhd thing?
What is the actual use-case of this?
Am still surprised there isn’t a solution to make the iPad a real dev machine.
Apple must really not want us to do this.
Related
The FreeBSD-native-ish home lab and network
The author details a complex home lab setup with a FreeBSD server on a laptop, utilizing Jails for services like WordPress and emphasizing security measures and network configurations for efficiency and functionality.
Remote shell to a Raspberry Pi at 39,000 ft
The author shares their positive experience beta testing remote shell on Raspberry Pi Connect during a flight, praising its stability and efficiency for text commands. They highlight its advantages over VNC in low-bandwidth situations.
A bit more regarding UTM SE on the iPad
The author shares their experience using UTM SE on an M1 iPad Pro for local development, noting limitations and usability for running arm64 binaries. Comparisons with a-Shell and iSH are made, suggesting a small Linux single-board computer as a better option.
How to Use Tailscale VPN to Embrace Remote Work and Explore the World
The rise of remote work has led to increased interest in digital nomadism, with Tailscale recommended for secure, flexible internet access through a self-hosted VPN, enhancing privacy while traveling.
Host Your Own Copilot
Self-hosting coding co-pilots addresses privacy concerns and offers alternatives like DeepSeek-Coder-V2. Understanding licensing is vital, and tools like Continue.dev aid integration, making self-hosting a viable option.