I like to use RunCloud in order to manage my servers (I also recommend Cloudron for those wanting a free solution or refer to this list for awesome alternatives).
I’ve transitioned most of my clients from Google Analytics to Umami Analytics. Historical data migration is tricky (so I still keep their Google Analytics accounts), but Umami offers the perfect balance of ownership and functionality. It’s a great open-source alternative that works really well.
Here is how to run Umami Analytics on your own RunCloud webapp.
Initial Web Application Setup
- Create New Web Application
- Go to “Web Application” in RunCloud
- Click “Create Web Application”
- Name it “Umami-Analytics” (or your preferred name)
- Select your domain/subdomain
- Choose these settings:
- Web Application Stack: “Native NGINX + Custom config”
- Stack Mode: “Production”
- PHP Version: 8.1
- Web Application Type: “Custom”
- SSL/TLS Setup
- In RunCloud dashboard, go to “SSL/TLS” section
- Click “Add SSL”
- Select your domain/subdomain (e.g., analytics.yourdomain.com)
- Choose Let’s Encrypt or custom SSL
- Complete SSL installation before proceeding
NGINX Configuration
- Access NGINX Config
- In your web application, click “NGINX Config” in the left sidebar
- Click “Add Config”
- For “Type” select: “location.root”
- Config Name will auto-populate, should end with
.conf
- Enter Configuration
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
- Click “Update config”
- Click “Run and Debug” to verify syntax
Database Setup
- Create MariaDB Database
- Go to “Linked Database” section
- Click “Update Linked Database”
- Create database named
umami_db
- Create user named
umami_user
- Set charset to
utf8mb4_unicode_520_ci
- Save your database password securely
Application Installation
These instructions are adapted from the Umami Analytics’ docs.
- Access Server & Install
# Navigate to application directory
cd /home/runcloud/webapps/Umami-Analytics
# Clone Umami
git clone https://github.com/umami-software/umami.git .
# Create environment file
nano .env
- Configure Environment
Add to.env
:
DATABASE_URL=mysql://umami_user:your_password@localhost:3306/umami_db
Replace your_password
with actual password
- Build Application
# Install dependencies
npm install
# Build the application
npm run build
# Install PM2 if not already installed
npm install -g pm2
# Start with PM2
pm2 start npm --name "umami" -- start
# Configure PM2 startup
pm2 save
pm2 startup
Upgrading Umami
- Update Code
cd /home/runcloud/webapps/Umami-Analytics
git pull
yarn install
yarn build
- Restart Service
pm2 stop umami
pm2 start npm --name "umami" -- start
pm2 save
Verification
- Access your analytics at:
https://your-subdomain.yourdomain.com
- Default login:
admin
- Default password:
umami
- Important: Change default password immediately after first login
Troubleshooting
- Check NGINX logs: Web Server Log in RunCloud dashboard
- Check application logs:
pm2 logs umami
- Verify SSL status in RunCloud SSL/TLS section
- Ensure port 3000 isn’t being used by another application
Also, if you want something even more turnkey for WordPress websites, Koko Analytics is fantastic and super client friendly.