SDL Syntax Reference

Version

Required. SDL version identifier.

version: "2.0"
ValueDescription
"2.0"Current stable version

Services

Define containers and networking.

image

Required. Docker image to deploy.

image: nginx:1.25.3

Supports any public registry (Docker Hub, GHCR, GCR, ECR, etc.)

Best Practice: Always specify a version tag (e.g., nginx:1.25.3) instead of using :latest or omitting the tag. This ensures reproducible deployments and prevents unexpected updates.

command & args

Optional. Override container entrypoint.

command:
- /bin/sh
- -c
args:
- |
npm start

env

Optional. Environment variables as KEY=value strings.

env:
- NODE_ENV=production
- DATABASE_URL=postgresql://db:5432/myapp

expose

Required. Port exposure configuration. At least one port must be globally exposed.

expose:
- port: 80 # Container port (required)
as: 80 # External port (default: same as port)
proto: tcp # Protocol: tcp or udp (default: tcp)
accept: # Accepted hostnames
- example.com
to:
- global: true # Expose to internet (at least one required)
http_options: # HTTP-specific options
max_body_size: 1048576
read_timeout: 60000
send_timeout: 60000

HTTP Options:

OptionDefaultMaxDescription
max_body_size1048576104857600Max request body (bytes)
read_timeout6000060000Read timeout (ms)
send_timeout6000060000Send timeout (ms)
next_tries3-Retry attempts
next_cases[error, timeout]-When to retry

credentials

Optional. Private registry authentication.

credentials:
host: https://registry.example.com
username: user
password: pass

Profiles

Define resources and provider requirements.

compute

cpu

Required. CPU units (1000 = 1 core).

cpu:
units: 1.0 # Cores (0.1, 0.5, 1.0, etc.)

Limits: Min: 0.01 cores, Max: 384 cores

memory

Required. Memory allocation.

memory:
size: 1Gi # RAM (Mi or Gi)

Limits: Min: 1Mi, Max: 2Ti

storage

Required. At least one ephemeral storage volume required. Persistent storage is optional.

storage:
- size: 1Gi # Ephemeral root volume (required)
- name: data # Persistent volume (optional)
size: 10Gi
attributes:
persistent: true # Survives restarts
class: beta3 # Performance tier

Limits: Min: 5Mi, Max: 32Ti per volume

Classes: default, beta1, beta2, beta3, ram

gpu

Optional. GPU resources.

gpu:
units: 1 # Number of GPUs
attributes:
vendor:
nvidia:
- model: rtx4090
ram: 24Gi # Optional: filter by VRAM
interface: pcie # Optional: pcie or sxm

Limits: Max: 24 GPUs per service

Common models: a100, a40, rtx4090, rtx3090, t4, v100, h100

placement

Provider selection and pricing.

placement:
akash:
attributes: # Optional filters
region: us-west
pricing: # Required: max bid per service
web:
denom: uakt
amount: 100 # uakt per block (~6 sec)

Pricing calculation:

Daily cost = (amount × 14,400 blocks) / 1,000,000 AKT
Example: 100 uakt/block = 1.44 AKT/day = ~43 AKT/month

Deployment

Map services to profiles.

deployment:
web: # Service name
akash: # Placement name
profile: web # Compute profile name
count: 1 # Number of replicas

Note: count cannot be changed after deployment. Max: 50 replicas per service.

Endpoints

Optional. Named IP endpoints for static IPs.

endpoints:
myendpoint:
kind: ip

Use in services:

expose:
- port: 1194
to:
- global: true
ip: myendpoint

Quick Reference

Minimum viable SDL:

version: "2.0"
services:
web:
image: nginx:1.25.3
expose:
- port: 80
as: 80
to:
- global: true
profiles:
compute:
web:
resources:
cpu:
units: 0.5
memory:
size: 512Mi
storage:
size: 512Mi
placement:
akash:
pricing:
web:
denom: uakt
amount: 100
deployment:
web:
akash:
profile: web
count: 1

Common patterns:

Resource Limits (per service):

ResourceMinimumMaximum
CPU0.01 cores384 cores
Memory1Mi2Ti
Storage5Mi32Ti (per volume)
GPU0 (optional)24 units
Replicas (count)150

See also:

footer-logo-dark

© Akash Network 2025 The Akash Network Authors Documentation Distributed under CC BY 4.0

Open-source Apache 2.0 Licensed.

GitHub v0.38.2

Privacy