Skip to content
Docs

Your first deploy

From a new account to your app online with SSL in a few minutes - make a project, send your code from GitHub or a ZIP file, and watch it build.

Updated 17 Oct 20263 min read

Your first deploy takes four steps: make a project, add an app, send its code, and watch it go live on its free address with SSL. This page follows Asha putting her Laravel shop, duka, online. Any other language works the same way.

Before you start

You need a Tanzahost account. Your code can be in a GitHub repository or a ZIP file; with no code yet, start from one of our starters: Laravel, Next.js or a static site. Until your first top-up, an account can have up to 2 projects and 3 apps, each with smaller limits; your first top-up raises that.

1. Make a project

On a new account, the dashboard's home asks What are you building? Choose what you're making, like Laravel, and the next steps follow from it: once the project is made, Add an app opens, with our starter chosen for Laravel, Next.js and static sites. Or:

  1. In the dashboard, choose New project.

  2. Type its Project name: Asha types duka. It appears in your free addresses.

  3. Pick its Location, the one closest to your visitors. Asha picks UK-01 · United Kingdom.

  4. Choose Create project.

Projects are free: you pay for the apps and databases you add, by the hour. A project stays in its location. See Projects and locations.

2. Add an app

  1. In the project, choose Add a service, then App.

  2. Give it an App name: up to 40 lowercase letters, numbers and dashes. Asha calls hers web.

  3. Under Where's your code?, choose GitHub, Upload a ZIP or Starter.

With GitHub, connect your account the first time and choose which repositories Tanzahost may read: it can only read them, never change them. Then pick the Repository and Branch. Every push to that branch deploys. See Connect GitHub.

With Upload a ZIP, choose the file from your computer. If the connection drops, choose the same file again: it carries on where it stopped.

With Starter, choose Laravel, Next.js or Static site: code that works now and is yours to change. It becomes the app's first version, and the Laravel starter gets its APP_KEY made for you. See Starters.

3. Set its limits and deploy

Set the app's limits: the most memory and processor time it may use. They cost nothing by themselves. You see the rates and an estimate for the month as you choose. See Limits.

For a Laravel app, you can type a Before going live command, like php artisan migrate --force, to run on every deploy before visitors see the new version.

Choose Deploy.

4. Watch it go live

The deployment's page follows each step live: Get the code, Install packages, Build, Health check, then Send visitors to the new version. The build log shows every line as it happens, like:

text
Installing PHP 8.4 with Composer 2.10.3
Running composer install
Running npm ci --include=dev
Running npm run build

When it's live, the app's page shows its free address, like duka-7h3k.tanzahost.co. Choose it to open your app, with SSL already on.

It's live

From now on, every push to your branch builds and deploys by itself, without downtime. If a new version stops within five minutes, visitors go back to the one before.

If it doesn't go live

Nothing changes for your visitors: a version that doesn't build, or doesn't answer its health check, never gets them. The build's log, or the deployment's last lines, say why. Common causes:

  • A missing variable, like APP_KEY: add it under the project's Variables tab, then Redeploy. See Variables.

  • A start command we couldn't find: set one in the app's Build and run settings. See The settings file.

  • An app that listens on the wrong port: it must listen on PORT, which is 8080.

The error pages explain the most common messages one by one.

Next steps