First run
After cloning the repository and filling in .env, run the one-shot setup script to install dependencies, generate the application key, migrate the database, and build the frontend. Then create the first super-admin user to log in.
Running setup
Section titled “Running setup”The composer run setup script performs every step needed to go from a fresh clone to a ready-to-run application. Run it once on initial deployment (or on a new bare-metal host without Docker):
composer run setupThis executes the following steps in order:
composer install— install PHP dependencies- Copy
.env.exampleto.env(skipped if.envalready exists) php artisan key:generate— generate the 32-byteAPP_KEYphp artisan migrate --force— run all database migrationsnpm install --ignore-scripts— install Node dependenciesnpm run build— compile frontend assets (tsc && vite build)
Creating the first admin user
Section titled “Creating the first admin user”Marketix has a dedicated Artisan command for creating super-admin users. There is no seeded default admin account — you must create one explicitly.
Command signature
Section titled “Command signature”php artisan marketix:create-admin {--name= : The admin display name} {--email= : The admin email address} {--password= : The admin password (prompted securely if omitted)} {--force : Skip the confirmation when promoting an existing user}Interactive usage (recommended)
Section titled “Interactive usage (recommended)”Run the command without options and it will prompt you for each value:
php artisan marketix:create-adminYou will be asked for:
- Name — the admin’s display name
- Email — the admin’s email address
- Password — entered securely (input is hidden); confirmed by a second prompt
Non-interactive usage
Section titled “Non-interactive usage”Pass all values as options for scripted or CI deployments:
php artisan marketix:create-admin \ --name="Admin" \ --email="admin@example.com" \ --password="your-strong-password"Promoting an existing user
Section titled “Promoting an existing user”If a user with the given email already exists, the command offers to promote them to super-admin without changing their password:
php artisan marketix:create-admin --email="existing@example.com"# → User existing@example.com already exists. Promote to super admin? [Yes]Use --force to skip the confirmation prompt in automated scripts.
Running inside Docker
Section titled “Running inside Docker”If you deployed with Docker Compose, run the command against the running app container:
docker compose exec app php artisan marketix:create-adminFirst login
Section titled “First login”- Open your browser at
https://<APP_DOMAIN>. - Log in with the credentials you set above.
- If your account is the only one, you land directly on the admin dashboard. If there are multiple projects, you are taken to the project chooser at
/projects, where you can select which project to enter.
The super-admin account has access to the /admin area (Users, Projects, Mailer, Branding, Storage, Activity) in addition to all project dashboards.
Demo data (optional)
Section titled “Demo data (optional)”For evaluation or staging environments, the marketix:demo:setup command seeds the database with sample users, projects, domains, and short links:
php artisan marketix:demo:setupThe command creates three users (admin / john.doe / max.mustermann, all with password password) and two sample projects with domains and short links. Use --force to skip the interactive confirmation.
Setting up GeoIP (recommended)
Section titled “Setting up GeoIP (recommended)”Click statistics include geographic data (city, country, coordinates) resolved from the visitor’s IP address using the MaxMind GeoLite2-City database. Without this database, redirects still work but the geo columns in Statistics will be empty.
Prerequisites
Section titled “Prerequisites”You need a free MaxMind account and a license key. Sign up at maxmind.com and generate a license key in your account settings. Add it to .env:
MAXMIND_LICENSE_KEY=your_license_key_hereDownloading the database
Section titled “Downloading the database”Run the update command:
php artisan marketix:geoip:updateInside Docker:
docker compose exec app php artisan marketix:geoip:updateThe command downloads the GeoLite2-City tarball (~60 MB), extracts it, and saves the .mmdb file to storage/app/geoip/GeoLite2-City.mmdb. This location is read by the application’s GeoIP resolver at redirect time.
Verify the installation
Section titled “Verify the installation”After first login and GeoIP setup, confirm everything is working:
- Log in as the super-admin and navigate to
/admin/users— your user should appear. - Create a Project from
/admin/projects/createand add yourself as a member. - Navigate to the project dashboard and create a test short link.
- Follow the short link from a browser tab and confirm you are redirected.
- Return to the project’s Statistics page and confirm a click was recorded.
- Check that Horizon is running:
docker compose logs horizonYou should see Horizon worker startup output and no error messages.