Cursor is where you edit and build the site; the VPS is where the built files are served. For a static site, the dependable path is to run the project’s build command in Cursor’s integrated terminal, copy the generated directory to the VPS with rsync, configure Nginx to serve that directory, and add HTTPS with Let’s Encrypt. You can repeat the process manually or have GitHub Actions build and transfer every approved commit.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
This guide assumes an Ubuntu VPS and a static output such as dist/, build/ or Hugo’s generated files. A server-rendered Node, Python or PHP application needs an application process, environment variables and a reverse proxy in addition to the file-transfer steps described here.
As an Amazon Associate I earn from qualifying purchases.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWhat “deploy from Cursor to a VPS” actually means
Cursor does not publish a website by itself. It is the code editor and terminal in which you edit source files, install dependencies and run the build. Deployment starts after the build has produced browser-ready files. Those files are copied over SSH to storage on the VPS, and a web server such as Nginx answers requests for your domain.
The complete path is:
- Edit the project in Cursor.
- Run its documented build command, commonly
npm run build. - Identify the output directory created by that command.
- Transfer that directory to a web root on the VPS.
- Configure DNS and an Nginx server block for the domain.
- Open the required firewall ports and obtain a Let’s Encrypt certificate.
- Verify the live site, then repeat the transfer whenever you release a new build.
A static-site walkthrough for Ubuntu describes this build-then-rsync model and places the generated files under /var/www/: Host a Static Site on Ubuntu VPS. The destination path, build command and Nginx details must match your own project.
#1 Best Overall
Choose a deployment pattern
| Pattern | How it works | Best fit | Main risk |
|---|---|---|---|
| Manual build and rsync | You build in Cursor, then run rsync -av --delete from your local terminal to the VPS. |
A personal site, infrequent releases or a first deployment you want to observe closely. | A release can be skipped or copied from the wrong output directory. |
| GitHub Actions and rsync | You push from Cursor; a workflow builds the project on a runner and synchronizes the result to the VPS. | Repeatable releases, teams and sites that need an audit trail. | Incorrect secrets, branch triggers or build settings can publish a broken artifact. |
| Git repository on the VPS | A bare repository and server-side hook receive pushes and trigger a build or checkout. | Operators who already maintain Git hooks and server builds. | The search material only mentions this approach in a summary; its exact setup was not verified here. |
A documented example of the automated pattern builds a Hugo site in GitHub Actions and synchronizes it to a VPS that uses a Caddy and Nginx Docker stack: How I deploy my Hugo website on my VPS with GitHub Actions and a Caddy-Nginx Docker stack. The stack in that example is not a requirement for a simple Nginx host.
Prepare the project and VPS
Project checks in Cursor
- Confirm the repository builds locally before touching the server. Read the project’s
package.json, framework configuration or README to find the real build command. - Run the install step required by the lockfile, then run the build in Cursor’s integrated terminal. For many JavaScript projects the command is
npm run build, but the output may be nameddist/,build/,out/or something framework-specific. - Open the generated directory and make sure it contains an entry file such as
index.html, the asset directories and any required robots or sitemap files. - Keep secrets out of the static artifact. A value embedded in client-side JavaScript is visible to every visitor, even if it started as a local environment variable.
VPS and domain prerequisites
- An Ubuntu VPS with a public IPv4 address (and IPv6 if your DNS will publish an AAAA record).
- SSH access and a domain whose DNS can be pointed at the server.
- A local SSH key. Use a non-root deploy account with sudo rather than copying files as root.
- A plan for the web root, such as
/var/www/example.com, and enough disk space for both the current and incoming release.
Before enabling the firewall, create a non-root account, grant it sudo access, copy your public key and test a new login. The order matters: allowing SSH and the web ports before enabling UFW prevents a routine hardening step from locking you out. The Nginx installation and server-block workflow is outlined in How to Install and Configure Nginx on an Ubuntu VPS.
Free tools Windows power users keep installed
One-click scans. No signup required.
Set up SSH and the Ubuntu host
Create and test a deploy account
Log in with the provider’s initial account only long enough to create the account and install its key. The following is a conventional Ubuntu sequence; check your provider’s account name and current Ubuntu instructions before running it:
sudo adduser deploy
sudo usermod -aG sudo deploy
sudo install -d -m 700 -o deploy -g deploy /home/deploy/.ssh
Copy your public key to the new account from your computer with ssh-copy-id deploy@SERVER_IP, or append the key to /home/deploy/.ssh/authorized_keys while logged in as an administrator. Set ownership and permissions on that file, then test a separate session:
ssh deploy@SERVER_IP
sudo -v
Do not disable the original administrative login until the new key-based session and sudo access both work. If your provider supplies a different initial username, substitute it for the account shown above.
Install Nginx and open UFW safely
On Ubuntu, install Nginx with apt, permit SSH and HTTP/HTTPS, and only then enable UFW:
Recommended Free Tools
sudo apt update
sudo apt install nginx
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx Full'
sudo ufw enable
sudo ufw status
The profile name may differ on a customized image. If Nginx Full is unavailable, allow TCP ports 80 and 443 explicitly after confirming your SSH rule is present. Never close your existing SSH session until a second connection succeeds with the firewall enabled.
Build the site in Cursor
- Open the project folder in Cursor.
- Install dependencies according to the repository’s lockfile.
- Run the production build, for example
npm run build. - Inspect the output directory and note its exact path. The transfer command must point at that directory, not at your source tree.
- Test the generated files locally with the framework’s preview command or a simple static server. This catches missing assets and incorrect base paths before they reach the VPS.
Frameworks often require a production base URL, trailing-slash setting or public asset prefix. Set those values before building. If links work at the domain root but fail when a visitor refreshes a nested route, the Nginx fallback rules may need to match the framework’s routing model; do not blindly use a single-page-app fallback for a site that expects real files.
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
Copy a build with rsync
The first transfer
From your local machine, use the deploy account and the VPS path you chose:
rsync -av --delete dist/ deploy@SERVER_IP:/var/www/example.com/
The trailing slash after dist/ means “copy the contents of this directory.” Without it, rsync can create an extra dist directory under the destination. Replace dist/ with the actual output directory. The --delete option makes the destination mirror the build by removing files that no longer exist locally; review the destination carefully before using it on a directory that contains uploads, logs or hand-written files. The command shape is shown in the Ubuntu static-site guide cited above.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Use an SSH alias instead of repeating options
Create an entry in your local ~/.ssh/config:
Host my-vps
HostName SERVER_IP
User deploy
IdentityFile ~/.ssh/id_ed25519
After ssh my-vps succeeds, the shorter transfer is:
rsync -av --delete dist/ my-vps:/var/www/example.com/
If you use a non-standard SSH port, add Port to the alias rather than exposing the value in every command.
Check the result before switching traffic
SSH to the VPS and list the destination. Confirm that index.html is directly inside /var/www/example.com/, not one level deeper. Check ownership and readability:
ls -la /var/www/example.com
namei -l /var/www/example.com/index.html
The account running Nginx must be able to traverse every parent directory and read the files. If you synchronize as deploy, set ownership or group permissions to match the Nginx configuration rather than solving a permission error by making the entire web root world-writable.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteConfigure Nginx for the domain
Create a server block
Create a file such as /etc/nginx/sites-available/example.com:
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/ =404;
}
}
Enable it and remove the default site if it would otherwise answer for the same request:
Rank #3
sudo ln -s /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/example.com
sudo nginx -t
sudo systemctl reload nginx
nginx -t must report a successful configuration test before the reload. Keep the default site until your DNS and server block are verified if you need a fallback for diagnostics; remove or disable it later to avoid serving the wrong content.
Point DNS at the VPS
Create an A record for the domain pointing to the VPS IPv4 address. Add an AAAA record only if the VPS is correctly configured for IPv6. DNS propagation is controlled by the records’ TTL and resolver caches, so test with the domain after the records resolve rather than assuming an immediate worldwide change. Before requesting a certificate, make sure both the bare domain and any www name listed in server_name resolve to this host.
Support client-side routes when appropriate
The try_files rule above returns 404 for a missing path, which is correct for a conventional static site. A single-page application whose router owns paths such as /settings generally needs a rule that falls back to /index.html. Use the routing instructions for your framework and test direct requests to a nested URL; changing this rule can hide genuine missing-file errors.
Enable HTTPS with Let’s Encrypt
Once HTTP serves the correct site and DNS resolves to the VPS, request a Let’s Encrypt certificate with the current Certbot package and Nginx integration recommended for your Ubuntu release. The Nginx and HTTPS workflow is included in the Ubuntu setup guide at hostini.io’s Nginx tutorial. Package names and Certbot installation methods change between Ubuntu releases, so follow the current instructions for the image you actually installed.
After issuance, test both http:// and https://, confirm that the certificate covers every hostname you publish, and verify renewal before considering the setup complete. A certificate does not fix incorrect DNS, an unopened port 443 or a server block that names the wrong domain.
Automate deployment with GitHub Actions
What the workflow should do
- Trigger only from the branch you intend to publish.
- Check out the repository and install dependencies from the lockfile.
- Run the same production build you tested in Cursor.
- Load an SSH private key from an encrypted repository secret.
- Run rsync over SSH with the correct output and destination paths.
A minimal workflow outline looks like this; adapt the runtime setup and build command to your project:
name: Deploy
on:
push:
branches: [main]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci
- run: npm run build
- name: Install SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.VPS_SSH_KEY }}
- name: Upload site
run: rsync -av --delete -e 'ssh -o StrictHostKeyChecking=no' dist/ ${{ secrets.VPS_USER }}@${{ secrets.VPS_HOST }}:/var/www/example.com/
Store the private key, host and username as repository or environment secrets. The example’s relaxed host-key option is convenient for a first run but weakens server-identity verification; a production workflow should install a known host key or otherwise verify the host fingerprint. Restrict the deploy key to the destination account and directory where your hosting setup permits it.
Make the automated path match the manual path
- Use the same Node or language version locally and in the runner.
- Ensure the workflow’s output directory is the one rsync uploads.
- Keep the VPS web root free of files that are not part of the build, because
--deletewill remove them. - Protect the workflow from publishing pull requests or unreviewed branches.
- Review the action log for the build result and rsync exit status, then open the site and test a changed page.
The Hugo deployment example linked earlier demonstrates the same high-level separation: GitHub Actions creates the artifact, and the VPS receives it. Your server does not need to use that example’s Caddy-and-Nginx Docker arrangement.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
Use Cursor Remote-SSH when you need remote editing
Remote-SSH is optional. It lets you open a folder on the VPS in Cursor, but it does not replace a release process. Community forum results describe an extension with the ID anysphere.remote-ssh and attribute it to the Cursor team; treat that identification as community-reported rather than as a verified official specification. The discussion is at SSH for beginners.
Configure an SSH host alias
Add an alias to your local ~/.ssh/config and select that alias in Cursor’s remote connection picker:
Host production-vps
HostName SERVER_IP
User deploy
IdentityFile ~/.ssh/id_ed25519
Community guidance also discusses one alias per user on shared servers: .ssh/config / Connect via SSH not using HostName properly. Keep the alias readable and avoid sharing a private key between operators.
Check compatibility before blaming the network
Remote-SSH installs a Cursor Server component on the host. Community reports say it requires a modern glibc, with 2.28 cited as a reported minimum; a CentOS 7.9 host with glibc 2.17 reportedly failed. These figures are low-confidence forum reports, not a guaranteed compatibility matrix. See Questions re: Cursor Server (Remote SSH) and check the current Cursor requirements before changing an operating system.
If a connection times out, community summaries mention increasing the remote.SSH.connectTimeout setting in seconds. They also cite ServerAliveInterval 60 and ServerAliveCountMax 3 as keep-alive suggestions, but the exact values were not verified against an official page. The relevant network troubleshooting page is Network, proxy, and remote connections.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Understand where AI features run
Forum guidance describes AI features as running on your local machine while Cursor uses SSH for remote file access. If editing works but AI requests fail, check local internet access first, then the VPS’s CPU and memory. A server that can accept SSH connections can still be too constrained for indexing a large repository.
For an offline host, a community workaround copies the Cursor Server package to the machine manually. It is not described as an official feature; see How to download cursor remote-ssh server manually before relying on it.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot the failures you are most likely to see
Rsync says the path does not exist
Run the build again and list the project root. Replace dist/ with the directory your tool actually generated. Remember that dist/ and dist have different rsync semantics: the former copies the contents, while the latter copies the directory itself.
Best Value
The upload is denied
Confirm that the SSH alias uses the intended account and key. On the VPS, check the destination’s ownership and each parent directory’s execute permission. If the directory is root-owned, create it once with sudo and grant the deploy account an appropriate owner or group; do not make it writable by every user.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Nginx returns 403
Verify that the web root contains an index file, that Nginx can traverse the path, and that the server block’s root matches the rsync destination exactly. Inspect the Nginx error log for the specific permission or index error, then run sudo nginx -t before reloading any change.
Nginx returns 404 for assets or routes
Open the browser’s network panel and compare the requested URL with the files in the build. A wrong public base path commonly causes assets to point at the wrong directory. For client-side routes, use the framework-appropriate index.html fallback rather than changing every missing file into a successful response.
The old site is still visible
Check that DNS points to the VPS, that the request’s hostname matches server_name, and that you uploaded to the active server block. If files were deleted or renamed, --delete intentionally removes their old copies; browser and CDN caches can still show an earlier response until they expire.
HTTPS issuance fails
Confirm that DNS resolves publicly, port 80 reaches this VPS, the requested hostnames are listed in Nginx and no other server block intercepts the challenge. Fix HTTP first, then rerun the current Certbot procedure for your Ubuntu release.
UFW locks you out
Use your VPS provider’s out-of-band console to restore the SSH rule, or ask the provider to repair the firewall. This is why an additional SSH session should be tested before closing the original one and why SSH must be allowed before UFW is enabled.
Remote-SSH fails while ordinary SSH works
Check the reported glibc compatibility, available disk space, CPU and memory, and the Cursor Server installation log. Increase the connection timeout only after confirming that the host is reachable. If the machine is offline, the manual package-copy workaround is community-reported and unsupported.
Operate the deployment safely after launch
- Keep the source repository and deployment credentials separate. Never commit a private key, production secret or personal SSH configuration.
- Use a dedicated deploy account and key, and remove keys when an operator no longer needs access.
- Run
nginx -tbefore every reload and keep a copy of the last known-good build so you can restore it if a release is faulty. - Record the commit identifier associated with each upload. For automated releases, retain workflow logs and make the production branch protected.
- Monitor certificate renewal, disk usage and Nginx errors. Static files need little server CPU, but a full disk or expired certificate still takes the site offline.
- Back up user uploads separately. Do not store mutable uploads in a directory that your build’s
--deletesynchronization is allowed to empty.
Which route should you use?
Start with manual rsync when you are learning the server layout or releasing occasionally. Move to GitHub Actions once the manual command, Nginx configuration and HTTPS endpoint are known to work; automation should repeat a verified process, not conceal an untested one. Use Remote-SSH for convenient remote inspection and editing, while keeping the build-and-transfer process explicit for production. A bare Git repository with hooks can be valid for experienced administrators, but the available material does not establish a current, safe hook recipe.
The reliable mental model is simple: Cursor creates the artifact, SSH transports it, Nginx serves it, DNS directs visitors and Let’s Encrypt secures the connection. Keeping those responsibilities separate makes each failure—build, transfer, web-server configuration, DNS or TLS—small enough to diagnose without guessing.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchQuick Recap
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.




