Documentation Index
Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
Use this file to discover all available pages before exploring further.
Deploy iCommerce on Hetzner
Run StateSet iCommerce 24/7 for approximately $5/month on Hetzner. This guide walks you through deploying a persistent iCommerce Gateway on a Hetzner VPS using Docker, with durable state, baked-in binaries, and safe restart behavior.Goal
Deploy a production-ready StateSet iCommerce Gateway on Hetzner with:- Persistent configuration and workspace data
- Docker-based isolated runtime
- SSH tunnel access for secure administration
- Automatic restart on failure
What you’ll build
Configure persistent storage
Mount host directories for configuration and workspace data that survives restarts.
Prerequisites
Before you begin, ensure you have:- Hetzner VPS with root access
- SSH access from your local machine
- Basic familiarity with terminal commands
- StateSet API credentials
- Model provider credentials (OpenAI, Anthropic, etc.)
- WhatsApp Business API credentials
- Telegram bot token
- Gmail OAuth credentials
This guide assumes Ubuntu or Debian on Hetzner. If you’re on another Linux VPS provider, map packages accordingly.
Quick path (experienced operators)
If you’re familiar with Hetzner and Docker, follow this condensed workflow:- Provision Hetzner VPS (Ubuntu/Debian)
- Install Docker
- Clone the StateSet iCommerce repository
- Create persistent host directories
- Configure
.envanddocker-compose.yml - Bake required binaries into the image
docker compose up -d- Verify persistence and Gateway access
1) Provision the VPS
Create an Ubuntu or Debian VPS in the Hetzner Cloud Console.Recommended specifications
| Type | Specs | Cost | Notes |
|---|---|---|---|
| CX22 | 2 vCPU, 4GB RAM | ~€4/mo | Recommended |
| CX11 | 1 vCPU, 2GB RAM | ~€3/mo | Budget option, may OOM under load |
2) Install Docker
Run the following commands on the VPS:3) Clone the repository
4) Create persistent host directories
Docker containers are ephemeral. All long-lived state must live on the host to survive restarts and rebuilds.5) Configure environment variables
Create a.env file in the repository root:
6) Docker Compose configuration
Create or updatedocker-compose.yml:
7) Bake required binaries into the image
If you add new skills later that depend on additional binaries, you must:- Update the Dockerfile
- Rebuild the image
- Restart the containers
Example Dockerfile
8) Build and launch
9) Verify the Gateway
Check the logs:10) Access from your local machine
Create an SSH tunnel to forward the Gateway port:Persistence reference
All long-lived state must survive restarts, rebuilds, and reboots. Docker is not the source of truth.| Component | Location | Persistence | Notes |
|---|---|---|---|
| Gateway config | /home/node/.stateset/ | Host volume mount | Includes tokens, settings |
| Model auth profiles | /home/node/.stateset/ | Host volume mount | OAuth tokens, API keys |
| Skill configs | /home/node/.stateset/skills/ | Host volume mount | Skill-level state |
| Agent workspace | /home/node/.stateset/workspace/ | Host volume mount | Code and agent artifacts |
| WhatsApp session | /home/node/.stateset/ | Host volume mount | Preserves QR login |
| Keyring | /home/node/.stateset/ | Host volume + password | Requires STATESET_KEYRING_PASSWORD |
| External binaries | /usr/local/bin/ | Docker image | Must be baked at build time |
| Node runtime | Container filesystem | Docker image | Rebuilt every image build |
| OS packages | Container filesystem | Docker image | Do not install at runtime |
Updates
To update StateSet iCommerce on the VPS:Troubleshooting
SSH connection refused
Verify the VPS is running and your IP is not blocked by any firewall rules.Out of memory (OOM)
If hitting OOM on a smaller VPS, upgrade to a larger instance:- Create a snapshot of your VPS in Hetzner Cloud Console
- Resize or create a new VPS with more resources
- Restore from snapshot if needed
Container fails to start
Check logs for errors:Permission denied on mounted volumes
Ensure the host directories have the correct ownership:Firewall blocking connections
If using Hetzner’s firewall, ensure the required ports are open:Hetzner-specific tips
Enable automatic backups
Enable automatic backups in the Hetzner Cloud Console for disaster recovery. Cost is approximately 20% of VPS price.Use a floating IP
For production deployments, assign a floating IP to your VPS. This allows you to migrate to a new server without changing your IP address.Set up monitoring
Hetzner provides basic monitoring in the Cloud Console. For more detailed metrics, consider installing a monitoring agent:Next steps
Messaging Channels
Set up WhatsApp, Telegram, and other messaging integrations.
Skills
Configure and extend agent capabilities with custom skills.
CLI Reference
Learn the full CLI command set for managing your iCommerce instance.
Security
Review security best practices for production deployments.