Self-Hosting Installation Guide
A comprehensive guide to deploying TeamPilot on your own infrastructure.
Prerequisites
- Docker and Docker Compose installed on your server
- Node.js 18 or later
- PostgreSQL 14 or later
- Redis (optional, for caching)
- SMTP server for email notifications
System Requirements
- Minimum 2 CPU cores
- 4GB RAM
- 20GB storage space
- Ubuntu 20.04 LTS or later (recommended)
Installation Steps
1. Clone the Repository
git clone https://github.com/teampilot-hq/teampilot-hq.git cd teampilot-hq2. Configure Environment Variables
cp .env.example .env nano .envUpdate the environment variables with your configuration.
3. Start with Docker Compose
docker-compose up -d4. Run Database Migrations
docker-compose exec app npm run migrate5. Create Admin User
docker-compose exec app npm run create-adminConfiguration
Essential environment variables to configure:
# Database Configuration
DATABASE_URL=postgresql://user:password@localhost:5432/teampilot-hq
# Authentication
JWT_SECRET=your-secure-secret-key
SESSION_SECRET=another-secure-secret
# Email Configuration
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=your-smtp-user
SMTP_PASS=your-smtp-password
# Application Settings
APP_URL=https://your-domain.com
NODE_ENV=productionSecurity Recommendations
- Always use HTTPS in production
- Set up proper firewall rules
- Regularly update dependencies
- Enable database backups
- Use strong, unique passwords
Troubleshooting
Database Connection Issues
Ensure PostgreSQL is running and the connection URL is correct.
Email Sending Fails
Verify SMTP credentials and server connectivity.
Container Startup Problems
Check Docker logs and ensure all required services are running.
Need Help?
Having trouble with the installation? Our support team is here to help.