Cloud Website Deployment Guide: A Step-by-Step Workflow for Beginners
This guide walks non-specialists through a complete cloud deployment workflow, from preparing a server, domain, ports, and build artifacts to uploading releases, configuring a web server and reverse proxy, enabling HTTPS, and setting up process supervision, logging, monitoring, backups, and rollback. It also includes reusable AI prompt templates and a go-live acceptance checklist.
1. Why Deployment Blocks Non-Specialists
Many creators already use AI coding tools to generate pages, scripts, or even full applications, but the output stays local or inside an online editor and cannot be reached over the public internet, so its value is never realized. Deployment feels intimidating mainly because it spans four knowledge areas at once: networking (DNS resolution, ports, firewalls), the operating system (process supervision, file permissions), server configuration (web server and reverse proxy), and security (certificates and encrypted transport). When any one of these is missing, it surfaces as vague errors such as “site won’t open,” a blank page, or “502,” which are expensive to troubleshoot.
Another underestimated pain point is that manual work is not atomic. Uploading over FTP easily leads to missed directories, overwritten files, or a wrong transfer mode that corrupts binary assets; a single misplaced semicolon or bracket in a config file can keep the service from starting. Engineering these steps to be visualized and rollback-friendly is what actually lowers the barrier.
2. Four Prerequisites Before Deployment
- Server and access credentials: a cloud host reachable from the public internet, with a public address assigned and a known remote login method.
- Domain and DNS control: permission to manage the domain, ready to point an A record at the server address; a
wwwsubdomain needs its own record. - Ports and security group rules: allow 80 and 443 in the cloud platform’s network access control, keep only necessary ports open and the rest closed.
- Artifact inventory: identify which files are static (HTML/CSS/JS/images) and which need a runtime (backend services, databases), so a dynamic application is not hosted as a static site.
Minimal sanity-check commands to confirm the server-side runtime is ready:
# Check runtime version and port usagenode -v 2>/dev/null || echo "runtime missing"ss -lntp | grep -E ':(80|443|3000)'
3. Step 1: Turn the Project into Deliverable Artifacts
After finishing development in an AI coding tool, do not upload “the files in the editor.” Run a clean build locally first: install dependencies, execute the build script, and isolate the output directory. A good convention is a single artifact directory (for example dist/) and uploading only its contents, which eliminates missing and redundant files at the source.
A generic build and artifact check:
# Install dependencies and build (generic Node ecosystem example)npm ci && npm run build# Verify artifact integrity: the entry file must existtest -f dist/index.html && echo "entry ok" || echo "entry missing"du -sh dist # watch the size; a sudden increase usually means dependencies got bundled in
Engineering advice: keep .env files, keys, and database credentials out of the artifacts and inject them on the server through environment variables; also keep a versioned archive so you can roll back quickly if a release fails.
4. Step 2: Upload and Directory Layout
There are three upload approaches, ordered by reliability: pulling from version control (checking out a specific tag on the server); uploading an archive and unpacking it (one transfer, atomic replacement, the safest option); and file-by-file upload (fine for small changes, but the most error-prone). Whichever you choose, use a “new directory plus symlink switch” release layout so the live directory always points at one complete version:
# Example release layout# /srv/app/releases/20260826-01 current release# /srv/app/current -> releases/20260826-01 symlink to the active versionln -sfn /srv/app/releases/20260826-01 /srv/app/current
Follow least-privilege file permissions: directories 755, static files 644, write access only for the runtime user, and never run business processes as the superuser.
5. Step 3: Make the Service Correctly Reachable
A static site can be served directly by the web server by pointing the site root at the artifact directory; a dynamic application uses a reverse proxy that forwards external requests to a local listening port. The core configuration logic (illustrative):
server {listen 80;server_name example-domain.tld; # replace with your domainroot /srv/app/current; # static artifact directoryindex index.html;location /api/ {proxy_pass http://127.0.0.1:3000; # forward to the local runtimeproxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;}}
After editing, validate the syntax before reloading to avoid “a typo takes the site down”:
nginx -t && systemctl reload nginxcurl -I http://example-domain.tld # expect 200/301
If the frontend is a single-page application, unmatched paths must fall back to the entry file, otherwise refreshing a nested route returns 404.
6. Step 4: HTTPS and Domain Details
Certificates can use the industry-standard free automated issuance approach, which requests and renews them automatically over the ACME protocol; before issuance, make sure DNS has propagated and port 80 is reachable. Once issued, redirect all port 80 requests to 443 and enable HTTP/2 for better loading performance. Common pitfalls: requesting a certificate before DNS takes effect, which fails validation; letting a certificate expire with no renewal; and mixed content (an HTTPS page referencing HTTP resources) being blocked by the browser. Put renewal on a scheduled mechanism and configure reminders before expiry.
7. Step 5: Stability and Observability
Process supervision: let a process manager own the runtime so it restarts automatically after a crash and starts on boot.
Logs: separate access logs from application logs and rotate daily so the disk does not fill up.
Monitoring and alerting: set threshold alerts for availability probes, response time, error rate, and disk and memory usage, pushed to the on-call person through a messaging channel.
Backup and rollback: scheduled database snapshots, keep the last N releases, and switch back to the previous symlink target with one command when something goes wrong.
# Rollback exampleln -sfn /srv/app/releases/20260825-07 /srv/app/current && systemctl reload nginx
8. Bringing AI Conversations into Operations: Reusable Prompt Templates
Non-specialists do not need to memorize commands; what matters is stating the context clearly. Three rounds of conversation can carry a release: first describe the goal and artifact path; second ask for executable release and proxy configuration; third paste the raw error and ask for a diagnosis. Template example:
Environment: a cloud host, ports 80/443 open, artifacts in /srv/app/releases/xxx (static single-page app)Goal: bind a domain and enable HTTPS, fall back unmatched routes to index.htmlConstraints: do not run the service as root; provide rollback-capable release steps and a troubleshooting checklist
9. Go-Live Acceptance Checklist
- DNS resolves, HTTP redirects to HTTPS automatically, and the certificate chain is complete with no warnings;
- static assets return 200, APIs are reachable, and refreshing nested routes does not 404;
- process supervision and boot startup work, and the service recovers automatically after a server reboot;
- logging, monitoring, alerting, and backups are all active, and the rollback path has been rehearsed;
- extra ports are closed and no keys have entered the artifacts or the repository.
Following this workflow turns deployment from guesswork into a repeatable, verifiable, reversible standard procedure. If you want to skip environment setup and operational details entirely, a managed deployment and visualization capability offered by a cloud platform such as Baidu AI Cloud is an option, letting you focus on the product itself.
