Back to Docs
Installation Guide

CloudNeuron — Installation & Operations Guide

Complete guide to install, update, manage, and troubleshoot your CloudNeuron instance.

System Requirements

RequirementMinimumRecommended
OSUbuntu 20.04 LTSUbuntu 22.04 / 24.04 LTS
CPU2 vCPUs4 vCPUs
RAM2 GB4 GB+
Disk20 GB40 GB+ SSD
Ports80, 44380, 443, 8090

Software dependencies (Docker, Python 3, Caddy, Git) are installed automatically.

Fresh Installation

One-Command Install

SSH into your server as root and run:

curl -fsSL https://raw.githubusercontent.com/SMSLYCLOUD/smsly-hosting/main/install.sh -o /tmp/install.sh
sudo bash /tmp/install.sh
Important: Do NOT pipe directly from curl. The installer requires interactive input unless you pre-seed SSL env vars.

What Happens During Installation

1

Pre-flight

Checks OS, root access, available resources

2

Dependencies

Installs Docker, Python, system packages. Stops conflicting services

3

Configuration

Generates secrets: Django SECRET_KEY, Fernet key, DB/Redis passwords, HMAC gateway secret

4

Deployment

Builds and starts all Docker containers

5

Database

Waits for PostgreSQL, syncs passwords, runs Django migrations

6

Admin User

Creates admin superuser (credentials saved to /opt/smsly-hosting/.credentials)

7

Reverse Proxy

Installs Caddy for HTTP or HTTPS with auto-SSL

8

Verification

Runs health checks, prints container status

After Installation

  1. Open the URL shown in the terminal
  2. Log in with admin and the password in /opt/smsly-hosting/.credentials
  3. (Recommended) Change the admin password (Settings → Security)
  4. Configure your cloud providers (Settings → Cloud)

Deployment Modes

IP Mode (Quick Start)

  • • Access: http://YOUR_IP
  • • No domain needed
  • • Best for testing
  • • Select option 1 during install

SSL Mode (Production) ✦

  • • Access: https://your-domain.com
  • • Auto Let's Encrypt SSL
  • • Requires DNS A record
  • • Select option 2 during install

Updating CloudNeuron

From the Terminal

Full Update (Frontend + Backend)

cd /opt/smsly-hosting
sudo bash install.sh --update

Frontend Only (1-2 min, no backend downtime)

cd /opt/smsly-hosting
sudo bash install.sh --update-frontend

Backend Only (includes migrations)

cd /opt/smsly-hosting
sudo bash install.sh --update-backend

Rollback on Failure

If an update fails, the installer automatically:

  1. Stops new containers
  2. Restores the previous .env backup
  3. Pops the git stash (rolls back code)

Manual rollback:

cd /opt/smsly-hosting
git log --oneline -n 5           # Find the previous commit
git checkout <commit-hash>       # Roll back
docker compose -f docker-compose.prod.yml up -d --build

From the Dashboard

Admins can trigger updates from Settings → System → Update Software.

Managing Services

View Container Status

cd /opt/smsly-hosting
docker compose -f docker-compose.prod.yml ps

View Logs

# All services
docker compose -f docker-compose.prod.yml logs -f

# Specific service
docker compose -f docker-compose.prod.yml logs -f backend
docker compose -f docker-compose.prod.yml logs -f frontend

Restart Services

# Restart everything
docker compose -f docker-compose.prod.yml restart

# Restart specific service
docker compose -f docker-compose.prod.yml restart backend

Health Check

curl http://localhost:8090/health

Container Map

ServicePortPurpose
backend8000Django API (Gunicorn)
frontend3000Next.js SSR
nginx8090Internal routing
db5432PostgreSQL 16
redis6379Cache + Celery broker
celeryBackground task worker
celery-beatPeriodic task scheduler

Database Operations

Backup

cd /opt/smsly-hosting
docker compose -f docker-compose.prod.yml exec db \
  pg_dump -U smsly_admin smsly_hosting | gzip > backup_$(date +%Y%m%d).sql.gz

Automated Backups

Add to root crontab (crontab -e):

# Daily at 2 AM
0 2 * * * cd /opt/smsly-hosting && docker compose -f docker-compose.prod.yml exec -T db pg_dump -U smsly_admin smsly_hosting | gzip > backups/daily_$(date +\%Y\%m\%d).sql.gz

Restore from Backup

# Stop write-services
docker compose -f docker-compose.prod.yml stop backend celery celery-beat

# Restore
gunzip -c backup_20260211.sql.gz | \
  docker compose -f docker-compose.prod.yml exec -T db psql -U smsly_admin -d smsly_hosting

# Restart
docker compose -f docker-compose.prod.yml start backend celery celery-beat

Reset Admin Password

docker compose -f docker-compose.prod.yml exec backend python manage.py shell -c \
  "from django.contrib.auth import get_user_model; User = get_user_model(); u = User.objects.get(username='admin'); u.set_password('your_new_password'); u.save(); print('Done.')"

SSL & Custom Domains

Switch from IP Mode to SSL

  1. Create a DNS A record pointing to your server IP
  2. Edit Caddyfile: nano /etc/caddy/Caddyfile
your-domain.com {
    reverse_proxy localhost:8090
    encode gzip
}
  1. Update .env — set DOMAIN, USE_SSL=true, ALLOWED_HOSTS, CSRF_TRUSTED_ORIGINS
  2. Restart: systemctl restart caddy && docker compose -f docker-compose.prod.yml restart backend

Troubleshooting

Dashboard Not Loading
Check containers (docker compose ps), verify nginx on port 8090, check firewall (ufw status), check Caddy.
Database Connection Error
Check backend logs, verify .env POSTGRES_PASSWORD matches DATABASE_URL. Re-sync with --update.
Build Fails During Update
Check disk space (df -h), clean Docker cache (docker system prune -f), retry update.
Caddy SSL Error
Verify DNS resolves (host your-domain.com), check Caddy logs (journalctl -u caddy), ensure ports 80/443 are open.
Container Keeps Restarting
Check which container (docker compose ps), view its logs (docker compose logs --tail=100 <service>).

Security Hardening

Post-Install Checklist

Change the admin password (recommended)
Verify DEBUG=False in .env
Configure ALLOWED_HOSTS to only your domain
Enable SSL mode for production
Set up UFW firewall (ports 80, 443 only)

Firewall Setup (UFW)

ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

Credential Locations

FilePurposePermissions
/opt/smsly-hosting/.envAll secrets & configchmod 600
/opt/smsly-hosting/.credentialsAdmin login infochmod 600