October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk12 min

How to Deploy a Website From Cursor to a VPS

Build in Cursor, transfer the generated files with SSH and rsync, serve them through Nginx, add HTTPS, and automate repeat releases with GitHub Actions. This guide also explains when Cursor Remote-SSH helps and how to recover from common deployment failures.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cursor is where you edit and build the project; the VPS is where the built files are served. The most dependable workflow is to create a production build in Cursor’s integrated terminal, copy that build to a non-root user’s web directory with SSH and rsync, configure Nginx to serve the directory, and then enable HTTPS. For repeat releases, put the build and transfer in GitHub Actions. Cursor Remote-SSH is optional: it lets you edit files on the VPS, but it does not replace the server, web server, or deployment process.

This guide covers a static site and the static output of frameworks such as Astro, Next.js export, or Hugo. A server-rendered application needs an additional process manager and reverse-proxy configuration; uploading its source files alone will not start the application.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose the deployment model before touching the server

There are three practical ways to move a Cursor project to a VPS. They differ mainly in where the build runs and how releases are triggered.

Method Build location How files reach the VPS Best for Main risk
Manual build and rsync Your computer, from Cursor’s terminal SSH plus rsync First deployment, small sites, deliberate releases Forgetting to build, or using the wrong output directory
GitHub Actions and rsync A GitHub-hosted runner A workflow connects over SSH and synchronizes the build Frequent, repeatable releases Incorrect secrets, permissions, or workflow output path
Cursor Remote-SSH Wherever you run the build after connecting Cursor edits the VPS filesystem directly Remote maintenance and administration Treating remote editing as a deployment strategy or exposing production files to accidental edits

A guide covering Ubuntu static hosting with Hugo, Next.js, and Astro demonstrates the build-then-rsync pattern and synchronizes the generated directory into /var/www/: Host a Static Site on Ubuntu VPS. An example of GitHub Actions deploying Hugo through an SSH-based workflow is documented at How I deploy my Hugo website on my VPS with GitHub Actions and a Caddy-Nginx Docker stack. A bare Git repository with server-side hooks also appears in search summaries, but the implementation was not verified here, so the procedures below do not depend on it.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Prepare the project in Cursor

Identify whether the site is static

Look at the project’s package scripts or generator configuration. A static build produces files such as index.html, JavaScript bundles, stylesheets, images, and fonts. Common output names are dist/, build/, out/, or a generator-specific public directory. Do not assume dist/ is correct; the directory in the transfer command must match the tool’s actual output.

If the project performs server-side rendering, uses API routes, or requires a long-running Node, Python, PHP, or Go process, stop at this point and design a reverse-proxy deployment instead. Nginx can serve static assets from a directory, but it cannot execute your application code by itself.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install dependencies and create a production build

  1. Open the project folder in Cursor.
  2. Open Terminal from Cursor’s menu and run the package manager’s clean install command, such as npm ci when a lockfile is committed. Use the equivalent command for your package manager if the project is not npm-based.
  3. Run the project’s documented production script, commonly npm run build.
  4. Inspect the generated directory. Confirm that it contains the site’s entry point, normally index.html, and that asset paths match the domain at which the site will be served.
  5. Preview the build locally with the framework’s preview command or a simple static server. Fix broken links, missing assets, and incorrect base paths before uploading.

Keep source code, package files, and development configuration outside the web root. Only the generated, browser-ready output should be readable by Nginx for a static deployment.

Set up a safer Ubuntu VPS account

Create and test a non-root deploy user

Use a normal account with narrowly scoped sudo access for administration. Copy an SSH public key to that account and test a login from the same computer that will run rsync. The essential test is a successful connection such as ssh deploy@example-server before you change firewall settings or begin copying files.

Do not perform routine uploads as root. A dedicated account makes ownership errors easier to diagnose and limits the damage if a local key or CI secret is exposed.

Install Nginx and open the firewall without locking yourself out

On Ubuntu, install Nginx with the distribution package manager. Before enabling UFW, permit SSH and the web traffic profiles you need. The order matters: enabling a firewall before allowing SSH can cut off your only administrative session. The Nginx installation and server-block process is illustrated in How to Install and Configure Nginx on an Ubuntu VPS; package names and defaults can change between Ubuntu releases, so verify them against the release currently installed on your VPS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.
sudo apt update
sudo apt install nginx
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw enable
sudo systemctl status nginx

If your provider supplies a cloud firewall in addition to UFW, allow TCP 22 for SSH and TCP 80 and 443 for HTTP and HTTPS there as well. Restrict SSH to your office or VPN address when your provider’s firewall supports it.

Create the web directory

Choose the canonical hostname first; the examples below use example.com. Create a directory that is separate from Nginx’s default page:

sudo mkdir -p /var/www/example.com
sudo chown -R deploy:www-data /var/www/example.com
sudo chmod -R u=rwX,g=rX,o=rX /var/www/example.com

Replace deploy with your account name. The deploy user needs write permission for releases; Nginx needs read and directory-traverse permission. If you prefer a release directory owned by a different group, adjust the ownership deliberately rather than adding broad write permissions.

Configure Nginx for the domain

Write a server block

Create /etc/nginx/sites-available/example.com with a static-site configuration:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
server {
    listen 80;
    listen [::]:80;
    server_name example.com www.example.com;

    root /var/www/example.com;
    index index.html;

    location / {
        try_files $uri $uri/ /index.html;
    }
}

The fallback to /index.html is useful for single-page applications whose client-side router handles paths. If your site is a collection of real files and should return a 404 for an unknown path, use try_files $uri $uri/ =404; instead.

Enable and validate the site

  1. Enable the configuration with sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com.
  2. Remove or disable the default site if it would otherwise answer for your hostname.
  3. Run sudo nginx -t. Do not reload Nginx if this test reports an error.
  4. Reload after a successful test: sudo systemctl reload nginx.
  5. Point the domain’s DNS A record (and an AAAA record only if IPv6 is correctly configured) at the VPS address.

Test with the server’s IP and hostname. If the hostname displays the default Nginx page, DNS, the server_name, or the enabled-site link is usually wrong. If Nginx returns permission errors, check every parent directory with namei -l /var/www/example.com and confirm that the web server can traverse them.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

Deploy manually from Cursor with rsync

Run the build and verify its output

From Cursor’s integrated terminal, run the production build again immediately before release:

npm ci
npm run build
find dist -maxdepth 2 -type f | head

Substitute build, out, or another directory when your tool uses a different name. The find command is only a quick sanity check; verify the complete output and confirm that environment variables point to production services.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Copy the generated files

Ensure the remote directory exists, then synchronize the contents (the trailing slash on dist/ is intentional):

ssh [email protected] 'sudo mkdir -p /var/www/example.com && sudo chown -R deploy:www-data /var/www/example.com'
rsync -av --delete dist/ [email protected]:/var/www/example.com/

The command shape documented for this workflow is rsync -av --delete dist/ user@server:/var/www/yourdomain.com/. The --delete option makes the VPS mirror the build by removing files that no longer exist locally. That prevents stale JavaScript or CSS from lingering, but it also deletes anything manually placed inside the destination. Never point it at a directory containing uploads, logs, or other data that is not part of the build.

If the deploy account cannot write to the directory, fix ownership or use a release directory that it owns. Avoid solving the problem with chmod -R 777; it hides the permission design flaw and makes the web root writable by every local user.

Check the release on the server

  1. SSH to the VPS and list the deployed entry point: ssh [email protected] 'ls -l /var/www/example.com/index.html'.
  2. Fetch the site headers from a machine outside the VPS: curl -I https://example.com after HTTPS is configured, or use http://example.com during the initial test.
  3. Open the site in a private browser window and check navigation, forms, images, fonts, and cache-busted assets.
  4. Inspect Nginx’s error log if a page fails: sudo tail -n 100 /var/log/nginx/error.log.

Automate releases with GitHub Actions

Use Git as the source of truth

Commit the project in Cursor, push it to a private or public GitHub repository as appropriate, and keep the lockfile committed. A workflow can then check out the same revision, install dependencies, build the site, and synchronize only the generated directory. The Hugo example linked earlier uses this general model while serving through a Caddy-and-Nginx stack; your Nginx-only setup can use the same build-and-copy stages.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Prepare an SSH-only deployment account

Create a dedicated key pair for automation rather than reusing your personal private key. Add the public key to the deploy user’s ~/.ssh/authorized_keys. Store the private key, VPS hostname, username, and any known-hosts data as encrypted repository or environment secrets. Never commit a private key, password, or provider token to the repository.

Adapt this workflow skeleton

The following shows the sequence, not a promise that every action version or runner image remains unchanged. Pin current action versions and adapt the output directory and package manager to your project:

name: Deploy
on:
  push:
    branches: [main]
jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Install dependencies
        run: npm ci
      - name: Build
        run: npm run build
      - name: Configure SSH
        run: |
          mkdir -p ~/.ssh
          printf '%sn' '${{ secrets.DEPLOY_PRIVATE_KEY }}' > ~/.ssh/id_ed25519
          chmod 600 ~/.ssh/id_ed25519
      - name: Upload build
        run: rsync -av --delete -e 'ssh -o StrictHostKeyChecking=yes' dist/ '${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/var/www/example.com/'

Before using strict host-key checking in automation, add the VPS host key to the runner’s known-hosts configuration through a protected secret or a controlled provisioning step. Blindly disabling host-key checking makes a man-in-the-middle attack easier. If your build output is build/ or public/, change only that path in the final command.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Make failed releases visible and recoverable

Have the workflow fail when dependency installation, the build, or rsync fails. A successful file transfer does not prove that the browser can load the application, so add a post-deploy HTTP check against the public hostname when your CI environment can reach it. Keep the previous build in a separate release directory if you need instant rollback; otherwise, redeploy the previous Git commit with the same workflow.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Use Cursor Remote-SSH when you need to edit the VPS

Remote-SSH is an optional editing interface, not a replacement for Nginx or a release process. Cursor community results describe an extension with the ID anysphere.remote-ssh; verify the publisher and current availability in Cursor before installing it. The discussion is at SSH for beginners.

Define an SSH host alias

Add an alias to your local ~/.ssh/config so the same connection details work in both a terminal and Cursor:

Host my-vps
    HostName example.com
    User deploy
    IdentityFile ~/.ssh/id_ed25519
    ServerAliveInterval 60
    ServerAliveCountMax 3

Community guidance suggests one alias per user on shared servers; aliases also prevent accidentally opening the wrong host. The keep-alive values above are commonly cited in Cursor troubleshooting discussions, but verify behavior with your installed client. Choose the alias through Cursor’s remote connection command, then open only the project directory you intend to edit. The SSH configuration format and alias issue are discussed at .ssh/config and HostName troubleshooting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Understand what runs locally and remotely

Remote-SSH installs a Cursor Server component on the host. Community reports indicate that it needs a modern GNU C Library, with 2.28 reported as a minimum, and that CentOS 7.9 with glibc 2.17 failed to start it; treat those figures as reports rather than a compatibility guarantee. The Cursor Server questions thread records the glibc case: Questions re: Cursor Server (Remote SSH).

Cursor’s AI features run on your local computer while the remote connection supplies file access, according to Cursor’s network troubleshooting material: Network, proxy, and remote connections. If the editor connects but AI requests fail, check the local machine’s internet access first, then inspect the VPS’s CPU, memory, and outbound network limits. A connection timeout can sometimes be increased with Cursor’s remote.SSH.connectTimeout setting, although the exact setting name and current UI may vary by release.

For an offline server, a community workaround copies the Remote-SSH server package to the host manually. It is not documented as an official feature; use it only when you can verify the package, architecture, and integrity. The discussion is at How to download the Cursor Remote-SSH server manually.

Enable HTTPS after HTTP works

Once DNS resolves to the VPS and Nginx serves the correct site over HTTP, obtain a Let’s Encrypt certificate and configure Nginx for HTTPS. The Ubuntu Nginx guide cited above includes the general certificate step; Certbot package names and integration commands depend on the Ubuntu release, so follow the current Certbot instructions for that release rather than copying an old command unchanged.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

During certificate setup, request certificates for every hostname you actually serve, such as both the apex domain and www when both point to the VPS. Verify that port 80 remains reachable for certificate validation and renewal redirects. After issuance, test renewal with the Certbot dry-run option appropriate to your installation and confirm that Nginx reloads successfully.

Troubleshoot by symptom

Symptom Likely cause What to check
Permission denied from rsync The deploy user cannot write the destination Ownership of /var/www/example.com, parent-directory traversal, and the SSH account used by rsync
Old assets remain after deployment The old files are not being removed Whether the command includes --delete, whether the source path has the correct trailing slash, and whether a cache is serving an old bundle
The homepage works but refreshing a route returns 404 Nginx lacks the single-page-app fallback Use try_files $uri $uri/ /index.html; only for an SPA; use a real-file 404 policy for a traditional site
Nginx shows its welcome page The default site or DNS is taking precedence DNS records, the enabled symlink, and the matching server_name
SSH times out Firewall, provider security group, wrong address, or network policy Port 22 at both the VPS firewall and provider firewall, the SSH alias, and remote.SSH.connectTimeout where applicable
Remote-SSH fails before opening the folder Unsupported glibc, missing libraries, or an incomplete server installation Remote OS and glibc version, Cursor’s connection log, and the compatibility reports linked above
AI features fail while files are visible Local internet or remote resource limits Local proxy/connectivity first, then VPS CPU, memory, and outbound access
HTTPS certificate cannot be issued DNS is not pointing to the VPS or port 80 is blocked Public DNS resolution, provider firewall, UFW rules, and the exact hostnames requested

Release checklist

  • The project builds successfully in Cursor with production environment values.
  • The output directory contains the expected index.html and assets.
  • A non-root deploy user can log in with an SSH key.
  • SSH, HTTP, and HTTPS firewall rules are allowed before UFW is enabled.
  • Nginx passes sudo nginx -t and serves the intended hostname.
  • The first manual upload works before automation is introduced.
  • The rsync source path is correct, and --delete cannot remove unrelated data.
  • CI secrets are encrypted and the workflow fails on build or transfer errors.
  • HTTPS covers every hostname in use and renewal has been tested.
  • A rollback path exists, either by redeploying a previous commit or retaining prior release directories.

Which workflow should you use?

Use manual rsync for the first release and for sites changed infrequently. It exposes every moving part—build output, SSH permissions, Nginx routing, DNS, and TLS—so problems are easier to isolate. Move to GitHub Actions when the manual sequence is stable and you want every push to produce the same reproducible deployment. Add Remote-SSH when you need to inspect logs or configuration on the VPS; keep production publishing in the tested manual or automated release path rather than editing served files casually.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.