An occasional code review and an all-day remote workspace have different bills. Before switching from Codespaces to a VPS, calculate billable hours. A monthly server is not automatically cheaper.
Count core-hours, not clock hours
GitHub's Codespaces billing documentation lists compute at $0.18/hour for a two-core machine and storage at $0.07/GB-month. Personal GitHub Free accounts include 120 core-hours and 15 GB-month each month; personal Pro accounts include 180 and 20 respectively. Organization-billed usage has no free allowance.
On a two-core machine, 120 core-hours cover 60 active hours. Stopping it stops compute charges, but storage accumulates while the codespace exists. Disk capacity isn't billed GB-month. Use measured storage and remaining account allowances after other workspaces' usage. See GitHub's included-usage guide.
Reproduce the comparison
Take a two-core Codespace with 8 GB RAM (GitHub machine specifications). Compare its monthly charges against MOTSELL's current $16.90 one-month VPS with 4 vCPU, 8 GB RAM and 80 GB SSD. Match the memory requirement, not CPU speed: these are different products, and no performance equivalence is assumed.
Suppose the personal Free allowance is entirely unused before this workspace, billed storage totals 30 GB-month, and we model compute plus storage only. Run this locally with Python 3; it makes no network requests:
def codespaces(hours, gb_months, cores=2, core_quota=120, storage_quota=15):
compute = max(0, hours * cores - core_quota) * .09
storage = max(0, gb_months - storage_quota) * .07
return compute + storage
for hours in (80, 160):
print(f"{hours} active hours: ${codespaces(hours, 30):.2f}")
- Scenario A — 80 hours: $4.65. Codespaces wins against the $16.90 server. Intermittent work may make managed, on-demand development preferable.
- Scenario B — 160 hours: $19.05. The VPS rental is $2.15 cheaper before operating costs. Under these assumptions, the rental break-even is about 148 active hours monthly.
Do not stop at the server fee. If external backups cost you $5/month, scenario B's VPS cost becomes $21.90; Codespaces is cheaper again, even before accounting for your time. Add administration, security updates and restoration checks to the VPS budget. Account for paid GitHub Pro subscriptions, prebuilds, taxes and provider/payment fees separately. External AI subscriptions are not included in a VPS purchase.
Choose the environment your work needs
Codespaces is useful when you value managed repository-based dev containers and suspend often. A self-managed VPS can be useful for a persistent workspace using VS Code Remote SSH, multiple repositories and longer-running local build processes. Validate that peak memory and disk requirements fit; budget for running and maintaining the Linux environment yourself.
Use this interactive Codespaces vs VPS cost calculator to enter your active hours, remaining allowance, storage and administration costs. The same page shows the current server configurations. No claim of identical performance or guaranteed savings: compare the complete cost for your workload.
Prices checked November 19, 2026. This comparison is published by the MOTSELL team; figures are illustrative billing calculations, not measured workloads or actual customer invoices.
About the author
- MOTSELL: self-managed Linux VPS in Germany and Finland for web apps, APIs and bots. We share reproducible deployment notes and state what was tested. Apps and backups remain the customer’s responsibility. Posts may use AI assistance. https://motsell.com/en/vps-vds?utm_source=hashnode&utm_medium=community&utm_campaign=profile_202611
Comments
Join the discussionNo comments yet. Be the first to comment.