To do this, we’ll need to log in to the exit server (the one we created with inletsctl) and run a second instance of inlets in TCP mode. Tunneling a SSH server with inlets is also possible. # if you're on Linux, you can generate a systemd service fileĪfter that, you’ll be able to access your secure tunnel via your domain. inlets-pro http client -url "wss://:8123" \ Also, this is where you add your inlets license. Change the -upstream flag to the where code-server is hosted (usually 127.0.0.1:8080).
Inlets will also give an example command on how to start a tunnel. Add a DNS A record for your custom domain to the IP. Also include a DigitalOcean access token from your account.Īfter the server is created, inletsctl will return the server’s IP address. access-token DIGITALOCEAN_ACCESS_TOKEN \īe sure to replace the domain, email, and optionally the region. inletsctl create -provider digitalocean \ The inlets docs has examples for different providers that work great, just be sure to include the LetsEncrypt flags. In this example, I use inletsctl to deploy an “exit” server that will cost roughly $5/mo on DigitalOcean.
If you already have a server, you can use the inlets documentation to install & configure inlets-pro. Inlets offers a lot of flexibility when it comes to self-hosting tunnels, but also has the inletsctl tool to get up and running quickly! Installing inlets-pro Since this is also a self-hosted solution, you’ll need access to a remote server and a domain name.Īlex Ellis, the founder of Inlets (and OpenFaaS), and I connected and he provided some excellent support when preparing this guide.
Inlets is not free, so you’ll need a license for inlets PRO.
Inlets PRO is a self-hosted tunneling software with abstractions that makes it simple to expose local services to the internet. Option 2: Self-host a tunnel with inlets PRO (code-server and SSH) Other options, such as inlets can do this for you. Note: code-server -link will not proxy your SSH server. You can also add link: true to code-server’s config.yaml to launch with -link by default. Future logins with the tunneled URL will verify your GitHub account. Instead of authenticating with a password, you’ll be prompted to log in with GitHub. If you’ll only be connecting remotely from the web browser, you can use the code-server -link flag to get a public tunneled URL. Normally, this would require either port forwarding, configuring firewalls, or a VPN, Option 1: code-server -link Once you have code-server and/or VS Code Remote installed, it’s time to make them accessible remotely. User-data-dir: "/Users/username/Library/Application Support/Code"Įxtensions-dir: "/Users/username/.vscode/extensions" Vim $HOME/.config/code-server/config.yamlĪdd the VS Code directories. # on the machine/container with code-server installed: You can also configure code-server to use the same settings and extensions as VS Code. Other options in our docs: Installing code-server Syncing code-server and VS Code settings (optional) # mount volumes, or add them to the home directoryĭocker run -it -name code-server -p 127.0.0.1:8080:8080 \ # to persist any dependencies installed use a custom image, # will not expose your local projects and settings. Run as a Docker container: # note: running code-server as a Docker container Use code-server’s install script: # dry run: It can be installed on a remote server or locally (to make your local environment remote). I also use VS Code on my MacBook and open it up with code-server -linkĬode-server is an open source project that hosts VS Code in the web browser.I use code-server to connect from unfamiliar devices (e.g Grandma’s computer) or “light” devices such as an iPad or Chromebook.I use VS Code (Remote SSH) for near-local experience.With other projects (e.g iOS development), I use my local machine but use tunnels to connect to it from any device. For most of my projects, I develop remotely on cloud servers. code-server: Access VS Code from the web browser, runs on a remote machineīoth of these tools have their advantages and disadvantages.VS Code (Remote SSH): Use VS Code to connect and develop on a remote machine.With VS Code however, developing from any device is much more approachable. Historically, using a development environment across multiple devices would mean compromises on speed, access, or device options.