Complete guide for installing, upgrading, and managing Client St0r.
- Quick Start
- System Requirements
- Fresh Installation
- Existing Installation Detection
- Upgrade/Update
- System Check
- Clean Reinstall
- Manual Installation
- Troubleshooting
- Post-Installation
Install Client St0r on a fresh Ubuntu/Debian server:
git clone https://github.com/agit8or1/clientst0r.git && cd clientst0r && bash install.shThat's it! When complete, the server is running at http://YOUR_IP:8000
- OS: Ubuntu 20.04+ or Debian 11+
- RAM: 2GB minimum (4GB recommended)
- Disk: 10GB free space
- Network: Internet connection for package installation
The installer handles all dependencies:
- Python: python3.12, python3.12-venv, python3.12-dev, python3-pip
- Database: mariadb-server, mariadb-client, default-libmysqlclient-dev
- Build Tools: build-essential, pkg-config
- Libraries: libssl-dev, libffi-dev, libldap2-dev, libsasl2-dev
- Python Packages: Django, Gunicorn, Cryptography, and 40+ more
-
Clone the repository:
git clone https://github.com/agit8or1/clientst0r.git cd clientst0r -
Run the installer:
bash install.sh
-
Follow the prompts:
- The installer runs 11 automated steps
- You'll be prompted to create a superuser account
- Enter username, email, and password (minimum 12 characters)
-
Access the application:
- When complete, you'll see the access URL
- Open
http://YOUR_IP:8000in your browser - Log in with the credentials you created
The installer performs these steps automatically:
- ✅ System Prerequisites - Installs all required packages
- ✅ Virtual Environment - Creates Python virtual environment
- ✅ Python Dependencies - Installs 40+ Python packages (2-3 minutes)
- ✅ Secure Secrets - Generates encryption keys automatically
- ✅ Environment Config - Creates
.envfile with all settings - ✅ Database Setup - Creates database and user
- ✅ Log Directory - Creates
/var/log/itdocs/ - ✅ Database Migrations - Applies all schema migrations
- ✅ Organization Setup - Interactive prompt for your business name and demo data
- ✅ Superuser Account - Interactive prompt for admin user
- ✅ Static Files - Collects CSS, JavaScript, images
- ✅ Production Server - Starts Gunicorn with systemd
During Step 9 (Organization Setup), you will be asked:
Business Name (Organization): Acme Corporation
Create demo office floor plan? (y/n) [y]: y
This creates:
- Your default organization with the name you provide
- (Optional) Demo office floor plan with network infrastructure
- Proper database structure for multi-tenancy
Total time: 5-10 minutes depending on server speed
The installer automatically detects existing installations by checking for:
.envconfiguration file- Python virtual environment (
venv/directory) - Systemd service (
clientst0r-gunicorn.service) - Database with user data
When you run the installer on an existing installation:
[!] Existing Client St0r installation detected!
• Found: .env configuration file
• Found: Python virtual environment
• Found: systemd service
Status: Running ✓
• Found: Database 'clientst0r' with 1 user(s)
What would you like to do?
1) Upgrade/Update (pull latest code, run migrations, restart service)
2) System Check (verify all components are working)
3) Clean Install (remove everything and reinstall)
4) Exit
Enter choice [1-4]:
Update an existing installation to the latest version.
cd ~/clientst0r
git pull origin main
bash install.shChoose Option 1 when prompted.
- Stops the running service
- Pulls latest code from GitHub
- Updates Python dependencies
- Runs new database migrations
- Collects static files
- Restarts the service
Zero downtime alternative: For production systems, consider:
- Running upgrade during maintenance window
- Using blue-green deployment strategy
- Database backup before migration
[i] Starting upgrade process...
[i] Stopping service...
[i] Pulling latest code from GitHub...
[i] Updating Python dependencies...
[i] Running database migrations...
[i] Collecting static files...
[i] Restarting service...
[✓] Upgrade complete! Service is running.
Access at: http://192.168.22.72:8000
Verify all components are working correctly.
cd ~/clientst0r
bash install.shChoose Option 2 when prompted.
- Python Environment: Version and virtual environment
- Database: Existence, table count
- Service: Status (running/stopped), PID
- Port 8000: Listening status
- Log Directory:
/var/log/itdocs/exists - HTTP Response: Test actual web response
[i] Running system check...
[✓] Python: Python 3.12.3
[✓] Database: clientst0r exists
Tables: 56
[✓] Service: Running
602570 - active
[✓] Port 8000: Listening
[✓] Log directory: /var/log/itdocs
[✓] HTTP Response: 302 (OK)
Access at: http://192.168.22.72:8000
[i] System check complete
Remove everything and perform a fresh installation.
- Fix corrupted installation
- Reset all settings to defaults
- Clear all data and start over
- Troubleshoot persistent issues
cd ~/clientst0r
bash install.shChoose Option 3 when prompted.
- Database and all contents
- Configuration files
- Virtual environment
- Log files
- Systemd service
You'll be asked to type "yes" to confirm.
- Stops and removes systemd service
- Drops database and user
- Removes virtual environment
- Deletes
.envfile - Cleans log directory
- Proceeds with fresh installation (all 11 steps)
For advanced users who want manual control.
Install system dependencies:
sudo apt-get update
sudo apt-get install -y \
python3.12 \
python3.12-venv \
python3.12-dev \
python3-pip \
mariadb-server \
mariadb-client \
build-essential \
pkg-config \
libssl-dev \
libffi-dev \
default-libmysqlclient-dev \
libldap2-dev \
libsasl2-dev-
Clone and enter directory:
git clone https://github.com/agit8or1/clientst0r.git cd clientst0r -
Create virtual environment:
python3.12 -m venv venv source venv/bin/activate -
Install Python packages:
pip install --upgrade pip pip install -r requirements.txt
-
Generate secrets:
python3 -c "from cryptography.fernet import Fernet; print('APP_MASTER_KEY=' + Fernet.generate_key().decode())" python3 -c "import secrets; print('SECRET_KEY=' + secrets.token_urlsafe(50))" python3 -c "import secrets; print('API_KEY_SECRET=' + secrets.token_urlsafe(50))"
-
Create .env file:
cat > .env << 'EOF' DEBUG=True SECRET_KEY=<paste_secret_key> ALLOWED_HOSTS=localhost,127.0.0.1,YOUR_IP DB_NAME=clientst0r DB_USER=clientst0r DB_PASSWORD=your_secure_password DB_HOST=localhost DB_PORT=3306 APP_MASTER_KEY=<paste_master_key> API_KEY_SECRET=<paste_api_key_secret> EMAIL_BACKEND=django.core.mail.backends.console.EmailBackend SITE_NAME=Client St0r SITE_URL=http://YOUR_IP:8000 EOF
-
Setup database:
sudo systemctl start mariadb sudo mysql << 'EOSQL' CREATE DATABASE clientst0r CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; CREATE USER 'clientst0r'@'localhost' IDENTIFIED BY 'your_secure_password'; GRANT ALL PRIVILEGES ON clientst0r.* TO 'clientst0r'@'localhost'; FLUSH PRIVILEGES; EOSQL
-
Create log directory:
sudo mkdir -p /var/log/itdocs sudo chown $USER:$USER /var/log/itdocs sudo chmod 755 /var/log/itdocs
-
Run migrations:
python3 manage.py migrate
-
Create superuser:
python3 manage.py createsuperuser
-
Collect static files:
python3 manage.py collectstatic --noinput
-
Start development server:
python3 manage.py runserver 0.0.0.0:8000
Error: Error: That port is already in use.
Solution:
# Check what's using port 8000
sudo ss -tlnp | grep :8000
# Stop the service
sudo systemctl stop clientst0r-gunicorn.service
# Or kill the process
sudo kill <PID>Error: Can't connect to MySQL server
Solution:
# Check if MariaDB is running
sudo systemctl status mariadb
# Start MariaDB
sudo systemctl start mariadb
# Check database exists
sudo mysql -e "SHOW DATABASES LIKE 'clientst0r';"Error: ModuleNotFoundError: No module named 'xxx'
Solution:
cd ~/clientst0r
source venv/bin/activate
pip install -r requirements.txtError: Permission denied: '/var/log/itdocs/django.log'
Solution:
sudo mkdir -p /var/log/itdocs
sudo chown $USER:$USER /var/log/itdocs
sudo chmod 755 /var/log/itdocsError: Service fails to start
Solution:
# Check service status and logs
sudo systemctl status clientst0r-gunicorn.service
sudo journalctl -u clientst0r-gunicorn.service -n 50
# Common fixes:
# 1. Check .env file exists
ls -la ~/clientst0r/.env
# 2. Check virtual environment
ls -la ~/clientst0r/venv/bin/activate
# 3. Test manually
cd ~/clientst0r
source venv/bin/activate
python3 manage.py checkApplication logs:
sudo journalctl -u clientst0r-gunicorn.service -fGunicorn access logs:
tail -f /var/log/itdocs/gunicorn-access.logGunicorn error logs:
tail -f /var/log/itdocs/gunicorn-error.logDjango logs:
tail -f /var/log/itdocs/django.log-
Access the application:
- Open
http://YOUR_IP:8000in browser - Log in with superuser credentials
- Open
-
Load demo data (Optional, Recommended for Testing):
- Loads comprehensive demo data under "Acme Corporation" organization
- Includes assets, documents, passwords, workflows, diagrams, and more
cd ~/clientst0r source venv/bin/activate python manage.py seed_demo_data
- Demo users created:
demo.admin/demo123- Admin roledemo.editor/demo123- Editor roledemo.viewer/demo123- Read-only role
- Demo data includes:
- 9 assets (servers, network devices, workstations)
- 5 documentation articles
- 5 password vault entries (in folders)
- 3 workflows with multiple stages
- Network topology diagram
- 3 contacts
- 3 website monitors
- 15 tags
-
Create an organization (if not using demo data):
- Dashboard → Organizations → Create New
- All data is organization-scoped
-
Enable 2FA (Required):
- Profile → Two-Factor Authentication
- Scan QR code with authenticator app
- Required for all users
-
Change database password:
- Edit
.envfile - Change
DB_PASSWORDfrom default - Update in MySQL:
sudo mysql -e "ALTER USER 'clientst0r'@'localhost' IDENTIFIED BY 'new_password';" - Restart service:
sudo systemctl restart clientst0r-gunicorn.service
- Edit
-
Configure for production:
- Edit
.env:DEBUG=False ALLOWED_HOSTS=yourdomain.com,YOUR_IP SITE_URL=https://yourdomain.com - Restart service
- Edit
Check status:
sudo systemctl status clientst0r-gunicorn.serviceStart service:
sudo systemctl start clientst0r-gunicorn.serviceStop service:
sudo systemctl stop clientst0r-gunicorn.serviceRestart service:
sudo systemctl restart clientst0r-gunicorn.serviceEnable auto-start on boot:
sudo systemctl enable clientst0r-gunicorn.serviceDisable auto-start:
sudo systemctl disable clientst0r-gunicorn.serviceBackup database:
mysqldump -u clientst0r -p clientst0r > clientst0r_backup_$(date +%Y%m%d).sqlRestore database:
mysql -u clientst0r -p clientst0r < clientst0r_backup_YYYYMMDD.sqlBackup files:
tar -czf clientst0r_files_$(date +%Y%m%d).tar.gz \
~/clientst0r/.env \
~/clientst0r/media/ \
/var/log/itdocs/-
Use strong passwords:
- Minimum 12 characters
- Mix of uppercase, lowercase, numbers, symbols
-
Enable firewall:
sudo ufw allow 22/tcp sudo ufw allow 8000/tcp sudo ufw enable -
Keep system updated:
sudo apt-get update sudo apt-get upgrade
-
Regular backups:
- Schedule daily database backups
- Test restore procedures
-
Monitor logs:
- Check for suspicious activity
- Set up log rotation
- Documentation: https://github.com/agit8or1/clientst0r
- Issues: https://github.com/agit8or1/clientst0r/issues
- Security: See SECURITY.md for vulnerability disclosure
Made with ❤️ and 🐕 by the Client St0r Team and Luna the German Shepherd