Skip to content
67hosting

How to deploy a web app with a Postgres database

Updated · 6 min read

In short

To deploy an app, create an app slot in the dashboard (address, region and a Postgres database if needed), then push your code with git push, the API or an AI agent. The app is built from a Dockerfile or automatically, must listen on the port from the PORT variable and gets a DATABASE_URL. Free apps sleep after 15 minutes without requests; always-on mode is paid from your balance.

An app is a program that runs on a server: a site backend, an API, a user dashboard, a Telegram bot. On 67hosting an app runs in a container and gets an address with SSL right away. If you need a database, Postgres is one checkbox away.

What your app needs

  • Code with or without a Dockerfile. If there's a Dockerfile at the root, it's used for the build. If not, the language and dependencies are detected automatically: Node.js, Python, Go, Ruby and other popular stacks.
  • An HTTP server on the port from the PORT variable. The platform passes the port as an environment variable — read it from there instead of hard-coding it.
  • A response to a request to /. After start-up the platform checks that the app answers over HTTP. Any response works, even a 404.
// Node.js (Express)
const port = process.env.PORT || 8080;
app.listen(port);

Step 1. Create the app in the dashboard

  1. Click “Create a site” and choose the “App” card.
  2. Set the “App address” — for example, myapp gives you myapp.host67.com.
  3. Choose the “Plan”: Free (sleeps when idle) or Always-on (runs around the clock).
  4. If you need a database, tick “Postgres database”.
  5. Pick the region under “Region”.
  6. Click “Create application”.

The dashboard creates an empty “slot” with the address and database. The code is uploaded in the next step.

Step 2. Upload your code

With git push

The most familiar way, just like Heroku. You'll need an API token: create one under “Profile and API tokens”.

git remote add host67 https://app.host67.com/git/myapp.git
git push host67 main

The username can be anything, the password is your API token (h67_…). Build progress is printed right in your terminal, ending with Deployed ✓ and the app address.

With an AI agent

If you work in Claude, Cursor or another MCP client, connect 67hosting to it and say “deploy the app myapp”. The agent packs the code and uploads it. How to connect is in the guide on publishing with an AI agent.

With the REST API

curl -X POST "https://app.host67.com/api/v1/apps?slug=myapp&db=1" \
  -H "Authorization: Bearer h67_your_token" \
  -H "Content-Type: application/zip" \
  --data-binary @app.zip

The build runs in the background for up to 10 minutes. Deploying again to the same address updates the app and keeps its plan, domain and database.

Database

If you ticked Postgres when creating the app, the container already has a DATABASE_URL variable — connect with it, nothing to configure. Each app gets its own database and user, and the password stays the same across deploys.

You can run an SQL query through the API (/api/v1/apps/{id}/db/query) or ask your AI agent, which has an app_db_query tool.

Free and always-on modes

FreeAlways-on
Memory256 MB512, 1024 or 2048 MB
RunningSleeps after 15 minutes without requestsAround the clock
Waking upOn the first request, usually within secondsNot needed
PriceFree (3 apps on Free, 10 on Pro)Fixed monthly price from your balance

A sleeping app wakes up on any HTTP request: the first response after sleep is slower, then everything runs as usual. That's enough for small projects and tests. For apps that must answer instantly or work in the background, switch on always-on mode.

To do that, open the project's “Apps” tab, choose a size and click “Enable always-on”. The fee is charged from your balance right away and then every 30 days; prices by region are on the pricing page. If the balance can't cover a renewal, the app goes back to free sleep mode.

Your own domain for the app

On the “Domain and email” tab, add the domain and choose the app in “Where the domain points”. The app has its own IP address, shown next to the domain — create an A record for it at your registrar. SSL is issued automatically. More in the guide on connecting your own domain.

Logs

The build log and the latest runtime log lines are available through the API (GET /api/v1/apps/{id}/logs) or from your AI agent via the app_logs tool. If a git push build fails, the last log lines are printed right in your terminal.

FAQ

How much does it cost to host an app?

Free apps with sleep mode cost nothing: 3 on the Free plan and 10 on Pro. Always-on mode is paid from your balance at a fixed monthly price that depends on memory size and region.

Why does my app respond with a delay?

In free mode the app sleeps after 15 minutes without requests and wakes up on the next one. The first response after sleep is slower. To avoid delays, switch on always-on mode.

How do I pass secrets and settings to the app?

Through environment variables: pass them when deploying via the API (the X-App-Env header with JSON) or ask your AI agent to set them during deploy. Deploys via git push keep the variables set earlier.

Which languages are supported?

Anything that can be built into a container. Without a Dockerfile, popular stacks — Node.js, Python, Go, Ruby and more — are built automatically. For a custom build, add your own Dockerfile to the project root.

Try it on your own site

Free, no card: a site on a *.host67.com address with SSL in a couple of minutes.

Start for free

More guides