Self-Host InsForge on Hetzner Cloud
This guide walks through self-hosting the InsForge platform on a Hetzner Cloud server using Docker Compose.This deploys InsForge itself, not the app you built. If you just want to take your app live, use Sites instead. This guide is for running the InsForge backend on your own infrastructure.
This cloud walkthrough is community-maintained and can lag the latest InsForge release. The canonical, always-current setup is the
deploy/docker-compose/ directory in the InsForge repo.π Prerequisites
- A Hetzner Cloud account and project
- An SSH key added to your Hetzner account before you create the server (Hetzner docs)
- Basic familiarity with SSH and the command line
- A domain name (optional, but recommended for HTTPS in production)
π Deployment Steps
1. Create a Hetzner Cloud Server
- Open the Hetzner Console, select your project, and go to Servers β Add Server.
- Configure the server:
-
Optional add-ons:
- Backups β daily automatic disk snapshots with seven rotating slots (Hetzner docs)
- Firewall β you can attach one now or create it in the next step
- Click Create & Buy now.
π‘ Plan note: Hetzner also offers ARM-based CAX servers. InsForge publishes multi-arch images, but this guide assumes CX (x86) unless you have verified every container image pulls on your plan.
π‘ Pricing note: Server prices depend on location and plan. A Primary IPv4 address is billed separately (β¬0.50/month excluding VAT). See Hetzner Cloud pricing for current rates.
2. Configure a Hetzner Cloud Firewall
Hetzner Cloud Firewalls are free and filter traffic before it reaches your server (overview).- In the console, go to Firewalls β Create Firewall.
- Add inbound rules:
- Attach the firewall to your server under Apply to.
- Click Create Firewall.
β οΈ Do not open ports 5432, 5430, or 7133. In the self-host compose file, PostgreSQL, PostgREST, and Deno bind to 127.0.0.1 on the host and are not meant to be reached from the internet. For production, put Nginx or Caddy in front of InsForge on port 443 and stop exposing 7130 publicly β see Configure Domain below and the deployment security guide.
3. Connect to Your Server
Hetzner servers useroot as the default SSH user (connecting docs):
4. Install Dependencies
4.1 Update System Packages
4.2 Install Docker
Follow Dockerβs official Ubuntu install guide:docker-compose-plugin).
Verify:
4.3 Install Git
Git is required for the update path after the initial install:π‘ Shortcut: Hetzner offers a Docker CE app that preinstalls Docker and the Compose plugin on Ubuntu 24.04. You can select it instead of a plain Ubuntu image if you prefer; the rest of this guide is the same.
5. Deploy InsForge
5.1 Fetch the Self-Host Files
JWT_SECRET, ENCRYPTION_KEY, ROOT_ADMIN_PASSWORD, POSTGRES_PASSWORD, and the API keys into ~/insforge/.env (mode 600). Nothing is started yet.
Rather not pipe a script into a shell? Read it first:
5.2 Configure Environment
.env.example for every supported variable.
π‘ Back up .env somewhere safe. You need those secrets to migrate or restore this instance.
5.3 Start Services
Ctrl+C to exit the log view.
5.4 Verify Services
postgres, postgrest, insforge, and deno. Postgres and Deno report healthy when their health checks pass; PostgREST has no health check in this compose file and shows running.
6. Access Your InsForge Instance
6.1 Test the API
"status": "ok" and "service": "Insforge OSS Backend".
6.2 Open the Dashboard
In your browser:ROOT_ADMIN_USERNAME and ROOT_ADMIN_PASSWORD from .env.
7. Configure Domain (Optional but Recommended)
7.1 DNS
Point a DNS A record at your serverβs IPv4 address:7.2 Reverse Proxy and TLS
Install Nginx:.env with your HTTPS URL:
π§ Management & Maintenance
View Logs
Stop or Restart
Update InsForge
The stack reads Postgres configuration and Deno function sources from this checkout, so updates are more than an image pull:Backup Database
pg_dump backups.
Monitor Resources
π Troubleshooting
Services Will Not Start
Cannot Reach the Dashboard
- Confirm the Hetzner Firewall allows the port you are using (7130 or 443).
- Check
API_BASE_URLandVITE_API_BASE_URLmatch how you open the site in your browser. - Run
curl http://localhost:7130/api/healthon the server. If that works but the public URL does not, the issue is firewall or DNS β not InsForge.
Out of Memory
Resize to a larger plan in the Hetzner Console (Rescale), for example from CX23 to CX33.π Security Best Practices
- Restrict SSH (port 22) to your IP in the Hetzner Firewall.
- Use HTTPS in production and stop exposing port 7130 publicly once a reverse proxy is in place.
- Keep
.envat mode600and back it up securely. - Run
apt upgraderegularly and pull new InsForge images when you update. - See the deployment security guide for UFW, SSH hardening, and automated backups.
π Support & Resources
- InsForge docs: https://docs.insforge.dev
- Hetzner docs: https://docs.hetzner.com/cloud/
- GitHub Issues: https://github.com/InsForge/InsForge/issues
- Discord: https://discord.com/invite/MPxwj5xVvW
π Cost Notes
Hetzner bills each server hourly with a monthly price cap. Prices vary by plan and location. In addition to the server:- Primary IPv4 β β¬0.50/month excluding VAT per address
- Backups β optional add-on at checkout
- Outgoing traffic β EU Cost-Optimized plans include 20 TB/month; only outbound traffic counts toward the quota
Congratulations! Your InsForge instance is running on Hetzner Cloud. For hardening, backups, and rollback procedures, see the deployment security guide.