Miget runs your Laravel app on a fixed-capacity plan with no per-service billing. Its PHP buildpack detects your app from composer.json, builds it with FrankenPHP, and serves your public/ directory on port 5000 - no web-server configuration required.

Prerequisites

Miget account

Sign up at app.miget.com.

Git installed

You deploy by pushing to a Miget git remote.

A Laravel app

Any Laravel project with a composer.json at its root.

A local PHP toolchain

You need php artisan locally to generate your app key.
Every Miget app must listen on 0.0.0.0:5000. Miget sets an immutable PORT=5000 and only routes public traffic to that port. The PHP buildpack already serves your app on 5000, so a standard Laravel app needs no changes. See Ports.

Deploy your app

1

Create the application

In app.miget.com, click New → Application. Give it a name, pick the resource (plan) it should run in, and click Next.
2

Choose the buildpack

Select Auto detection (Miget Buildpacks) and choose an instance size, then click Next. Miget detects PHP from your composer.json and builds with FrankenPHP. See Buildpacks.
3

Pick git push as the deploy method

Choose git push, click Create, and copy the token shown. You’ll use it to authenticate your push.
4

Push your code

Add the Miget remote and push:
git remote add miget https://git.<region>.miget.io/<your-miget-name>/<app-name>
git push miget
Replace <region>, <your-miget-name>, and <app-name> with the values from the dashboard. Miget builds and deploys on each push. See Git push to builder.
This guide uses git push, but it’s one of several ways to deploy. You can also connect a GitHub repository for auto-deploys and pull request previews, deploy from a public Git repository, or push a prebuilt container image - see all deployment methods.
5

Set your environment variables

Generate an app key locally, then set it (and the environment flags) as env vars on your app:
php artisan key:generate --show
VariableValue
APP_KEYThe base64:... value from the command above
APP_ENVproduction
APP_DEBUGfalse
Store APP_KEY as a secret. See Using secrets.
Never commit APP_KEY to your repository or set APP_DEBUG=true in production - it can leak configuration and stack traces.
6

Run migrations

After a successful deploy, run your migrations as a post-deploy step:
php artisan migrate --force
The --force flag is required because migrations run in a non-interactive production environment.

Connect a database

Add a MySQL or PostgreSQL addon to your app. Miget provisions it and auto-injects a DATABASE_URL env var (mysql://... or postgres://...). Laravel supports a DATABASE_URL connection string out of the box - config/database.php reads it via the url key - so you can point your connection at the injected value directly. Alternatively, map its parts to the individual Laravel variables:
Laravel variableFrom DATABASE_URL
DB_HOSThost
DB_DATABASEpath (database name)
DB_USERNAMEuser
DB_PASSWORDpassword
Once the database is connected, run php artisan migrate --force to create your tables. See MySQL and PostgreSQL.

Next steps

Add a custom domain

Point your own domain at your Laravel app.

Manage secrets

Keep APP_KEY and credentials out of your repo.

GitHub integration

Deploy automatically on every push to a branch.

Fair Scheduler

Learn how Miget shares CPU across your apps.