---
title: AWS deployment | Space Works Workspace docs
description: Launch an x86_64 or arm64 Linux instance with at least 30 GiB disk. Allow inbound SSH from your administration network and 80/443 TCP plus 443 UDP for the…
url: https://spaceworkslabs.tech/docs/workspace/deployment-aws/
updated: 2026-11-12
---

[Space Works Workspace](https://spaceworkslabs.tech/docs/workspace/) Overview
- [Overview](https://spaceworkslabs.tech/docs/workspace/overview/)
- [Roles and access](https://spaceworkslabs.tech/docs/workspace/roles/)
- [Integrations setup](https://spaceworkslabs.tech/docs/workspace/integrations/)
- [Monitoring Space Works services](https://spaceworkslabs.tech/docs/workspace/monitoring/)
Install and run
- [Host the complete stack on a VPS](https://spaceworkslabs.tech/docs/workspace/deployment-vps/)
- [Production Docker deployment](https://spaceworkslabs.tech/docs/workspace/deployment-docker/)
- [Cloud deployment](https://spaceworkslabs.tech/docs/workspace/deployment-cloud/)
- [Netlify frontend with a Docker VPS backend](https://spaceworkslabs.tech/docs/workspace/deployment-split/)
- [AWS deployment](https://spaceworkslabs.tech/docs/workspace/deployment-aws/)
- [Kubernetes deployment](https://spaceworkslabs.tech/docs/workspace/deployment-kubernetes/)
- [Configuration](https://spaceworkslabs.tech/docs/workspace/configuration/)
Developers
- [Space Works machine API (/api/v1)](https://spaceworkslabs.tech/docs/workspace/api/)
- [Space Works MCP server](https://spaceworkslabs.tech/docs/workspace/mcp/)
[All docs](https://spaceworkslabs.tech/docs/)

Space Works Workspace · Install and run

# AWS deployment

## EC2

Launch an x86_64 or arm64 Linux instance with at least 30 GiB disk. Allow inbound SSH from your administration network and 80/443 TCP plus 443 UDP for the edge. Point DNS to the instance, then run the[curl installer](https://spaceworkslabs.tech/docs/workspace/deployment-vps/) . Choose bundled data services or an external S3 bucket. Managed PostgreSQL/Redis use the standalone container deployment. Store encrypted off-server backups outside the instance/account boundary you need to recover from.

## ECS / Fargate

Use`ghcr.io/spaceworks-labs/spaceworks-workspace-backend:<immutable-version>`for the web task on port 3000. An ALB terminates HTTPS and routes the website and all API routes to it. A separate rendering frontend uses its own deployment and the gateway settings in[Split hosting](https://spaceworkslabs.tech/docs/workspace/deployment-split/) . Enable ALB idle timeouts long enough for SSE and avoid a proxy/CDN that buffers streams. Do not cache authenticated pages, Server Actions or private downloads.

Run a one-off task from the same backend image with command`["migrate"]`and the maintenance DIRECT_URL before rolling the web service. A failed task blocks rollout. Runtime web tasks use a restricted DB identity. Run separate private worker and beat ECS services from the same backend image with commands`["node", "dist/worker.js"]`and`["node", "dist/beat.js"]`. Use one beat replica, the same runtime secrets and private database/Redis/storage access, and outbound SMTP/API egress. Health probes use`/health`on port 3460; never attach that port to the public ALB. Set the maximum supported ECS stop timeout and allow handlers to drain. EventBridge may invoke`node scripts/scheduler.mjs --once`with APP_URL and CRON_SECRET instead of beat, but a running worker is still required. See[jobs](https://github.com/SpaceWorks-Labs/SpaceWorks-Workspace/blob/95081f02383e0b81e13cf963b905d99ad5868713/docs/areas/jobs-queue.md) .

Use RDS PostgreSQL 16 in private subnets, require TLS in DATABASE_URL and DIRECT_URL, and provision runtime grants after migrations. Use ElastiCache Redis/Valkey with TLS enabled and a native`rediss://`URL. S3 buckets remain private with versioning; the backend can use task-role credentials by omitting the access-key pair. Set S3_REGION, S3_BUCKET and HTTPS endpoint as appropriate; virtual-host style normally uses S3_FORCE_PATH_STYLE=0. Grant only bucket list/location and the needed object get/put/delete actions. Block public access.

Put AUTH_SECRET, encryption keys and bearer secrets in Secrets Manager/SSM and map them to runtime environment variables. AUTH_URL and NEXT_PUBLIC_BASE_URL must be the public HTTPS origin. Configure TRUSTED_PROXY_IP_HEADER=x-forwarded-for and the actual trusted hop count. The backend listens privately; only the load balancer is public. Mount a writable cache/tmp path if enforcing a read-only root filesystem.

Health uses public`/api/health`for load-balancer liveness and authenticated`/api/health/db`for release readiness. Save a provider snapshot before migrations. Application-image rollback leaves forward migrations in place; restore RDS/S3 together only through a reviewed maintenance procedure. See[operations](https://github.com/SpaceWorks-Labs/SpaceWorks-Workspace/blob/95081f02383e0b81e13cf963b905d99ad5868713/docs/production-operations.md) .

From[SpaceWorks-Workspace/docs/DEPLOYMENT_AWS.md](https://github.com/SpaceWorks-Labs/SpaceWorks-Workspace/blob/95081f02383e0b81e13cf963b905d99ad5868713/docs/DEPLOYMENT_AWS.md) at 95081f0, updated 2026-11-12.[Suggest a change](https://github.com/SpaceWorks-Labs/SpaceWorks-Workspace/edit/main/docs/DEPLOYMENT_AWS.md)  [PreviousNetlify frontend with a Docker VPS backend](https://spaceworkslabs.tech/docs/workspace/deployment-split/) [NextKubernetes deployment](https://spaceworkslabs.tech/docs/workspace/deployment-kubernetes/)

On this page
- [EC2](#ec2)
- [ECS / Fargate](#ecs-fargate)
