Development and staging servers
A staging copy of a typical web app runs well on S4, and a team that wants preview deployments for every branch usually lands on S8. Rebuilding from an image resets the server in minutes.
Recommended start: S4, $4.25/mo
What should a staging server match?
Staging is only useful when it behaves like production, so match the parts that cause surprises: OS release, CPU architecture, runtime versions and the database engine. Size matters less.
- Same OS image: if production runs Debian 12, stage on Debian 12, not on a newer release with different OpenSSL and glibc.
- Same architecture: stage Arm64 apps on the Arm family and x86 apps on x86. Native modules and Docker images can differ between the two.
- Same versions: pin PHP, Node.js, Python and PostgreSQL to the production major version.
- Smaller RAM is fine: one tester does not need production capacity. Half of production memory is a common staging size.
How big should a dev or staging server be?
Count the services you run at the same time and add 1 GB for the OS and build tools.
| Setup | Memory in use | Plan |
|---|---|---|
| One app, one database, one tester | 1.5~3 GB | S4 |
| App, database, Redis, a queue worker, search | 4~6 GB | S8 |
| Preview deploy per open branch (3~6 at once) | 8~12 GB | S16 |
| Full microservice stack in Docker | 12~24 GB | S32 |
The Shared vCPU family fits staging well: it is idle most of the day and short bursts during deploys are exactly what shared cores handle best. Builds that take long are better moved to a CI runner.
Plans that fit
Sizes picked for this project, smallest first. Prices are per month; the order total is the shortest term that reaches $40.
How do I set up preview deployments?
The Coolify image gives you a self-hosted app platform on Ubuntu 24.04. Connect a Git repository and Coolify builds and deploys each push, with an optional preview per pull request.
- Order S8 with the Coolify image and open the dashboard address shown at first SSH login.
- Add a wildcard DNS record such as
*.staging.example.compointing to the server, so every preview gets its own hostname. - Connect your Git provider and enable preview deployments on the application.
- Set environment variables for staging, never copying production secrets.
Without Coolify, a plain Docker CE server with one docker compose project per branch and a reverse proxy such as Caddy or Traefik does the same job with more manual control.
How do I keep staging out of search engines and away from the public?
Staging sites leak more often than production, because they are set up quickly. Lock them down before the first deploy.
- Put HTTP basic auth on every staging host. In Nginx:
htpasswd -c /etc/nginx/.htpasswd team, thenauth_basic "Staging"; auth_basic_user_file /etc/nginx/.htpasswd; - Send
X-Robots-Tag: noindex, nofollowas a header on all responses. - Use a separate domain or subdomain that never appears in production links.
- Allow only office or VPN IPs in ufw if your team has fixed addresses:
ufw allow from 203.0.113.10 to any port 443.
How should test data be handled?
Never copy a raw production database to staging. Copy it through a masking step that replaces personal data before it leaves production.
A simple pattern for PostgreSQL: dump with pg_dump -Fc, restore into a temporary database, run a SQL script that overwrites emails with user_ID@example.test, blanks phone numbers and resets password hashes, then dump again and ship only that file. For MySQL the same flow works with mysqldump. Keep the masking script in the repository so it changes with the schema.
How do I reset a staging server to a clean state?
Use rebuild from the console. It reinstalls the server with the image you pick and wipes the disk, while the IPv4 and IPv6 addresses stay the same, so DNS records keep working.
A clean rebuild is a good habit before a major test round or after experiments that changed system packages. Keep the setup in a script (a shell script, Ansible playbook or cloud-init style file you run by hand) so a rebuilt server is ready again in minutes. If you prefer to roll back instead, the backup add-on keeps seven daily copies and support can restore a chosen date on request.
What does staging cost compared with production?
Staging on S4 is $4.25 a month, ordered as $51.00 for 12 months. A preview server on S8 is $6.35 a month. The traffic allowance is rarely a concern here: testers and previews use a tiny part of the 20 TB included in Europe.
Since unused time is not refunded on early deletion, a staging server you keep for the whole term is better value than creating and deleting short-lived servers. Rebuild the one you have instead.
Dev and staging, answered
Can staging be in a different city from production?
Yes, and it often does not matter. Choose the city closest to your team, because they are the ones using staging. Shared vCPU and Arm plans are sold in Europe; Performance plans are sold everywhere.
Can I clone my production server into staging?
There is no server cloning or snapshot feature. Copy files with rsync and the database through a masked dump, or rebuild both from the same setup script.
Is there an API to create servers per pull request?
No, servers are ordered and managed from the console. Run previews as containers on one server instead, with Coolify or Docker Compose.
Can several developers share one server?
Yes. Create a Linux account per developer with their own SSH key, and add them to the docker group only if they need it, since that group is root-equivalent.
Should staging have backups?
If staging holds work that is not in Git, such as uploaded test media or long manual setups, the backup add-on at $1.27 a month on S8 is cheap insurance.
Build it on CheapVPS
Pick the plan, a city near your users and the image, then pay the order in crypto.