---
title: "Deploy Laravel"
description: "An example Laravel application"
category: "Starters"
url: https://railway.com/deploy/fWEWWf
---

# Deploy Laravel

An example Laravel application

**[Deploy Laravel on Railway](https://railway.com/template/fWEWWf)**

- **Creator:** opqr's Projects
- **Category:** Starters
- **Total deploys:** 5,183

## Template content

### laravel

- **Source:** https://github.com/railwayapp-templates/laravel
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:latest

## Documentation

## Overview

Laravel is the PHP Frameworkfor Web Artisans. Laravel is a web application framework with expressive, elegant syntax. We’ve already laid the foundation — freeing you to create without sweating the small things.

## Highlights

- **Dockerfile**: The `Dockerfile` and associated files in `docker/` are based on [Laravel Sail PHP 8.0](https://github.com/laravel/sail/tree/1.x/runtimes/8.0)
- **Plugin Config**: To connect to a Railway Plugin, Postgres for example, you will need to utilize the environment variables listed for that plugin in the [Railway Docs](https://docs.railway.app/). See the `.env.example` for an example of using these with Postgres.
- **Web server port**: Railway dynamically assigns a port for your webserver. We grab the `$PORT` environment variable in `docker/start-container` to set this on Artisan `serve`
- **Logging**: Because the disk on Railway containers is ephemeral, we pipe the logs normally output to `storage/logs/laravel.log` to `stdout` [as seen here](https://github.com/sorrell/railavel/commit/2802b8c5032a13a601a903276ee2181678009f67)
- **APP_KEY**: This starter will automatically generate the `APP_KEY` (`php artisan key:generate` in the `docker/start-container`)
- **Migrations**: This starter automatically runs migrations on deploy (in the `docker/start-container`)

## Learn More

- [Laravel](https://laravel.com/)

## Similar templates

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Appsmith](https://railway.com/deploy/appsmith-1) — Low-code platform for internal tools, dashboards, and admin panels.

Open this page in a browser: https://railway.com/deploy/fWEWWf
