Running on Forge
Deploy Umami on a Laravel Forge server with a PostgreSQL database, a pnpm deployment script, an Nginx proxy, and a daemon to keep it running.
Forge is a paid server management service, tailored to hosting Laravel apps on Server Providers like DigitalOcean, Linode, Vultr, Amazon, Hetzner and more.
If you have a Forge account and a connected server, you can easily set up an Umami installation. Umami requires a PostgreSQL database, so make sure your server runs PostgreSQL and has pnpm installed (npm install -g pnpm).
Prerequisites#
- Configure the (sub) domain you would like to have Umami available on. Usually, you do this by configuring your DNS config with an A-Record that points to your server's IP address.
Setup#
-
Select your desired Server in Forge.
-
Go to Sites > New Site
- Enter the domain name
- Project Type: Static HTML
- Check Create Database, enter a Database Name
- Click Add
-
To install the Repository, fork the https://github.com/umami-software/umami project to your GitHub account or install from the official repository.
- Enter the Repository path:
umami-software/umami - Uncheck Install Composer Dependencies
- Click Install Repository
- Enter the Repository path:
-
Update the deployment script and add the following after the
git pull origin $FORGE_SITE_BRANCHcommand.Remove these lines, since we don't have artisan or use PHP:
-
In Forge, go to your Server page, click Database and add a user to the just created database.
-
Create the database connection string and add it to your
.envfile: -
Perform the initial project setup, via SSH:
The first build creates the required database tables and a default login account with username admin and password umami. Change the password after your first login.
-
Go to your Umami site, click on SSL in the left menu, and add an SSL certificate.
-
Click Edit files > Edit Nginx Configuration and overwrite the following block:
This configuration will route the traffic to the Node.js server that Umami runs on.
-
In Forge, go to your Server page, click Daemons and add New Daemon to keep the Umami Node.js server up and running.
- Command:
pnpm start - Directory:
/home/forge/umami.yourdomain.tld - Click Create
- Command:
You should now be able to reach your Umami project.