Docker
This guide shows you the steps to deploy a self-hosted instance of Miru using Docker.
Prerequisites
Before we start, you need to make sure you have a VPS or on-prem machine with:
- 2 vCPUs
- 2GB of RAM
- Docker
Installation
Run the following steps to create a new instance of Miru using Docker:
Create a new directory and navigate to it:
mkdir miru
cd miru
Create an .env
file to store your Miru instance secrets.
# Database Configuration
POSTGRES_PASSWORD=VerySecurePassword123
POSTGRES_USER=miru
POSTGRES_DB=miru
# Database Connection Settings
DATABASE_URL=postgresql://miru:VerySecurePassword123@database:5432/miru
DATABASE_SSL=false
# JWT Secret
BETTER_AUTH_SECRET=
# URL Settings
APP_DOMAIN=localhost
MONITOR_URL=http://localhost:8080
# If you must verify your email before logging in
EMAIL_VERIFICATION=true
# SMTP Settings
ENABLE_EMAIL=true
SMTP_HOST=smtp.useplunk.com
SMTP_PORT=465
SMTP_SECURE=true
SMTP_USER=plunk
SMTP_PASSWORD=
SMTP_FROM=hello@nordstud.io
Create a Docker network:
docker network create miru
Create and run the database container:
Note
It is important that the database is started before the Miru containers as they depend on it.
docker run -d --name database --network=miru --env-file ./.env -v ./database:/var/lib/postgresql/data -p 5432:5432 postgres:17.3
Create and run the Miru dashboard container:
docker run -d --name web --network=miru --env-file ./.env -p 3000:3000 ghcr.io/nord-studio/miru/web:latest ;
docker run -d --name monitor --network=miru --env-file ./.env -p 8080:8080 ghcr.io/nord-studio/miru/monitor:latest
Navigate to your servers IP address on port 3000
in your browser to access the Miru dashboard. You should see the welcome screen as seen below.