Skip to content

Cloud Provisioning

Shardlyn automates node provisioning across multiple cloud providers using Terraform. Provision new nodes directly from the dashboard without leaving the platform.

Supported Providers

ProviderRegionsInstance Types
AWS EC2All AWS regionst3, m5, c5, r5 families
GCP Compute EngineAll GCP regionse2, n2, c2 families
Hetzner CloudFalkenstein, Nuremberg, Helsinki, Ashburn, HillsboroCX, CPX, CCX series
Oracle Cloud (OCI)All OCI regionsVM.Standard.E4, VM.Standard.A1 (ARM)

Provisioning Flow

Create Request → Plan → Review → Apply → Wait → Node Registered
  1. Create Request: Specify provider, region, and instance type
  2. Plan: Shardlyn generates a Terraform plan showing resources to create
  3. Review: Examine the plan output and estimated costs
  4. Apply: Execute Terraform to create infrastructure
  5. Wait: The server boots and the Shardlyn agent starts automatically
  6. Registered: The node appears as healthy in your dashboard

Advanced Agent Options

When using the Terraform modules directly, you can tune the installed agent with:

  • tunnel_enabled: enables the reverse tunnel used by terminal and SFTP access
  • shardlyn_prefer_ipv4: prefers IPv4 for control plane traffic on networks with unstable IPv6
  • shardlyn_host_files_enabled: enables host filesystem browsing through the agent
  • shardlyn_host_files_allow_paths: limits which host paths are exposed when host files are enabled

The cloud-init templates already enable the SSH SFTP subsystem, so terminal and SFTP access work once the tunnel is enabled.

Setting Up Credentials

Before provisioning, add your cloud provider credentials in Settings > Credentials.

AWS

  1. Create an IAM user in the AWS Console with EC2 permissions
  2. Generate an Access Key ID and Secret Access Key
  3. In Shardlyn, go to Settings > Credentials > Add Credential
  4. Select AWS as provider
  5. Enter the Access Key ID and Secret Access Key

Minimum IAM permissions required:

  • ec2:* (instances, security groups, key pairs)
  • vpc:* (if creating new VPCs)

GCP

  1. Create a service account in the GCP Console
  2. Grant the Compute Admin role
  3. Generate a JSON key file
  4. In Shardlyn, go to Settings > Credentials > Add Credential
  5. Select GCP as provider
  6. Enter your Project ID, region, zone, and paste the service account JSON

Hetzner Cloud

  1. Generate an API token in the Hetzner Cloud Console under Security > API Tokens
  2. In Shardlyn, go to Settings > Credentials > Add Credential
  3. Select Hetzner as provider
  4. Enter your API token

Oracle Cloud (OCI)

  1. In the OCI Console, go to User Settings > API Keys
  2. Generate or upload an API key pair
  3. Note your Tenancy OCID, User OCID, and key fingerprint
  4. In Shardlyn, go to Settings > Credentials > Add Credential
  5. Select OCI as provider
  6. Enter the Tenancy OCID, User OCID, fingerprint, and private key (PEM format)

Creating a Provisioned Node

From the Dashboard

  1. Navigate to the Nodes page
  2. Click Provision Server
  3. Select your cloud provider
  4. Choose a region and instance type
  5. Configure options:
    • Node name: A descriptive name for the server
    • SSH key: Select an existing key or generate a new one
    • Data volume: Size of the attached storage volume (default: 50 GB)
    • Firewall: Automatically configured to allow your workload/template ports
  6. Click Create to generate the plan
  7. Review the plan output and estimated cost
  8. Click Apply to provision

From the API

bash
# Create a provision request
curl -X POST https://api.shardlyn.com/v1/provision \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "hetzner",
    "region": "fsn1",
    "instance_type": "cx31",
    "name": "workload-node-1"
  }'

# Review the plan
curl -X POST https://api.shardlyn.com/v1/provision/{id}/plan \
  -H "Authorization: Bearer $TOKEN"

# Apply the plan
curl -X POST https://api.shardlyn.com/v1/provision/{id}/apply \
  -H "Authorization: Bearer $TOKEN"

Provider-Specific Details

The sizing tables below use latency-sensitive game server workloads as reference examples. For web apps, APIs, databases, and internal tooling, size based on your runtime profile and storage/network needs.

AWS EC2

What Shardlyn creates:

  • EC2 instance with your chosen type
  • VPC and subnet (or uses existing)
  • Security group with workload port rules
  • EBS root volume (30 GB default) + optional data volume (50 GB default)
  • Optional Elastic IP

Recommended instance types for latency-sensitive game servers (examples):

Game TypeInstancevCPURAMCost/month
Small (1-10 players)t3.small22 GB~$15
Medium (10-50 players)t3.medium24 GB~$30
Large (50+ players)c5.xlarge48 GB~$120

GCP Compute Engine

What Shardlyn creates:

  • Compute instance with your chosen machine type
  • VPC network and subnet (or uses existing)
  • Firewall rules for workload port access
  • Boot disk (30 GB default) + optional persistent data disk (50 GB default)

Recommended machine types (game server examples):

Game TypeMachinevCPURAMCost/month
Smalle2-small22 GB~$12
Mediume2-medium24 GB~$25
Largen2-standard-4416 GB~$100

Hetzner Cloud

What Shardlyn creates:

  • Cloud server with your chosen type
  • Optional private network
  • Firewall with workload port rules
  • Optional persistent volume (ext4 or xfs, 50 GB default)

Recommended server types (game server examples):

Game TypeServervCPURAMCost/month
SmallCX2224 GB~$4
MediumCX3248 GB~$8
LargeCX42816 GB~$16

Locations: fsn1 (Falkenstein), nbg1 (Nuremberg), hel1 (Helsinki), ash (Ashburn), hil (Hillsboro)

Oracle Cloud (OCI)

What Shardlyn creates:

  • Compute instance (supports flex shapes with configurable OCPU/memory)
  • VCN and subnet (or uses existing)
  • Security list with workload port rules
  • Boot volume (50 GB default) + optional block storage volume (100 GB default)

Recommended shapes (game server examples):

Game TypeShapeOCPUsRAMCost/month
SmallVM.Standard.E4.Flex14 GB~$10
MediumVM.Standard.E4.Flex28 GB~$25
ARM (budget)VM.Standard.A1.Flex28 GB~$15

OCI Free Tier

Oracle Cloud offers a generous Always Free tier that includes ARM-based instances (4 OCPUs, 24 GB RAM). This can be a cost-effective option for game servers and lightweight workloads.

Provision Request States

StateDescription
pendingRequest created, awaiting plan generation
plannedPlan generated, ready for review
applyingTerraform is executing
appliedInfrastructure created, waiting for agent registration
failedError during provisioning
destroyingTeardown in progress

Destroying Provisioned Nodes

When you no longer need a provisioned server:

  1. Stop and remove all instances running on the node
  2. Navigate to the Nodes page
  3. Click Delete on the provisioned node
  4. Confirm the deletion — Shardlyn runs terraform destroy to remove all cloud resources

Security Best Practices

  • Use the credential store: Never hardcode cloud credentials
  • Rotate credentials regularly: Update them in Settings > Credentials
  • Limit permissions: Use provider-specific IAM with only the permissions Shardlyn needs
  • Review audit logs: Check provisioning history for unexpected activity
  • Restrict SSH access: Configure ssh_cidr_blocks to limit who can SSH into provisioned servers

Next Steps

Built for teams that want control of their own infrastructure.