Skip to content

Update the cloudflare tunnel description. #5614

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 7, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,20 +417,20 @@ sudo passwd {user} # replace user with your code-server user

[![Cloudflared](https://img.shields.io/badge/Cloudflared-E4863B?style=for-the-badge&logo=cloudflare&logoColor=ffffff)](https://github.com/cloudflare/cloudflared)

1. Install [cloudflared](https://github.com/cloudflare/cloudflared#installing-cloudflared) on your local computer
2. Then go to `~/.ssh/config` and add the following:
1. Install [cloudflared](https://github.com/cloudflare/cloudflared#installing-cloudflared) on your local computer and remote server
2. Then go to `~/.ssh/config` and add the following on your local computer:

```shell
Host *.trycloudflare.com
HostName %h
User root
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm...could this have unintended consequences? @code-asher

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually prefer to use a non-root user login in the local configuration file for security purposes. Also the username entered in vscode should be the same as the user in the file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, this should be the user that is running code-server and not root. Looks good to me. 👍

User user
Port 22
ProxyCommand "cloudflared location" access ssh --hostname %h
```

3. Run `cloudflared tunnel --url ssh://localhost:22` on the remote server

4. Finally on VS Code or any IDE that supports SSH, run `ssh coder@https://your-link.trycloudflare.com` or `ssh coder@your-link.trycloudflare.com`
4. Finally on VS Code or any IDE that supports SSH, run `ssh user@https://your-link.trycloudflare.com` or `ssh user@your-link.trycloudflare.com`

### Option 2: ngrok tunnel

Expand Down