Cookie settings

We use cookies

Necessary cookies keep the website working and store your choice. With your consent, we can also use functional cookies to remember the theme preference and analytics cookies to measure website usage.

You can accept optional cookies all at once, reject them, or choose individual categories. You can change your consent later; details are available in the Cookies Policy.

LaraDep Documentation

You are reading Self-hosted mode

Installing a self-hosted instance

A self-hosted instance runs on your server. This page covers installation via Docker and Laravel Sail, environment configuration and data initialization.

Installing a self-hosted instance

A self-hosted instance runs on your infrastructure, data stays with you. The recommended way is Docker via Laravel Sail. The steps below assume you have access to the self-hosted repository.

Requirements

  • PHP 8.5 and higher,
  • Docker and Docker Compose,
  • Node.js 22 and higher and npm for the frontend.

1. Get the code and dependencies

Clone the repository into a project folder and install PHP dependencies via composer install. Keep a local Composer available even if you plan to work through Sail later.

2. Configure the environment

Copy .env.example to .env. The default configuration expects a MariaDB database in a container. Ports are set in .env — defaults are for example APP_PORT=8900, FORWARD_DB_PORT=3400, FORWARD_REDIS_PORT=6400 and VITE_PORT=5200. Then generate the application key via php artisan key:generate.

3. Start the containers and frontend

Build and start the environment via ./vendor/bin/sail build --no-cache and ./vendor/bin/sail up -d. Prepare the frontend assets via ./vendor/bin/sail npm install and ./vendor/bin/sail npm run build.

4. Initialize data

Run php artisan app:fresh-install. This runs fresh migrations with seeders and immediately creates the default pages, posts and other content in the instance. In production this command deploys the complete default structure.

5. First deployment

The quick start in a Docker environment is described on the Docker quick-start page. The procedure for the first deployment to a target server is on First deployment and production checklist.

Do not want to manage your own instance? Go to the managed mode, or review the comparison of both modes.

Next step: Continue to Docker quick-start and then validate with the first deployment production checklist.

Subscribe to our Newsletter

Stay updated with our latest news and articles by subscribing to our newsletter.

Esc Close