Overview
Self-hosting OwnStak allows you to deploy applications directly to your own cloud infrastructure using our open source CLI and Lambda proxy. This lets you use your own CI/CD pipelines and domain while using the same underlying infrastructure patterns as the managed platform.
However, it does not include the full OwnStak platform features such as the Console interface, infinite deployment previews, multi-backend deployments, rollback capabilities, fine-grained access control, or audit trails and monitoring dashboards.
Prerequisites
Domain Setup
You'll need a domain and DNS management for your OwnStak environments. For example, if you own the domain mydomain.com
, you could use *.ownstak.mydomain.com
for your OwnStak deployments.
Cloud Provider Setup
AWS Setup
AWS is currently the primary supported cloud provider. Follow these steps to set up your AWS infrastructure using our open source tools:
Step 1: Clone the OwnStak Providers Repository
Start by cloning the OwnStak providers repository:
git clone https://github.com/OwnStak/ownstak-providers.git
cd ownstak-providers
Step 2: Configure Your AWS Settings
Navigate to the AWS directory and configure your settings:
cd aws
Follow the instructions in the AWS README to configure the following variables:
aws_region
: Your preferred AWS region (e.g.,us-east-1
,eu-west-1
)ownstak_wildcard_domain
: Your wildcard domain for OwnStak (e.g.,ownstak.mydomain.com
)domain_zone_id
: The Route 53 hosted zone ID for your domain
Step 3: Deploy the Infrastructure
Run the deployment script to provision all necessary AWS resources:
./apply.sh
This script will:
- Create the necessary IAM roles and policies
- Set up VPC, subnets, and networking components
- Deploy Lambda functions and ECS clusters
- Configure API Gateway and other required services
- Set up monitoring and logging
The deployment process typically takes 5-10 minutes to complete.
Step 4: Get Your Deployment Configuration
After the deployment completes, the script will output the configuration you need for the OwnStak CLI, including environment variables and the command format.
The CLI command will look similar to this:
OWNSTAK_AWS_REGION=us-east-1 \
OWNSTAK_WILDCARD_DOMAIN=*.ownstak.mydomain.com \
OWNSTAK_RESOURCE_PREFIX="ownstak" \
OWNSTAK_LAMBDA_ROLE=arn:aws:iam::000000000000:role/ownstak-lambda-execution-role \
npx ownstak deploy --provider-type aws --environment my-project
Where my-project
will be used as a subdomain on your wildcard domain (e.g., my-project.ownstak.example.com
).
Other Cloud Providers
Support for additional cloud providers (Google Cloud, Azure, etc.) is planned for future releases. Check our GitHub repository for updates.