Self-Hosting Quickstart
Install Docker
You should have Docker installed and running on your machine. You can download it here.
What Is Docker?
Docker is a developer tool that allows software-creators to distribute their work along with all dependencies and required environment settings. This means that applications can run reliably and consistently, making it the perfect way to use CaseFusion both locally and in-production.
As soon as there are new releases of CaseFusion, we publish them on GitHub Container Registry.
Create a Docker Compose File
Create a new empty folder on your Desktop called directus.
Open a text editor such as Visual Studio Code, nano, Vim, TextEdit, or Notepad.
Copy and paste the following and save the file as docker-compose.yml:
version: '3'
services:
directus:
image: ghcr.io/onainsights/casefusion:10.6.4
ports:
- 8055:8055
volumes:
- ./database:/directus/database
- ./uploads:/directus/uploads
environment:
KEY: 'replace-with-random-value'
SECRET: 'replace-with-random-value'
ADMIN_EMAIL: 'admin@example.com'
ADMIN_PASSWORD: 'd1r3ctu5'
DB_CLIENT: 'sqlite3'
DB_FILENAME: '/directus/database/data.db'
WEBSOCKETS_ENABLED: trueversion: '3'
services:
directus:
image: ghcr.io/onainsights/casefusion:10.6.4
ports:
- 8055:8055
volumes:
- ./database:/directus/database
- ./uploads:/directus/uploads
environment:
KEY: 'replace-with-random-value'
SECRET: 'replace-with-random-value'
ADMIN_EMAIL: 'admin@example.com'
ADMIN_PASSWORD: 'd1r3ctu5'
DB_CLIENT: 'sqlite3'
DB_FILENAME: '/directus/database/data.db'
WEBSOCKETS_ENABLED: trueSave the file. Let's step through it:
- This file defines a single Docker container that will use the specified version of the
ghcr.io/onainsights/casefusionimage. - The
portslist maps internal port8055is made available to our machine using the same port number, meaning we can access it from our computer's browser. - The
volumessection maps internaldirectus/databaseanddirectus/uploadsto our local file system alongside thedocker-compose.yml- meaning data is backed up outside of Docker containers. - The
environmentsection contains any configuration variables we wish to set.KEYandSECRETare required and should be long random values.KEYis used for telemetry and health tracking, andSECRETis used to sign access tokens.ADMIN_EMAILandADMIN_PASSWORDis the initial admin user credentials on first launch.DB_CLIENTandDB_FILENAMEare defining the connection to your database.WEBSOCKETS_ENABLEDis not required, but enables CaseFusion Realtime.
The volumes section is not required, but without this, our database and file uploads will be destroyed when the Docker container stops running. The default database is SQLite - a self-contained server-less database that stores data to a file.
Run CaseFusion
Open the Terminal and run the following commands one line at a time:
cd Desktop/directus
docker compose upcd Desktop/directus
docker compose upCaseFusion should now be available at http://localhost:8055 or http://127.0.0.1:8055