Marinus Klasen

Marinus Klasen

  • Development
  • Consultancy
  • Developer Resources
  • Blog
  • Contact

August 15, 2023

Connecting to a Cloudways application with VSCode

Marinus Klasen

If you’ve read my blogs before than you probably know that I like to keep it short. So here you go;

  1. Enable SSH for your application
  2. Enable Application Access
  3. Set your webroot to public_html/root (or something similar)
  4. Move the files inside public_html to the newly created folder (root)
  5. Update your VSCode settings.json file and include something like below
  6. And don’t forget to enable SSH Access in Application Settings!
"remote.SSH.serverInstallPath": {
        "{HOSTNAME}": "/home/{SERVER_ID}.cloudwaysapps.com/{APPLICATION_ID}/public_html/.vscode-server",
    }

In this case {HOSTNAME} refers to the SSH hostname, if you connect with ssh user@domain.com than the hostname is domain.com.

{SERVER_ID} and {APPLICATION_ID} can be found by connecting to SSH and then running the pwd command.

Why does this not work by default?

VSCode needs to install some configuration files and wants to save them in /home/{SERVER_ID}.cloudwaysapps.com/{APPLICATION_ID}/.vscode-server by default, Cloudways does not allow saving files outside of the public_html

About Marinus Klasen

Marinus has been working in software/web development for more than a decade. Since 2020 his attention shifted on sharing knowledge and developing products and tools for sharing knowledge.

Marinus Klasen on Twitter

Looking for a WordPress expert?
Hire top notch developers on Codeable!

Consult an expert

Comments

  1. Pradeep Maheepala says

    April 19, 2024 at 2:51 pm

    Just wanted to thank you for the great post that explains the root cause and a workaround for an issue that has been really frustrating for me since moving to Cloudways.

    Reply
    • Marinus Klasen says

      April 19, 2024 at 3:14 pm

      Glad it was helpful!

      Reply
  2. Minerva Messer says

    June 22, 2024 at 2:36 am

    I just went to your site. i have a question is this a good way to contact you?

    Reply
  3. Jerry says

    December 21, 2024 at 9:55 am

    You also need to get TCPforwarding enabled from the server.

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Get in touch

Contact me using the details below

Marinus Klasen

Wilhelmina van Pruisenweg 35, 2595 AN Den Haag

marinus@mklasen.com
twitter.com/marinusklasen
linkedin.com/in/marinusklasen

  • GitHub
  • LinkedIn
  • Twitter

Have you read?

  • Elementor Widget UsageMarch 27, 2025
  • Programmatically showing popups with ElementorMarch 25, 2025
  • The Elementor sanitize_settings errorSeptember 12, 2024
  • Announcing.. Wooping Shop Health!June 13, 2024
  • Swiper setup when using wp-scriptsMarch 14, 2024

Copyright © 2025 ยท Marinus Klasen | Webdesign by Team Rood