Caddy Recommended
Deploys Bearicorn with Caddy as the web server. Caddy automatically obtains and renews TLS certificates from Let's Encrypt — no manual certificate management required.
Requirements
- Docker installed — Debian/Ubuntu · Fedora · Alpine · AWS · DigitalOcean
- A domain name pointing to your server's IP — configure DNS
Deployment
Step 1 - Download the required files
bash
sudo mkdir -p /opt/bearicorn
sudo chown "$USER":"$USER" /opt/bearicorn
cd /opt/bearicorn
git clone https://github.com/bybearicorn/monorepo.git
cd monorepo/deploy/composeStep 2 - Populate the .env file
bash
cp .env.caddy .envGenerate secret values:
bash
openssl rand -hex 32 # use as JWT_SECRET
openssl rand -hex 16 # use as DB_PASSWORDOpen the file for editing:
bash
nano .envSet the following values:
JWT_SECRET— paste the 64-character value generated aboveDB_PASSWORD— paste the 32-character value generated aboveCADDY_SITE_ADDRESS— your domain name (e.g.chat.yourcompany.com)TZ— optional, your timezone (e.g.Europe/Berlin); defaults toUTC
WARNING
Do not leave JWT_SECRET and DB_PASSWORD at their default placeholder values on a live server.
Step 3 - Start the containers
bash
docker compose --env-file .env -f docker-compose.caddy.yml up --build -dThe first build takes 3–5 minutes. Caddy will automatically obtain the TLS certificate on startup.
Access the application
Navigate to https://your-domain.com.
The first user to register becomes the admin. Database migrations run automatically on first start.
INFO
Always access the application via the configured domain name. Caddy routes by Host header — requests to the raw server IP will not be served correctly.
Management
bash
# View logs
docker compose -f docker-compose.caddy.yml logs -f
docker compose -f docker-compose.caddy.yml logs caddy # Caddy only
docker compose -f docker-compose.caddy.yml logs hub-app # app only
# Check container status
docker compose -f docker-compose.caddy.yml ps
# Restart all containers
docker compose -f docker-compose.caddy.yml restart
# Stop all containers
docker compose -f docker-compose.caddy.yml down
# Update to the latest version
git pull && docker compose -f docker-compose.caddy.yml up --build -d