How-to

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

Prerequisites

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:

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 /api suffix is required. All backend routes are prefixed with /api for 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

  1. Open your browser to http://localhost:3000
  2. Click “Send Magic Link”
  3. Enter your email address
  4. Check your email for the magic link
  5. Click the link to sign in
  6. 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

  1. Install PostgreSQL
    # Ubuntu/Debian
    sudo apt install postgresql postgresql-contrib
       
    # macOS
    brew install postgresql
    
  2. Create database:
    sudo -u postgres createdb ectlogger
    sudo -u postgres createuser your_username
    
  3. Update backend/.env:
    DATABASE_URL=postgresql+asyncpg://username:password@localhost/ectlogger
    

Using MySQL

  1. Install MySQL
    # Ubuntu/Debian
    sudo apt install mysql-server
       
    # macOS
    brew install mysql
    
  2. Create database:
    CREATE DATABASE ectlogger;
    CREATE USER 'your_user'@'localhost' IDENTIFIED BY 'password';
    GRANT ALL PRIVILEGES ON ectlogger.* TO 'your_user'@'localhost';
    
  3. Update backend/.env:
    DATABASE_URL=mysql+aiomysql://username:password@localhost/ectlogger
    

Production Deployment

Backend Deployment

  1. Set APP_ENV=production in backend/.env
  2. 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 8000
    

    The install-service.sh script (or the systemd section below) wraps this same command in a managed service instead of running it in a terminal.

  3. Set up reverse proxy (nginx, Apache, or Caddy — see PRODUCTION-DEPLOYMENT.md)
  4. Enable HTTPS with SSL certificates (Let’s Encrypt)
  5. 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:

Environment Variables for Production

Update these settings:

Troubleshooting

Email Not Sending

Database Connection Errors

WebSocket Connection Issues

Import Errors

The lint errors you’re seeing are expected before dependencies are installed. They will resolve after running:

User Roles

💡 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

License

MIT License - See LICENSE file for details