Skip to content

Environment Variables

TractStack uses .env files for system-level process configuration and env.json for site-level runtime settings.

Located in src/my-tractstack/.env. These variables are consumed by Astro during the build process.

Terminal window
# Connection to the Go API
PUBLIC_GO_BACKEND="http://localhost:8080"
PUBLIC_TENANTID="default"
# Feature Flags
PUBLIC_ENABLE_MULTI_TENANT="false"
PUBLIC_ENABLE_BUNNY="true"
# Internal path for the build concierge
PRIVATE_GO_BACKEND_PATH="/home/t8k/t8k-go-server/"

Located in src/tractstack-go/.env. These variables define how the Go binary interacts with the OS.

Terminal window
# System Paths
GO_BACKEND_PATH="/home/t8k/t8k-go-server/"
PORT=10000
# Security and Mode
GIN_MODE="release"
SSL_ENABLED="true"
BIND_ADDRESS="0.0.0.0"
# Multi-Tenant Mode
ENABLE_MULTI_TENANT="false"

Located in t8k-go-server/config/default/env.json. These are the runtime settings for your specific instance.

{
"SITE_URL": "[https://yourdomain.com](https://yourdomain.com)",
"SITE_INIT": true,
"HOME_SLUG": "hello",
"JWT_SECRET": "system-generated-secret",
"AES_KEY": "32-character-encryption-key",
"ADMIN_PASSWORD_HASH": "$2a$10$..."
}

The production installer automatically assigns ports to avoid conflicts. These are logged in /home/t8k/etc/t8k-ports.conf:

InstanceGo BackendAstro Frontend
Main1000020000
Dedicated 11000120001
Dedicated 21000220002

Nginx uses these internal ports to route traffic from your public domain (80/443).


Note: If you change the PORT in a backend .env file manually, you must also update the corresponding Nginx site configuration in /etc/nginx/sites-available/.