Manual installation
📌 New users: Start with Quick Start Guide for an easier automated setup!
This guide covers manual step-by-step installation for advanced users, developers, or deployment environments where the automated scripts aren’t suitable.
Overview
ECTLogger is a modern web-based net logger for Emergency Communications Teams and SKYWARN spotter nets. It features real-time check-ins, multi-frequency support, and comprehensive net management.
Technology Stack
- Backend: Python FastAPI with SQLAlchemy ORM
- Frontend: React with TypeScript and Material-UI (MUI)
- Database: SQLite (default), PostgreSQL or MySQL supported
- Authentication: Magic link email, optional password and two-factor authentication, and optional sign-in with Google, Microsoft or another OpenID Connect provider
- Real-time: WebSockets for live updates
Prerequisites
- Python 3.11 or higher
- Node.js 18 or higher
- Git
Installation Steps
1. Clone the Repository
git clone https://github.com/yourusername/ectlogger.git
cd ectlogger
2. Backend Setup
Create Python Virtual Environment
Linux/macOS:
cd backend
python3 -m venv venv
source venv/bin/activate
Windows:
cd backend
python -m venv venv
.\venv\Scripts\Activate.ps1
Install Dependencies
pip install -r requirements.txt
Configure Environment Variables
Copy the example environment file:
Linux/macOS:
cp .env.example backend/.env
Windows:
Copy-Item .env.example backend\.env
Edit backend/.env file with your settings:
# Database (SQLite by default)
DATABASE_URL=sqlite:///./ectlogger.db
# Security - GENERATE A STRONG SECRET KEY!
SECRET_KEY=your-very-secure-secret-key-change-this-in-production
ALGORITHM=HS256
# Session length (default 90 days, with rolling renewal) is set in
# Admin > Security > Session Settings, not here.
# Frontend URL
FRONTEND_URL=http://localhost:3000
# Email Configuration (Required for authentication)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASSWORD=your-app-password
SMTP_FROM_EMAIL=noreply@ectlogger.com
SMTP_FROM_NAME=ECTLogger
# Frontend Serving (Production only)
# Set to true when using Caddy/Nginx to serve static files from frontend/dist/
# SKIP_VITE=true
Important Notes:
- Generate a secure SECRET_KEY using:
python3 -c "import secrets; print(secrets.token_urlsafe(32))" - For Gmail SMTP, you need to create an “App Password” in your Google Account settings
- Sign in with Google or Microsoft is set up later, in the admin panel, not in
.env
Initialize Database
The database will be automatically created on first run. No manual initialization needed.
3. Frontend Setup
Open a new terminal window:
cd frontend
Install Dependencies
npm install
Configure Frontend Environment (Optional)
Create .env.local file if you need to customize the API URL:
VITE_API_URL=http://localhost:8000/api
Note: The
/apisuffix is required. All backend routes are prefixed with/apifor reverse proxy compatibility.
Running the Application
Start Backend Server
Linux/macOS:
cd backend
source venv/bin/activate
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
Windows:
cd backend
.\venv\Scripts\Activate.ps1
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
The API will be available at: http://localhost:8000 API documentation: http://localhost:8000/docs
Start Frontend Development Server
In a separate terminal:
cd frontend
npm run dev
The application will be available at: http://localhost:3000
Quick Start Scripts
Linux/macOS:
chmod +x *.sh
./install.sh # One-time setup
./configure.sh # Configure email and database
./start.sh # Start both servers
Windows:
.\start.ps1 # Install and start
First Time Setup
- Open your browser to http://localhost:3000
- Click “Send Magic Link”
- Enter your email address
- Check your email for the magic link
- Click the link to sign in
- Your account will be created automatically
Sign in with Google or Microsoft (Optional)
Set these up after your first sign-in, in Admin → Security → Sign in with Google, Microsoft and others. Nothing goes in .env. The form shows the redirect address to register with the provider. Sign in with Google, Microsoft and others has the steps for each provider.
The GOOGLE_, MICROSOFT_ and GITHUB_CLIENT_ID/_SECRET lines older copies of .env carry are ignored, and can be deleted.
Database Options
Using PostgreSQL
- Install PostgreSQL
# Ubuntu/Debian sudo apt install postgresql postgresql-contrib # macOS brew install postgresql - Create database:
sudo -u postgres createdb ectlogger sudo -u postgres createuser your_username - Update
backend/.env:DATABASE_URL=postgresql+asyncpg://username:password@localhost/ectlogger
Using MySQL
- Install MySQL
# Ubuntu/Debian sudo apt install mysql-server # macOS brew install mysql - Create database:
CREATE DATABASE ectlogger; CREATE USER 'your_user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON ectlogger.* TO 'your_user'@'localhost'; - Update
backend/.env:DATABASE_URL=mysql+aiomysql://username:password@localhost/ectlogger
Production Deployment
Backend Deployment
- Set
APP_ENV=productioninbackend/.env - Run the backend with uvicorn directly, without
--reload— this project does not use gunicorn or a WSGI worker manager anywhere:cd backend source venv/bin/activate uvicorn app.main:app --host 0.0.0.0 --port 8000The
install-service.shscript (or the systemd section below) wraps this same command in a managed service instead of running it in a terminal. - Set up reverse proxy (nginx, Apache, or Caddy — see PRODUCTION-DEPLOYMENT.md)
- Enable HTTPS with SSL certificates (Let’s Encrypt)
- Configure firewall rules
Frontend Deployment
cd frontend
npm run build
The dist folder contains production-ready static files.
Important: If using a reverse proxy (Caddy, nginx) to serve the frontend, ensure the web server user can read the files. Home directories are typically mode 700, which prevents access:
# Make directories traversable for the web server chmod 755 /home/your-user chmod 755 /path/to/ectlogger chmod 755 /path/to/ectlogger/frontend chmod -R a+rX /path/to/ectlogger/frontend/dist
systemd Service (Linux)
Run ./install-service.sh from the repo root — it detects the current user and install
path and writes /etc/systemd/system/ectlogger.service for you, running the backend (and,
unless SKIP_VITE=true, the frontend dev server) through start.sh --service:
./install-service.sh
Enable and start:
sudo systemctl enable ectlogger
sudo systemctl start ectlogger
Serve with:
- Nginx
- Apache
- Caddy
- Any static file hosting service
Environment Variables for Production
Update these settings:
- Set strong
SECRET_KEY - Use production database (PostgreSQL recommended)
- Configure production SMTP server
- Set
FRONTEND_URLto your domain - Enable HTTPS
- If you use Google or Microsoft sign-in, register the redirect address Admin → Security shows for your domain
Troubleshooting
Email Not Sending
- Verify SMTP credentials
- For Gmail, use an App Password — Google removed the “less secure app access” toggle for personal accounts, so an App Password is the only way to authenticate
- Check firewall settings for SMTP port
Database Connection Errors
- Ensure database server is running
- Verify connection string in
DATABASE_URL - Check database user permissions
WebSocket Connection Issues
- Ensure both frontend and backend are running
- Check CORS settings in
backend/app/main.py - Verify WebSocket URL in frontend
Import Errors
The lint errors you’re seeing are expected before dependencies are installed. They will resolve after running:
- Backend:
pip install -r requirements.txt - Frontend:
npm install
User Roles
- Guest: View-only access to active nets
- User: Can check in to nets, participate in chat
- NCS: Can create and manage nets, designate loggers
- Admin: Full system access, user management
💡 Note: The first user to sign in is automatically granted Administrator privileges. Make sure to sign in before making the server publicly accessible.
Support and Documentation
- API Documentation: http://localhost:8000/docs (when backend is running)
- GitHub Issues: Report bugs and feature requests
- README.md: Feature overview and requirements
License
MIT License - See LICENSE file for details