Run This Ai
EN DE

How to Self-Host Open Assistant: Docker Setup Guide

Step-by-step guide to deploying Open Assistant using Docker Compose. Get your own open-source AI assistant running in minutes with this tutorial.

Open Assistant Logo

How to Set Up Open Assistant: Quick Start Guide

Getting Open Assistant running on your own server is straightforward. This guide walks you through deploying the full stack β€” web frontend, backend API, and PostgreSQL database β€” using Docker Compose. Whether you are setting up for personal use or preparing a production deployment, these steps will have you chatting with your own AI assistant in minutes.

Prerequisites

Before you begin, make sure your server meets these minimum requirements:

  • A Linux server with Docker and Docker Compose installed
  • At least 4 CPU cores and 8 GB of RAM recommended
  • 20 GB of free disk space for models and dependencies
  • Port 8080 and 3000 open for the backend and frontend services

Step 1 β€” Clone the Repository

Start by cloning the Open Assistant repository from GitHub:

git clone https://github.com/LAION-AI/Open-Assistant.git
cd Open-Assistant

Step 2 β€” Configure Environment

Copy the example environment file and adjust the settings to match your setup:

cp .env.example .env
# Edit .env with your preferred database settings, API keys, and model configuration
Open Assistant Logo Crop

Step 3 β€” Start with Docker Compose

Open Assistant includes a full Docker Compose setup that runs all components together. Start the services with:

docker compose up -d

This launches the Next.js frontend, FastAPI backend, PostgreSQL database, and any auxiliary services defined in the compose file.

Step 4 β€” Access the Web Interface

Once the services are running, you can access the web interface at:

http://localhost:3000

The backend API will be available at http://localhost:8080.

Step 5 β€” Configure Your AI Model

Open Assistant supports multiple language models. You can configure which model to use in your .env file. The project provides scripts to download and set up fine-tuned models optimized for the assistant role. For first-time setup, you can start with the default configuration and switch models later.

Running with Profile Support

Open Assistant's Docker setup includes profiles for different deployment scenarios. For a development environment with all debugging tools:

docker compose --profile ci up --build

For production deployments, use the production profile which optimizes performance and security:

docker compose --profile production up -d

Integrating with Discord

One of Open Assistant's standout features is its Discord bot integration. After setting up the main stack, configure your Discord bot token in the .env file and start the Discord service to bring your AI assistant into any Discord server.

Troubleshooting

If you encounter issues during setup, check the following common problems:

  • Database connection errors: Ensure PostgreSQL is running and the credentials in .env match what Docker Compose uses
  • Model download failures: Check your internet connection and disk space
  • Frontend not loading: Run docker compose logs frontend to check for build errors
  • API not responding: Verify the backend container started with docker compose ps

Conclusion

With Open Assistant self-hosted, you gain full control over your conversational AI experience. The project's comprehensive documentation covers advanced topics including custom model training, API integration, and contributing back to the community. Visit the official docs at laion-ai.github.io/Open-Assistant/ for more detailed guides.

#ai-assistant #tutorial #docker #self-hosting