Deployment

Deployment Guide

Get your self-hosted Aria server running with Docker in under 10 minutes.

Prerequisites

A Server

VPS, dedicated server, or cloud VM with 2+ CPU cores, 4GB+ RAM

Docker & Docker Compose

Docker 20.10+ and Docker Compose v2

Domain Name (Optional)

For TLS/HTTPS. Can use IP address for testing.

Aria Account

Account creation will be available at launch. Join the waitlist for early access

1

Provision Your Server

Before deploying, you need to register your server with Aria to get your credentials.

  1. a.Log in to app.aria.chat (available at launch)
  2. b.Navigate to Settings Servers Create Self-Hosted Server
  3. c.Enter your server name and description
  4. d.Copy your SERVER_ID, API_KEY, and AUTH_SERVICE_PUBLIC_KEY

Important: Save your API key securely — it's only shown once. If you lose it, you'll need to regenerate it from the dashboard.

2

Download the Template

Download the self-hosted deployment template to your server.

Terminal
aria deploy init my-server
cd my-server

The template includes docker-compose.yml, .env.example, and all necessary configuration files.

3

Configure Environment

Create your environment file and fill in your credentials.

Terminal
cp .env.example .env
nano .env  # or your preferred editor

At minimum, you need to set these values:

.env
# Your server's public hostname or IP
PUBLIC_HOST=chat.example.com

# Credentials from Step 1
SERVER_ID=1234567890123456789
API_KEY=aria_sk_live_your_key_here
AUTH_SERVICE_PUBLIC_KEY=-----BEGIN PUBLIC KEY-----...

# Generate strong passwords
MONGO_PASSWORD=your-secure-mongodb-password
REDIS_PASSWORD=your-secure-redis-password

# Optional: Server display name
SERVER_NAME=My Team's Chat

Full configuration reference coming soon.

4

Start the Server

Launch all services with Docker Compose.

Terminal
docker compose up -d

This starts MongoDB, Redis, and the Aria server. Check that everything is running:

Terminal
docker compose ps

# You should see:
# aria-server    running   0.0.0.0:3003->3003/tcp
# aria-mongodb   running   27017/tcp
# aria-redis     running   6379/tcp
5

Verify the Deployment

Check that your server is healthy and registered with Aria.

Terminal
curl http://localhost:3003/health

# Response:
# {"status":"healthy","version":"1.0.0"}

Your server should now appear as "Online" in your Aria dashboard under Settings Servers.

6

Configure Firewall

Open the necessary ports for HTTP and WebRTC traffic.

Terminal (UFW)
# HTTP API and WebSocket
sudo ufw allow 3003/tcp

# WebRTC media (voice/video)
sudo ufw allow 40000:40100/udp
sudo ufw allow 40000:40100/tcp

If you're using a cloud provider, also configure these ports in your security group or firewall rules.

Production Recommendations

Set Up TLS/HTTPS

Use a reverse proxy like nginx or Traefik with Let's Encrypt for automatic TLS certificates. This encrypts all traffic between clients and your server.

Example nginx config
server {
    listen 443 ssl http2;
    server_name chat.example.com;

    ssl_certificate /etc/letsencrypt/live/chat.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/chat.example.com/privkey.pem;

    location / {
        proxy_pass http://localhost:3003;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
    }
}

Set Up Backups

Regularly backup your MongoDB data and uploaded files.

Backup script
#!/bin/bash
# Backup MongoDB
docker exec aria-mongodb mongodump --out /backup

# Backup uploads
tar -czf uploads-$(date +%Y%m%d).tar.gz ./storage/

# Upload to S3 (optional)
aws s3 cp uploads-*.tar.gz s3://my-backups/aria/

Monitor Your Server

Check logs and set up alerts for issues.

Terminal
# View real-time logs
docker compose logs -f aria-server

# Check resource usage
docker stats

Keep Updated

Regularly update to the latest version for security fixes and new features.

Terminal
# Pull latest images
docker compose pull

# Restart with new version
docker compose up -d

Troubleshooting

Server won't start

Check the logs for errors:

Terminal
docker compose logs aria-server

Common issues: missing required environment variables, MongoDB connection failed, invalid API key.

Cannot connect from client
  • • Verify PUBLIC_HOST matches your domain/IP
  • • Check firewall allows port 3003
  • • Ensure the server appears "Online" in Aria dashboard
  • • Try accessing the health endpoint directly
Voice/video not working
  • • Ensure UDP ports 40000-40100 are open
  • • Verify MEDIASOUP_ANNOUNCED_IP is set correctly (usually same as PUBLIC_HOST)
  • • Check if you need a TURN server for strict NAT environments
File uploads failing
  • • Check ./storage/ directory permissions
  • • Verify disk space is available
  • • If using S3, check credentials and bucket permissions
  • • Check MAX_FILE_SIZE_MB setting

Next Steps