Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

imagegenius/docker-ai-chat-app

Repository files navigation

This image is deprecated. We will not offer support for this image and it will not be updated.

Upstream project is d-e-a-d.

GitHub Release GitHub Package Repository Jenkins Build IG CI

ai-chat-app - Open Source, Self-Hosted ChatGPT app

ai-chat-app

Supported Architectures

We use Docker manifest for cross-platform compatibility. More details can be found on Docker's website.

To obtain the appropriate image for your architecture, simply pull ghcr.io/imagegenius/ai-chat-app:latest. Alternatively, you can also obtain specific architecture images by using tags.

This image supports the following architectures:

Architecture Available Tag
x86-64 amd64-<version tag>
arm64
armhf

Application Setup

This container is just a dockerised version of bitswired/fuseai, Please report any issues with this app here!

The WebUI can be accessed at http://your-ip:3000, you must specify an OpenAI API Key in settings before using, go to http://your-ip:3000/settings, enter the API key, and press save.

If you would like to setup multi-user support, use the .env template here, and copy the other variables.

Usage

Example snippets to start creating a container:

Docker Compose

---
services:
  ai-chat-app:
    image: ghcr.io/imagegenius/ai-chat-app:latest
    container_name: ai-chat-app
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - NEXTAUTH_SECRET=secret
      - NEXTAUTH_URL=http://192.168.1.2:3000
      - ADMIN_EMAIL=example@me.com
      - ADMIN_PASSWORD=password
    volumes:
      - path_to_appdata:/config
    ports:
      - 3000:3000
    restart: unless-stopped
docker run -d \
  --name=ai-chat-app \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=Etc/UTC \
  -e NEXTAUTH_SECRET=secret \
  -e NEXTAUTH_URL=http://192.168.1.2:3000 \
  -e ADMIN_EMAIL=example@me.com \
  -e ADMIN_PASSWORD=password \
  -p 3000:3000 \
  -v path_to_appdata:/config \
  --restart unless-stopped \
  ghcr.io/imagegenius/ai-chat-app:latest

Parameters

To configure the container, pass variables at runtime using the format <external>:<internal>. For instance, -p 8080:80 exposes port 80 inside the container, making it accessible outside the container via the host's IP on port 8080.

Parameter Function
-p 3000 WebUI Port
-e PUID=1000 UID for permissions - see below for explanation
-e PGID=1000 GID for permissions - see below for explanation
-e TZ=Etc/UTC Specify a timezone to use, see this list.
-e NEXTAUTH_SECRET=secret Used to encrypt the NextAuth.js JWT and to hash email verification tokens, set to something long and random.
-e NEXTAUTH_URL=http://192.168.1.2:3000 Set this to the IP:port used to access the container.
-e ADMIN_EMAIL=example@me.com Email used to access the WebUI.
-e ADMIN_PASSWORD=password Password used to access the WebUI.
-v /config Contains the database

Umask for running applications

All of our images allow overriding the default umask setting for services started within the containers using the optional -e UMASK=022 option. Note that umask works differently than chmod and subtracts permissions based on its value, not adding. For more information, please refer to the Wikipedia article on umask here.

User / Group Identifiers

To avoid permissions issues when using volumes (-v flags) between the host OS and the container, you can specify the user (PUID) and group (PGID). Make sure that the volume directories on the host are owned by the same user you specify, and the issues will disappear.

Example: PUID=1000 and PGID=1000. To find your PUID and PGID, run id user.

  $ id username
    uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)

Updating the Container

Most of our images are static, versioned, and require an image update and container recreation to update the app. We do not recommend or support updating apps inside the container. Check the Application Setup section for recommendations for the specific image.

Instructions for updating containers:

Via Docker Compose

  • Update all images: docker-compose pull
    • or update a single image: docker-compose pull ai-chat-app
  • Let compose update all containers as necessary: docker-compose up -d
    • or update a single container: docker-compose up -d ai-chat-app
  • You can also remove the old dangling images: docker image prune

Via Docker Run

  • Update the image: docker pull ghcr.io/imagegenius/ai-chat-app:latest
  • Stop the running container: docker stop ai-chat-app
  • Delete the container: docker rm ai-chat-app
  • Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your /config folder and settings will be preserved)
  • You can also remove the old dangling images: docker image prune

Versions

  • 26.04.24: - Deprecate
  • 01.06.23: - pin next and next-auth
  • 28.03.23: - Add variable checks
  • 21.03.23: - Add service checks
  • 19.03.23: - Add mutli-user variables.
  • 05.03.23: - Initial Release.