Single docker image deployment with SQLite3 and Memory Queue
This setup is only meant for personal use or testing. It runs on SQLite3 and an in-memory Redis queue, which supports only a single instance on a single machine. For production or multi-instance setups, you must use Docker Compose with PostgreSQL and Redis.
To get up and running quickly with NRAI, we will use the NRAI Docker image. Follow these steps:
Configure Webhook URL (Important for Triggers, Optional If you have public IP)
Note: By default, NRAI will try to use your public IP for webhooks. If you are self-hosting on a personal machine, you must configure the frontend URL so that the webhook is accessible from the internet.Optional: The easiest way to expose your webhook URL on localhost is by using a service like ngrok. However, it is not suitable for production use.
Install ngrok
Run the following command:
ngrok http 8080
Replace AP_FRONTEND_URL environment variable in the command line above.
Before proceeding with the upgrade, it is always a good practice to back up your NRAI data to avoid any potential data loss during the update process.
Stop the Current NRAI Container: If your NRAI container is running, stop it using the following command:
docker stop nrai_container_name
Backup NRAI Data Directory: By default, NRAI data is stored in the ~/.NRAI directory on your host machine. Create a backup of this directory to a safe location using the following command:
Now, run the updated NRAI container with the latest image using the same command you used during the initial setup. Be sure to replace nrai_container_name with the desired name for your new container.