Giter Club home page Giter Club logo

laravel-forge-visual-studio-remote-setup's Introduction

Laravel Forge + Visual Studio Remote

Connect Visual Studio Remote to a Laravel Forge Managed Server on Windows 10.

About

This is a setup guide on how to connect Visual Studio Code (SSH) to a Laravel Forge Managed Server.

Requirements

  1. Laravel Forge
  2. Visual Studio Code
  3. Remote Development Extension
  4. Windows 10 (This guide was made for windows 10)

Guide

Step 1: Provision your Laravel

This guide will not be going over how to provision a laravel forge server. For information on this I recommend this series form LaraCasts: Learn Forge.

Step 2: Install Visual Studio Code + Remote Development Extension

Install Visual Studio Code, Remote Development Extension.

Step 3: Activate OpenSSH in Windows Features

Go to Apps & Features in windows, click Manage optional features then Add a feature, then find OpenSSH Client and OpenSSH Server and activate them. If they do not appear in the list, check and see if they were already installed by backing out and looking for them inside the list.

Step 4: Create a Private + Public Keypair with OpenSSH

Open Command Prompt and run

ssh-keygen -t rsa -b 4096

this will create the needed private and public key's on your computer in the folder C:/users/{username}/.ssh/ PLEASE NOTE: if you use an existing generated key pair, or putty, you will run into permissions errors.

Step 5: Add the public key to Forge Managed Server

Open up the public key that was created @ C:/users/{username}/.ssh/id_rsa.pub with note pad or visual studio code, copy then contents and paste into the SSH Keys on Forge. Then click Apply.

Step 6: Add connection to Visual Studio Code.

Launch Visual Studio Code, then click on the Remote-SSH tab, then click the gear icon to the right of connections then click the first file the appears in the dropdown.

Replace the file with the following template:

# Read more about SSH config files: https://linux.die.net/man/5/ssh_config
Host {host}
	HostName {insert-ip}
	User forge
	IdentityFile C:\Users\{insert-username}\.ssh\id_rsa
	StrictHostKeyChecking no

Host: is used just for reference HostName : public IP of the forge server you created. IdentityFile : points to the private key you made in step 4. just place your desktops username in the curly bracket.

Click save once done.

Step 7: Connect to your Forge Server

click on the Remote-SSH tab, then right click on the host you just created and launch the connection. Your all done!

If this guide helped you at all, please star so others will find it. If it was not helpful, let me know why. Have a wonderful day.

Extras

Change file watching size

If you dont change a settings in filesystem, visual studio code and detect changes. run the command

sudo nano /etc/sysctl.conf

Then change the value if present, or add this to the end of the file

...
fs.inotify.max_user_watches=524288
...

laravel-forge-visual-studio-remote-setup's People

Contributors

pkeogan avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

dzineer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.