Accessing Bar Assistant
- Web Interface:
https://<SERVER_IP> - REST API:
https://<SERVER_IP>/bar - Meilisearch:
https://<SERVER_IP>/search - A browser SSL warning is expected because a self-signed certificate is used.
First-Time Setup
1. Open the following URL in your browser: https://<SERVER_IP>
2. Click Register.
3. Create the first user account.
4. Once registration is complete, disable public registration by editing:
vim /root/barassistant/docker-compose.yml
Change ALLOW_REGISTRATION: "true" to ALLOW_REGISTRATION: "false".
Apply the change:
cd /root/barassistant
docker compose up -d
Important Files & Directories
- Install Path:
/root/barassistant - Compose File:
/root/barassistant/docker-compose.yml - Environment File:
/root/barassistant/.env - Nginx Config:
/etc/nginx/sites-available/barassistant - SSL Certificate:
/etc/nginx/ssl/barassistant.crt - SSL Key:
/etc/nginx/ssl/barassistant.key - Bar Data Directory:
/var/lib/docker/volumes/barassistant_bar_data/_data - Meilisearch Data Directory:
/var/lib/docker/volumes/barassistant_meilisearch_data/_data
Managing Bar Assistant
View running containers:
docker compose -f /root/barassistant/docker-compose.yml ps
Restart all containers:
docker compose -f /root/barassistant/docker-compose.yml restart
Follow application logs:
docker compose -f /root/barassistant/docker-compose.yml logs -f
Stop the application:
docker compose -f /root/barassistant/docker-compose.yml down
Start the application:
docker compose -f /root/barassistant/docker-compose.yml up -d
Managing Nginx
Check status:
systemctl status nginx
Restart Nginx:
systemctl restart nginx
Reload Nginx:
systemctl reload nginx
Validate the configuration:
nginx -t
Enabling SSL with a Domain
1. Point your domain to the server IP.
2. Edit Nginx config and replace both server_name _; with your domain (server_name <yourdomain.com>) for both HTTP (port 80) and HTTPS (port 443) blocks:
vim /etc/nginx/sites-available/barassistant
3. Install Certbot:
apt install -y certbot python3-certbot-nginx
4. Run the following command to generate a valid Let's Encrypt certificate:
certbot certonly --nginx --non-interactive --agree-tos --email [email protected] -d yourdomain.com
5. Replace SSL paths in Nginx config:
vim /etc/nginx/sites-available/barassistant
# Before:
# ssl_certificate /etc/nginx/ssl/barassistant.crt;
# ssl_certificate_key /etc/nginx/ssl/barassistant.key;
# After:
# ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
# ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
6. Reload Nginx to apply the changes:
systemctl reload nginx
7. Edit /root/barassistant/.env and replace the server IP in API_URL and MEILISEARCH_URL with your domain:
API_URL=https://yourdomain.com/bar
MEILISEARCH_URL=https://yourdomain.com/search
8. Recreate the services:
cd /root/barassistant
docker compose up -d
9. Open your browser and visit: https://yourdomain.com
Verify the Reverse Proxy
- Open
https://yourdomain.com/bar. You should see: "This is your Bar Assistant instance." - Open
https://yourdomain.com/bar/docs. You should see the Swagger API documentation. - Open
https://yourdomain.com/bar/api/server/version. You should receive a JSON response containing the server version, not a "Resource not found" error.