Deploy an API.
An API on HostingGuru is a long-running HTTP service: a process that listens on a port, gets traffic routed to it, and survives across requests. This is the right service type for any backend that handles HTTP requests — REST, GraphQL, gRPC-Web, tRPC, anything that doesn't need to fall back to serverless functions.
From GitHub to a live URL in four steps
1. Connect GitHub
Install the HostingGuru GitHub App on the organization or personal account that owns the repository. The App grants read access to repositories you pick — no broad repo token, no SSH keys to manage. Webhooks for pushes are registered automatically.
2. Create the service
From the dashboard, click New service → API. Pick the repo, the branch (defaults to main), and the root directory if your API lives in a monorepo subfolder. We auto-detect the framework — Express, Fastify, NestJS, FastAPI, Django, Flask, Gin, Echo, Rails, Spring Boot, Laravel — and pre-fill the build and start commands. Override anything you don't like.
3. Add environment variables
Paste your .env file or add variables one by one. Each variable is encrypted at rest with AES-256-GCM and injected into your process at runtime — never written to disk on the runner. Mark a variable as secret to redact it from logs and the dashboard preview.
4. Deploy
Click Deploy. We clone the repo, run the build command, start your process, run a TCP health check on the configured port (default $PORT), and only route traffic once it's responding. You get a public URL like your-service.app.hostingguru.io, HTTPS, and HTTP/2 immediately.
An API service is more than a process
Auto-deploy on every push
Every push to the configured branch triggers a build and deploy. Auto-deploy is included on Hobby, Pro, and Custom plans.
Free SSL + custom domain
Attach api.yourcompany.com by adding a DNS record. We verify ownership, request a Let's Encrypt certificate, and rotate it automatically. Custom domains are included on Hobby, Pro, and Custom. Starter only serves on the wildcard subdomain.
Zero-downtime restarts
New deploys start the new process, wait for it to pass the health check, then drain connections from the old one before stopping it. Long-running requests, websockets, and SSE streams are flushed cleanly — no 502s during deploy.
Logs & metrics
Every line your process writes to stdout/stderr is captured and streamed to the dashboard in real time. Filter by level, search by substring, follow live.
Instant rollback
Every successful deploy is kept as a build artifact. One click rolls you back to any prior version — same image, same env vars at the time, no rebuild. Rollbacks complete in seconds.
Connect to managed Postgres & Redis
The Databases and Redis tabs in the dashboard give you connection strings — paste them into your service's environment variables (typically DATABASE_URL and REDIS_URL). Both use SSL/TLS by default, and they're independent from your services so you can share them across an API, a worker, and a script.
What we look for in your repo
If we find one of these, we configure the build and start commands for you. Override anything from the dashboard.
Node.js
package.json with express, fastify, @nestjs/core, koa, hapi, hono, or a start script. Build runs npm install (or pnpm install, yarn install, bun install if a matching lockfile is present), then npm run build if a build script exists. Start runs npm start or the framework's default.
Python
requirements.txt, pyproject.toml, or Pipfile. Detects FastAPI, Django, Flask, Starlette. Build installs dependencies into a fresh virtualenv. Start runs the appropriate ASGI/WSGI server: uvicorn for FastAPI, gunicorn for Django/Flask, daphne for ASGI Django.
Go
go.mod at the root or in the configured root directory. Build runs go build -o app ./.... Start runs ./app. The Go version is read from go.mod.
Ruby
Gemfile with rails or rack. Build runs bundle install, rails assets:precompile, and rails db:migrate if a database is attached. Start runs bundle exec puma -C config/puma.rb.
Rust
Cargo.toml. Build runs cargo build --release. Start runs the resulting binary from target/release/. Rust toolchain version is read from rust-toolchain.toml if present.
Java
pom.xml (Maven) or build.gradle (Gradle). Build runs mvn package or ./gradlew build. Start runs the resulting jar.
PHP
composer.json with laravel/framework or symfony/framework-bundle. Build runs composer install --no-dev and the framework's prepare scripts. Start runs PHP-FPM behind nginx, configured automatically.
Docker
If a Dockerfile exists at the configured root, we use it instead of the language buildpack. The image is built and run with the configured port exposed. Use this when your build is unusual or you have system dependencies the buildpacks don't cover.
Resources per API service
Starter — Free
1 service across all types. Shared infrastructure: 0.5 vCPU / 512 MB RAM. Wildcard subdomain only — no custom domain. 1 member. Never sleeps.
Hobby — $19/month
Up to 3 services on shared infrastructure (0.5 vCPU / 512 MB RAM per service). Custom domains, auto-deploy, instant rollback. 3 members.
Pro — $35/month · Most Popular
Up to 10 services on dedicated infrastructure (1 vCPU / 1 GB RAM per service). Workers and on-demand scripts unlocked. Dockerfile builds. Custom domains, auto-deploy, instant rollback. 5 members.
Custom — Contact us
Unlimited services, custom server specs, custom vCPU/RAM, unlimited workers and scripts, priority support, SLA guarantee. Contact sales.
Common questions
How does HostingGuru know which port my API listens on?
We inject a PORT environment variable. Bind to that — most frameworks already do process.env.PORT || 3000 by default. If your code is hard-coded to a specific port, set it as an environment variable in the dashboard or change the code to read PORT.
Can I run a websocket server?
Yes. Long-lived connections are first-class — your API is a real Node/Python/Go process, not a Lambda. Socket.IO, native ws, SSE, and gRPC-Web all work. Connections are drained gracefully on deploy.
How do I run database migrations on deploy?
Two options. Option 1 — add a release command (npx prisma migrate deploy, rails db:migrate, alembic upgrade head) that runs after build and before start. Option 2 — use an on-demand script triggered manually or on a cron, which keeps deploy time fast and lets you run migrations independently. See on-demand scripts.
What happens if my process crashes?
The container restarts automatically with exponential backoff. After 5 consecutive crashes inside 5 minutes, the service is marked failed and we stop restarting until you push a fix or rollback. The crash logs are kept in the dashboard.
Can I attach a Postgres database?
Yes — managed Postgres is a top-level Databases tab in the dashboard. Pick a plan, create a database, copy the connection string, paste it into your API's env vars as DATABASE_URL. See databases.
Does the free tier sleep?
No. The Starter plan gives you one always-on service with shared resources. There is no idle timeout, no cold start. It's the same runtime as the paid plans, just with smaller limits.
Deploy your first API in under 5 minutes.
Push your repo, pick a branch, hit deploy. No credit card needed.
Key takeaways
An HTTP API on HostingGuru is a long-running web service that accepts requests on a HostingGuru-issued HTTPS endpoint or your custom domain. Frameworks like Express, FastAPI, Rails, Gin, and Axum are auto-detected.
- Zero-downtime deploys: 30-second drain window before the old version exits.
- Free SSL: Let's Encrypt cert provisioned in under 60 seconds for custom domains.
- Health checks: automatic restart and rollback on consecutive failures.
- No platform-level request cap on paid plans — apply your framework's rate-limit middleware instead.
How does HostingGuru route traffic to my API?
Incoming requests hit a regional edge load balancer (Frankfurt or Ashburn) and are routed directly to your container over the private network. No CDN sits between the client and your API, so server-sent events and long polling work without buffering.
Can I run a public API with strict latency requirements on HostingGuru?
Yes. On Pro and above, your API runs on a dedicated CX22 server (4 vCPU, 8 GB RAM) with no noisy-neighbor risk. p99 latency in our internal benchmark of a small Express API is under 25 ms in-region.