Site Haus Back to Site Haus

Server apps, databases and storage

Pro

Build apps with a back end (Node, Next.js, Flask, Django), run them, keep secrets, files and a database, and publish them.

Besides websites that run in the browser, Site Haus can build web apps with a server: a login page with an API, a dashboard with a database, a small SaaS. Describe it in the home box (for example A vocabulary trainer with a login page and a small API). The AI chooses a stack that fits (Node, React or Vue, Next.js, Flask, FastAPI or Django) and tells you which one it picked.

Run it#

Press Run app in the project. The app starts in its own private container and appears in the preview. Run app is for trying things out: it stops when you stop it, and after a few hours on its own.

Secrets, storage and a database#

Open the + picker on the right side of the project and choose Secrets or Storage. Everything below is available to your app as ordinary settings:

WhatHow the app uses it
SecretsNormal environment variables, for example process.env.OPENAI_API_KEY. They are stored encrypted, and never appear in your project files, ZIP downloads or duplicates.
A /data folderSet as DATA_DIR. Good for SQLite files and uploads. It is kept when you publish again, sleep or wake the app.
A databaseA private Postgres database. Your app receives DATABASE_URL. Nothing else on the internet can reach it.
File storageSet as STORAGE_URL and STORAGE_TOKEN: store and read files by key from your app.
BackupsTaken automatically every night. You can also Back up now, Restore or Download one. A restore makes a safety copy first.

Prisma apps. If you import an app that uses Prisma with a PostgreSQL schema, Site Haus sets up its tables for you when the database is on. If the app ships migrations that its own scripts do not run, they are applied before the build. If it has only a schema and no migrations (common for apps made for Vercel), the tables are created from the schema with prisma db push, which never deletes data: a change that would lose data is refused and the log says so. This only happens for the database Site Haus gives the app, never for one you host somewhere else.

You do not have to set any of this up by hand. Ask the AI: Add a database and save each lesson to it, or Store uploaded images in file storage, and it uses the right setting.

Sign-in and users#

Open the + tab picker and choose Users & Auth to let people create accounts and sign in to your app. It needs the database to be on.

Press Turn on Users & Auth. Site Haus adds a file, src/auth.js, to your project as a new version you can go back from, and connects it in src/app.js. Your app then has:

  • a ready-made /login page with sign in and create account, showing the name you chose
  • requireUser to protect a page or API route, and requireRole('admin') for admin-only ones. The signed-in person is req.user, with their id, email, name and role.
  • people stored in your own database (table auth_users), with passwords kept scrambled so nobody can read them

The Users tab lists your app's people. You can search, add someone, change their name, role or password, turn an account off (it stops working at once) or delete it. Use the switch at the top to look at your testing app or your published app. The first person to sign up becomes an admin.

The Configure tab changes the app name, closes sign-ups so only people you add can come in, adds the sign-in code again if you removed it, and makes a new session secret (that signs everyone out). After a change, start the app again or publish so it picks up the new settings.

More you can turn on

  • Google and GitHub sign-in. In Configure, paste a client ID and secret from your own Google or GitHub app and a button appears on the sign-in page. The page shows the redirect address to give them. A published app needs its internet switch on to reach them. People who sign in this way get an account with their verified email.
  • Password reset. When email is switched on for the app (Domains tab), the sign-in page shows Forgot your password? and sends a link that works for one hour. Choosing a new password signs out everywhere.
  • Limit sign-ups to certain email domains, like your company's. People you add yourself are never blocked.
  • Sign out everywhere for one person, from the Users tab. Their sessions stop working at once and they can sign in again.
  • Export CSV of your users from the Users tab.
  • Activity tab: sign-ins, wrong passwords, new accounts and password resets for the last 90 days, searchable by email.

The AI builder knows about it: ask it to "only let signed-in people see the dashboard" and it uses requireUser instead of building accounts from scratch.

Publish it#

Publish puts the app online at its Site Haus address, and on your own domain once you have proved you own it (the Domains tab shows the steps). Publishing again replaces your code but keeps the files the app wrote.

  • Sleep. A published app with no visitors goes to sleep after a while (Free 15 minutes, Pro 60 minutes, Power 4 hours). The first visitor sees a short Waking up page and the app is back in a few seconds. A sleeping app costs nothing. To keep an app awake all the time, see Always-on apps below.
  • It keeps itself up. Site Haus checks every published app about once a minute. If an app stops, its container disappears, or it stops answering, it is restarted for you (and rebuilt from your published files if it was lost). Visitors see the Starting up page meanwhile, and your data and database are not touched. If an app keeps failing, with three restarts in half an hour, Site Haus leaves it stopped and emails you. Open the project, read the app log under Publish to see why, fix it and publish again. It also tries once more after about 15 minutes, in case the cause was a short-lived one such as the server being short of memory.
  • Internet. Each published app has a switch in the Domains tab for whether it may reach out to the internet. It is off by default for safety, and installs of your packages still work.
  • Cost. A running published app uses your plan's hosting allowance and, beyond it, is billed by the hour. See Plans and credits.

Always-on apps#

An always-on app never goes to sleep, so the first visitor never waits. Open the app's Publish settings and turn on Keep this app awake all the time. Free and Pro include none, and Power includes 2. If you have used them all, the switch tells you and offers to add more. Extra always-on apps are an add-on at $9 a month each (see below). An always-on app is covered by that flat price, so it is not billed by the hour.

Add-ons#

On Pro and Power, open Settings → Billing → Add-ons to buy more of what you need, in any quantity:

Add-onPriceWhat you get
Always-on app$9 a month eachOne more published server app that never sleeps
Extra storage$3 a month per 10 GB10 GB more disk for versions, files, databases and backups

Changes are charged pro rata for the rest of the billing period, and you can change the number or take them off at any time. Add-ons belong to your paid plan: if you cancel the plan, its add-ons stop with it. Moving data out of your apps is not billed.

The terminal#

The + tab above the preview has a Shell: a real terminal in your project's workspace. Use it to run commands, install packages or look at logs. Closing it, or pressing Save to project, saves what changed as a new version (text files up to 1 MB).

What your plan includes#

FreeProPower
Server apps published0310
Databases0310
Disk (versions, apps, data, backups)200 MB2 GB10 GB
Backups kept1714

If you go over the disk allowance, nothing new is saved or published until there is room, and published apps pause. Reading and deleting always work.