StackMivo
StackMivo
Deployment

Laravel Forge

Deploy your StackMivo projects to your own servers with Laravel Forge. Connect your Forge token, pick a provisioned server, and ship to production on infrastructure you control.

StackMivo integrates with Laravel Forge so you can deploy any project onto your own servers, whether they run on DigitalOcean, Hetzner, Vultr, AWS, or any other provider you have connected to Forge. Connect your Forge API token once, point a project at one of your provisioned servers, and StackMivo creates the site, provisions the database and environment, and runs the deployment for you.

Laravel Forge is a bring-your-own-server target: you own and pay for the underlying infrastructure through your Forge account. If you would rather deploy to fully managed infrastructure, see Laravel Cloud instead.

Before you start

To deploy a project to Laravel Forge, you need:

  • A Laravel Forge account with at least one organization
  • A provisioned, ready server in Forge (any provider, region, and size)
  • Your GitHub account connected in StackMivo, which authorizes the server to clone your repository
  • The project pushed to a GitHub repository, because Forge installs the site from that repository

If your project is not on GitHub yet, use the GitHub action in the IDE toolbar first. See GitHub Integration.

Connecting your Laravel Forge account

Before you can deploy, connect a Laravel Forge API token.

Step 1: Create an API token in Forge

  1. Go to forge.laravel.com and sign in
  2. Open Profile → API
  3. Click Create Token and give it a name
  4. Copy the token immediately, because it will not be shown again

Step 2: Add your token to StackMivo

  1. In StackMivo, click Deployments in the sidebar and choose Laravel Forge from the Deployment Targets list
  2. Paste your token in the Forge API Token field
  3. Click Connect Token

Once connected, you will see your Forge organization name and a Connected badge. Your token is encrypted at rest and is only ever used for your own deployments.

Preparing a server

Forge deploys to servers you have already provisioned. If you do not have one yet:

  1. On the Laravel Forge page in StackMivo, click Create a server in Forge, or go to forge.laravel.com/servers/create
  2. Choose your cloud provider, region, and server size, then let Forge provision it
  3. Once the server is ready, it appears automatically in the server picker when you deploy

Only servers that Forge reports as ready are shown in the deploy picker. A server that is still provisioning will not appear until it finishes.

Deploying a project

  1. Open your project in the IDE and go to the Deploy tab
  2. Choose Laravel Forge as the provider
  3. In the deploy dialog, configure the following:
    • Server: pick one of your ready Forge servers
    • Branch (optional): defaults to the project's branch, or main
    • Custom domain (optional): leave blank to get an instant IP-based URL that needs no DNS setup
  4. Click Deploy to Forge

The first deployment runs in two phases:

  1. Site setup: Forge creates a Laravel site on your server and installs the repository. This can take a couple of minutes, so you can leave the dialog open or click Run in background.
  2. Deploy: once the site is ready, StackMivo provisions a database and environment file, installs the deploy script, and runs the deployment. When it finishes, your app URL is shown.

What StackMivo sets up automatically

On the first deploy, StackMivo provisions the site so your app boots without manual configuration:

  • A MySQL database and user dedicated to the project
  • An environment file with APP_KEY, APP_URL, production settings, and the database credentials
  • A deploy script that pulls the latest code, installs Composer and npm dependencies, builds front-end assets, runs migrations, caches config and routes, and reloads PHP-FPM

Managing deployed applications

Open Deployments → Laravel Forge in the sidebar to see every project you have deployed to Forge. Each project shows its repository, server, and live URL, along with these actions:

ActionDescription
RedeployPull the latest code and run a new deployment
HistoryExpand to see past deployments with commit, status, and timestamp
LogsView the full build output for any deployment in the history
DomainAdd or remove a custom domain
DeleteRemove the site from your Forge server while keeping your StackMivo project

Redeploying

After making changes to your project, click Redeploy to push the latest code and trigger a new build. The button shows a spinner while the deployment runs, and the status updates live.

Deployment history and logs

Click History on a deployed project to expand its deployment list. Each entry shows the status (Deployed, Deploying, Queued, Failed, Build failed, or Cancelled), the commit hash, and when it ran. Click Logs on any entry to open the raw build output.

Custom domains

You can serve a deployed project from your own domain with a free SSL certificate.

Adding a domain

  1. Click Domain on the deployed project
  2. Enter your domain, for example app.example.com
  3. Click Save domain

StackMivo adds the domain to the Forge site and requests a free Let's Encrypt certificate. The certificate provisions asynchronously.

Pointing DNS

For the domain to serve your app, add a DNS record at your provider:

  • Type: A
  • Name: your subdomain, for example app
  • Value: your Forge server's IP address

Unlike Laravel Cloud, which uses a CNAME, a Forge site is served from your server's IP address, so you point an A record at the server.

Removing a domain

Open the Domain dialog and click Remove domain. The site remains reachable at its default IP-based URL.

Replacing your token

If your Forge token expires or you want to rotate it:

  1. Go to Deployments → Laravel Forge
  2. Click Replace Token
  3. Paste the new token and click Connect Token

Disconnecting Laravel Forge

  1. Go to Deployments → Laravel Forge
  2. Click Disconnect and confirm

Your stored token is removed. Sites you have already deployed stay running on your Forge servers, so you only need to reconnect to manage them from StackMivo again.

On this page