A secure VPS deployment is easier to maintain when the initial setup follows a repeatable sequence. This checklist covers DNS, operating-system updates, firewall rules, administrator access, web-server configuration, Let’s Encrypt certificates, permissions, backups, logging, verification, and the recurring checks that keep a website available after launch.
Overview
The examples below assume a newly provisioned Linux VPS, a domain you control, and either Nginx or Apache as the web server. Package names and commands vary by distribution, so confirm the instructions for your operating system before applying them to production. Cloud providers may also require inbound rules in a separate network firewall or security group; a server-side firewall alone may not be sufficient.
Use this order for a new website deployment:
- Record the domain, VPS address, application details, and recovery contacts.
- Point DNS to the intended server and confirm that the result is consistent.
- Update the operating system and create a non-root administrator.
- Allow only the access required for administration and web traffic.
- Install and configure the web server before requesting a certificate.
- Issue a certificate with an ACME client, then test renewal.
- Redirect HTTP to HTTPS and verify the complete site, not only the homepage.
- Back up data and configuration, enable useful logging, and document rollback steps.
Separating these stages makes failures easier to diagnose. For example, a certificate request should not be your first DNS test, and a firewall change should not be made without a second administrative session available.
What to track
DNS and domain readiness
Keep a small deployment record containing the authoritative DNS provider, the VPS public IPv4 and IPv6 addresses, and the hostnames that should resolve to them. Create an A record for IPv4 and an AAAA record only when the server is correctly configured for IPv6. An incorrect or unreachable IPv6 address can cause intermittent-looking failures for some visitors.
Before certificate issuance, query DNS from more than one network or use a DNS inspection tool. Check the root domain and each required subdomain, including www. If Cloudflare or another proxy is in use, record whether traffic is proxied and confirm that the origin server can still complete the chosen ACME validation method. DNS changes can take time to appear according to cached TTL values, so do not repeatedly change records while troubleshooting.
Operating system and access baseline
After connecting to the VPS, apply available security updates using the package manager for the distribution. Then create a named administrator with sudo privileges and use SSH keys rather than sharing the root password. Test the new account in a separate terminal before changing root or password-login settings. Keep one working session open while testing access changes so a syntax error does not lock you out.
Track the SSH port, allowed administrator keys, installed services, and the date of the last update. Avoid disabling an access method until the replacement has been verified. A restrictive SSH configuration is useful only if it preserves a tested recovery path through the provider console or another approved administrative channel.
Firewall and network exposure
At minimum, the public network usually needs SSH for administration and TCP ports 80 and 443 for web traffic. The exact firewall syntax depends on the operating system and tool, such as UFW, firewalld, nftables, or a provider security group. Apply the same policy at every relevant layer and remove unused public services.
List listening services with an operating-system tool such as ss, then compare that list with the services you intended to run. Databases, caches, and internal application ports should generally bind to localhost or a private network unless external access is explicitly required and protected.
Web server, certificate, and application state
Install one web server and create a host configuration for the exact domain names the site will serve. Test the configuration before reloading it. Nginx commonly uses a command such as nginx -t; Apache provides its own configuration-test command. Use the equivalent supplied by your distribution.
For a Let’s Encrypt certificate, the ACME client must prove control of the domain. HTTP-01 validation requires the validation path to be reachable over HTTP, while DNS-01 uses a DNS TXT record. Choose the method that matches your DNS, proxy, and deployment design. For testing changes or automation, use the ACME staging environment where appropriate; see Let’s Encrypt rate limits and staging guidance.
Record the certificate names, key location, renewal command or timer, and the service reload hook. A certificate being present on disk does not prove that the web server is serving it or that renewal will reload the new files.
Permissions, backups, and logs
Give the web-server user access only to the files it must read or write. Application upload directories often need different permissions from static files, and writable directories should not be used as executable locations. Do not make the entire document root writable by the web-server account as a shortcut.
Back up the database, application files, deployment configuration, and any secrets required for recovery. Store at least one backup outside the VPS and test restoration rather than assuming that a successful backup job is usable. Monitor web-server access and error logs, application logs, disk space, memory pressure, and certificate expiry or renewal failures.
Cadence and checkpoints
Use the following schedule as a practical maintenance tracker. Adjust it to the risk and change rate of the site.
At deployment and after every change
- Resolve the domain and required subdomains from an independent network.
- Confirm ports 80 and 443 behave as intended and that unused ports are closed.
- Run the web-server configuration test before every reload or restart.
- Request a page over HTTP and confirm the redirect reaches the intended HTTPS URL.
- Inspect the certificate hostname, validity, chain, and served protocol with a browser or TLS inspection tool.
- Test a representative page, form, login flow, upload, API endpoint, and static asset.
- Record what changed, when it changed, and how to reverse it.
Monthly
- Review operating-system updates and remove packages or services no longer needed.
- Check SSH keys, administrator accounts, sudo access, and provider-console access.
- Review firewall rules and listening ports against the deployment record.
- Inspect error logs, repeated authentication failures, unusual traffic, and disk usage.
- Verify backups completed and perform a small restoration test or schedule a full recovery drill.
- Confirm the certificate renewal timer or scheduled job is active and that its logs show no errors.
Quarterly or after a major change
- Rebuild a test instance or recovery environment from documented steps where practical.
- Review DNS records, registrar contacts, domain renewal settings, and DNS-provider access.
- Test the complete restoration path, including DNS, secrets, database data, and certificate issuance.
- Review web-server headers, TLS settings, application dependencies, and access-control assumptions.
- Confirm commands and package names in this checklist still match the supported operating-system release.
How to interpret changes
A failed HTTPS check does not automatically mean the certificate is invalid. Separate the problem into DNS, network reachability, ACME validation, certificate selection, and application behavior. If the hostname resolves to the wrong address, fix DNS first. If port 80 or 443 is filtered, inspect both the provider firewall and the VPS firewall. If ACME validation fails, check the challenge path or TXT record and confirm that a proxy is not returning an unexpected response.
If browsers report a certificate-name error, compare the requested hostname with the names on the certificate and with the web server’s virtual-host selection. If the certificate is valid but pages contain insecure-content warnings, inspect image, script, stylesheet, and API URLs for hard-coded HTTP references. An HTTP-to-HTTPS redirect cannot repair every application-generated URL.
When a deployment change causes an outage, stop making unrelated changes. Preserve relevant logs, identify the last known-good configuration, and restore that version. A safe rollback normally means returning the previous web-server configuration, application release, database migration state, DNS record, or firewall policy—whichever changed. Test the configuration before reloading and keep a console-based recovery route available.
For certificate-specific symptoms, consult the certificate error troubleshooting guide. If DNS-01 is involved, review the guidance on DNSSEC, delegation, and TXT validation. Sites behind Cloudflare should also verify that the origin and edge TLS modes agree; the Cloudflare TLS guide covers that deployment pattern.
When to revisit
Revisit this checklist monthly for routine security and renewal checks, and quarterly for a broader configuration and recovery review. Return to the deployment steps immediately when you create a VPS, migrate a website, change DNS providers, add a subdomain, replace a web server, modify firewall rules, change certificate automation, or upgrade the operating system.
Before each planned change, save the current configuration, confirm a recent restorable backup, and define a rollback point. After the change, run the same DNS, firewall, HTTPS, application, and renewal checks used at launch. Keep a short change log with the server name, affected hostname, commands or files changed, verification results, and follow-up date.
The most reliable secure VPS setup is not a one-time hardening exercise. It is a documented routine: minimize exposure, automate certificate renewal, test recovery, watch the logs, and verify the user-facing site after every meaningful change.