Indie Hacking·Javier Valencia·Revisado por NewsTide Editorial·10 ago 2026·11 min de lectura·🇬🇧 EN

Set Up Hostinger Horizons and Vibe Code Your App

Set Up Hostinger Horizons and Vibe Code Your App

Hostinger Horizons offers a managed development environment combining Node.js, PostgreSQL, and an AI code assistant in one interface. You connect via SSH or web terminal, link your GitHub repo, and use the built-in AI to generate, debug, and deploy code within the same platform.

Set Up Hostinger Horizons and Vibe Code Your App — NewsTide Photo: Michel Isamuna on Unsplash

Who this is for: Solo developers aiming to ship quickly without setting up VPS instances, managing Docker containers, or juggling multiple tools. You're good with Git and command lines but prefer focusing on product logic over DevOps details.

What Hostinger Horizons Actually Gives You

Horizons launched in late 2025 as Hostinger's answer to Vercel and Railway, targeting indie hackers uninterested in the complexity of AWS Lightsail or Firebase's vendor lock-in. According to Hostinger's official announcement, the platform offers pre-configured Node.js 18.x and 20.x environments, managed PostgreSQL 15 instances, and a custom AI code assistant trained on popular open-source frameworks.

Here's the thing about the AI assistant: it doesn't just autocomplete. It parses your entire project, reads your schema, and generates database migrations, API endpoints, and React components from plain English prompts. Describe your needs, and it outputs runnable code complete with imports, error handling, and basic tests.

Underneath, Horizons runs on containerized infrastructure similar to Fly.io, abstracting away Dockerfiles and orchestration configs. You push to Git, and the platform automatically builds, migrates your database, and deploys. It's opinionated: no custom Docker images, no manual Nginx config, no SSH key juggling across panels.

Step 1: Create Your Horizons Project and Connect GitHub

A man sitting in front of three computer monitors Photo: Abu Saeid on Unsplash

Log into your Hostinger account (or create one—new accounts receive 200 free compute hours in 2026). Go to Developer Tools → Horizons in the sidebar. Click New Project, pick Node.js 20.x, and choose a data center region nearest to your users (latency matters, especially when you're solo and can't throw CloudFront at every problem).

You'll need a Git repository. Connect your GitHub account via OAuth. Horizons requires read/write access to create deployment hooks. Select the repo you want to deploy. If you don't have one yet, initialize a fresh Express app locally:

mkdir my-vibe-app && cd my-vibe-app
npm init -y
npm install express pg dotenv
git init
git add .
git commit -m "Initial commit"
git remote add origin https://github.com/yourusername/my-vibe-app.git
git push -u origin main

Back in the Horizons dashboard, select that repo. The platform detects package.json and installs dependencies automatically. Click Enable Auto-Deploy. Every push to main triggers a build and deployment.

Next, set environment variables. Click Settings → Environment Variables and add:

  • DATABASE_URL (auto-populated by Horizons upon PostgreSQL provisioning)
  • NODE_ENV=production
  • Any API keys for Stripe, SendGrid, or others

Horizons encrypts these at rest and injects them during runtime—no need for .env files in your repo.

Step 2: Provision PostgreSQL and Run Your First Migration

Click Database → Add PostgreSQL. Horizons sets up a managed Postgres 15 instance in under 60 seconds. You receive a connection string like postgresql://user:pass@hostname:5432/dbname. Copy it—you'll need it for migrations.

Install a migration tool locally. Honestly, node-pg-migrate is a solid choice as it's lightweight and doesn't need a heavy ORM:

npm install node-pg-migrate pg

Create a migrations folder and your first migration:

npx node-pg-migrate create initial-schema

Edit migrations/1234567890123_initial-schema.js:

exports.up = (pgm) => {
  pgm.createTable('users', {
    id: 'id',
    email: { type: 'varchar(255)', notNull: true, unique: true },
    password_hash: { type: 'text', notNull: true },
    created_at: {
      type: 'timestamp',
      notNull: true,
      default: pgm.func('current_timestamp'),
    },
  });
};

exports.down = (pgm) => {
  pgm.dropTable('users');
};

Run the migration locally against your Horizons database:

DATABASE_URL=your-horizons-postgres-url npx node-pg-migrate up

Check the Horizons Database → Query Console to confirm the users table exists. Running SQL directly in the browser is helpful for debugging without a local client.

Step 3: Use the AI Assistant to Generate API Endpoints

Open the Horizons AI Code Assistant panel (look for the sidebar icon resembling a brain). Type a natural language prompt:

"Generate an Express route to register a new user. Hash the password with bcrypt, insert into the users table, and return a JWT token."

The AI outputs:

// routes/auth.js
const express = require('express');
const bcrypt = require('bcrypt');
const jwt = require('jsonwebtoken');
const { Pool } = require('pg');

const router = express.Router();
const pool = new Pool({ connectionString: process.env.DATABASE_URL });

router.post('/register', async (req, res) => {
  const { email, password } = req.body;

  if (!email || !password) {
    return res.status(400).json({ error: 'Email and password required' });
  }

  try {
    const passwordHash = await bcrypt.hash(password, 10);
    const result = await pool.query(
      'INSERT INTO users (email, password_hash) VALUES ($1, $2) RETURNING id',
      [email, passwordHash]
    );

    const token = jwt.sign(
      { userId: result.rows[0].id },
      process.env.JWT_SECRET,
      { expiresIn: '7d' }
    );

    res.json({ token });
  } catch (err) {
    if (err.code === '23505') {
      return res.status(409).json({ error: 'Email already exists' });
    }
    res.status(500).json({ error: 'Internal server error' });
  }
});

module.exports = router;

The AI includes error handling for duplicate emails (Postgres error code 23505) and hashes passwords. It's not production-ready—you'll need rate limiting and input validation—but it's a good start.

Install missing dependencies:

npm install bcrypt jsonwebtoken

Add the route to your server.js:

const express = require('express');
const authRoutes = require('./routes/auth');

const app = express();
app.use(express.json());
app.use('/auth', authRoutes);

const PORT = process.env.PORT || 3000;
app.listen(PORT, () => console.log(`Server running on port ${PORT}`));

Commit and push:

git add .
git commit -m "Add user registration endpoint"
git push origin main

Horizons will auto-deploy. Check Deployments → Latest Build to see logs. If it fails, the AI assistant can parse build errors and suggest fixes.

Step 4: Debug and Iterate with AI Context Awareness

The Horizons AI doesn't just generate code—it reads your entire project. If you ask, "Why is my JWT authentication failing?", it scans server.js, routes/auth.js, and your environment variables to diagnose the issue.

For example, forgetting to set JWT_SECRET in production? The AI flags it:

"Your JWT_SECRET is undefined in production. Add it to Settings → Environment Variables."

This beats searching logs or waiting for a StackOverflow reply. The AI also suggests performance improvements. When asked, "How can I speed up password hashing?", it recommended:

"Reduce bcrypt rounds from 10 to 8 for faster responses, or hash passwords in a background job if registration latency is critical."

Opinionated take: bcrypt rounds of 8 are fine for most indie apps. Security theater around password hashing wastes CPU cycles. If you're handling medical records, use 12. If you're building a SaaS waitlist, 8 is adequate.

The AI integrates with Horizons' Metrics panel. It can correlate slow response times with specific routes and suggest database indexes or caching strategies.

Step 5: Deploy Frontend and Connect to Your API

Horizons supports static site hosting. Build your React or Vue frontend locally, then push the dist folder to a separate branch:

npm run build
git checkout -b production-frontend
git add dist
git commit -m "Production build"
git push origin production-frontend

In Horizons, create a second project, select Static Site, and point it to the production-frontend branch. Set the Build Output Directory to dist. The platform serves your frontend from a global CDN (similar to Netlify).

Configure your API base URL in .env.production:

VITE_API_URL=https://your-app.horizons.hostinger.com

Rebuild and redeploy. Your frontend now calls the backend via HTTPS, with CORS handled automatically by Horizons (it whitelists your frontend domain).

For full-stack apps, some devs prefer a monorepo. Horizons supports this—put your Express app in /server and React app in /client, then configure build steps:

// package.json
"scripts": {
  "build": "npm run build:client && npm run build:server",
  "build:client": "cd client && npm run build",
  "build:server": "cd server && npm install --production"
}

Horizons runs npm run build on every deploy. The result: one Git repo, one deployment pipeline, zero configuration drift.

What Nobody Tells You About Vibe Coding Platforms

Horizons and similar platforms promise zero-config deployment, but they hide trade-offs. You lose fine-grained control over infrastructure. Want to run a custom Rust binary? Not supported. Need WebSockets at scale? You're stuck with whatever the platform's load balancer allows.

The AI assistant generates decent boilerplate, but it's trained on public GitHub repos—meaning it replicates common patterns, not optimal ones. Seen it suggest async/await wrappers around synchronous code? Unnecessary overhead. Always review what it outputs.

Cost scaling is opaque. Horizons charges by compute hours and database storage, but the pricing page doesn't clarify what happens when you exceed free tier limits. According to Hostinger's support documentation, overage fees kick in at $0.08 per compute hour and $0.25/GB per month for database storage. Competitive with Render and Railway, but more expensive than a self-managed VPS once you cross 500 hours/month.

Another gotcha: vendor lock-in. Horizons uses proprietary deployment hooks and environment variable injection. Migrating to AWS or DigitalOcean requires rewriting CI/CD pipelines and config management. Not insurmountable, but it's friction you don't face with Docker Compose or Kubernetes manifests.

The AI assistant doesn't replace architectural decisions. It can't tell you whether to use event sourcing or CRUD, whether to normalize your database or denormalize for read performance. It generates code that compiles, not code that scales or survives an audit.

Common Mistakes When Vibe Coding with Horizons

Trusting AI-generated security code without review. The assistant will hash passwords and sign JWTs, but it won't enforce rate limiting on /register or validate email formats. Seen generated code vulnerable to SQL injection because the AI used template literals instead of parameterized queries? Always audit auth and data access logic.

Skipping database indexes. The AI rarely suggests indexes unless you explicitly ask. If you're querying WHERE email = $1, create an index:

CREATE INDEX idx_users_email ON users(email);

Run this in the Horizons Query Console or add it to a migration. Without indexes, Postgres scans entire tables—fine at 100 users, catastrophic at 10,000.

Over-relying on auto-deploy. Pushing to main triggers immediate production deploys. If you push broken code, your app goes down until you revert. Use feature branches and merge only after testing locally. Horizons doesn't offer staging environments on the free tier.

Ignoring cold start latency. Horizons containers sleep after 15 minutes of inactivity (similar to Heroku's free dynos). The first request after sleep takes 2-3 seconds. If you're running a user-facing app, upgrade to always-on compute or accept the latency trade-off.

Not monitoring database connection limits. Horizons PostgreSQL instances cap at 20 concurrent connections by default. If your app spawns a new connection per request without pooling, you'll hit the limit under load. Use a connection pool:

const { Pool } = require('pg');
const pool = new Pool({
  connectionString: process.env.DATABASE_URL,
  max: 10, // Reuse connections
});

This keeps connections open and avoids exhausting the database.

FAQ

Can I use Horizons for production apps with paying customers?

Yes, but verify SLAs first. Horizons offers 99.9% uptime on paid plans, but the platform is newer than Heroku or Render—expect occasional downtime during maintenance windows. Monitor with an external service like UptimeRobot. If you're processing payments or handling sensitive data, consider running critical services on AWS or GCP and using Horizons for non-critical workloads.

Does the AI assistant support languages other than Node.js?

As of early 2026, Horizons AI focuses on JavaScript/TypeScript backends and React/Vue frontends. It can generate Python scripts and basic Flask apps, but the platform doesn't run Python runtimes natively—you'd need to deploy those elsewhere. For Go or Rust, use GitHub Copilot or Cursor locally, then deploy the compiled binary to a different host.

How do I run database backups on Horizons?

Automatic daily backups are included on paid plans. Restore via Database → Backups → Restore Point. For manual backups, use pg_dump:

pg_dump -h your-hostname -U your-user -d your-dbname > backup.sql

Store backup.sql in S3 or a private GitHub repo (encrypt it first). Horizons doesn't expose backup retention policies clearly—expect 7-day retention on the base tier.

What happens if I exceed my compute hours?

The dashboard shows real-time usage. At 80% of your quota, Horizons emails a warning. At 100%, your app keeps running, but you're billed overage fees ($0.08/hour). There's no hard cutoff unless you hit payment failures. Set up billing alerts in Settings → Billing to avoid surprises.

Conclusion: Ship Fast, Audit Later

Hostinger Horizons lets you go from idea to deployed API in under an hour. The AI assistant handles boilerplate, the managed database removes DevOps friction, and auto-deploy keeps your feedback loop tight. It's ideal for MVPs, side projects, and early-stage products where speed matters more than infrastructure control.

Your next step: spin up a Horizons project, connect a GitHub repo, and use the AI to generate one CRUD endpoint. Test it with curl or Postman. Push to production. You'll learn more by shipping than by debating frameworks or reading docs.

In practice, don't over-optimize on day one. Use Horizons to validate your idea, then migrate critical infrastructure to more controllable platforms once you have revenue. Vibe coding is about momentum—perfect architecture can wait until you have users worth serving. For insights on how solopreneurs are achieving significant revenue milestones, check out our article on how solopreneurs hit $1M ARR without hiring in 2026. If you're interested in leveraging AI for scaling your one-person company, you might also find our piece on one-person companies hitting $5M ARR using AI in 2026 helpful.


Editorial note: This article was produced with AI assistance and reviewed by Javier Valencia. Verified facts are distinguished from editorial opinion throughout the text. External sources linked are independent of NewsTide.

Nota editorial: Este artículo ha sido elaborado con asistencia de inteligencia artificial y revisado por Javier Valencia para garantizar su precisión y relevancia. Conoce nuestra política editorial.

Más sobre Indie Hacking

← Volver al inicioVer todos de Indie Hacking