A privacy-first Craigslist-style marketplace available only via Tor .onion address.
- Backend: PHP 8.2+ with server-side rendering (no client-side JavaScript)
- Database: Local Supabase Postgres (Docker)
- Payments: CryptAPI (BTC, XMR, ETH, SOL, DOGE)
- Exchange Rates: Tatum API
- Deployment: Docker Compose with Tor hidden service
- Privacy: Tor hidden service only
- Anonymous accounts (handle + password, no email)
- Listings with image uploads
- 1-to-1 private messaging
- Multi-cryptocurrency payments for posting/bumping
- Admin moderation tools
- Zero external resources for Tor Browser compatibility
- Application: PHP 8.2+ with Apache
- Database: Supabase Postgres (self-hosted)
- Containerization: Docker & Docker Compose
- Privacy: Tor hidden service
- Payments: CryptAPI integration
- Exchange Rates: Tatum API
- Image Processing: Imagick/GD
- Strict CSP headers
- No external resources
- CSRF protection
- Secure session handling
- EXIF stripping from images
- Input validation and sanitization
- Tor-only access
- Docker and Docker Compose installed
- At least 4GB RAM available for containers
- Basic understanding of Tor hidden services
git clone <repository-url>
cd onion-classifieds
# Copy and customize environment file
cp .env.example .env
# Edit .env with your configuration (see Environment Variables section)# Generate secure passwords and keys
./scripts/generate-secrets.sh# Start all services (Supabase + PHP App + Tor)
docker-compose up -d
# Check status
docker-compose ps
# View logs
docker-compose logs -f app# The database will be automatically initialized with our schema
# Check if initialization completed successfully
docker-compose logs db | grep "database system is ready"- PHP Application: http://localhost:8080
- Supabase Studio: http://localhost:3000
- Tor Hidden Service: Check logs for .onion address
# Get your .onion address
docker-compose logs tor | grep "onion"Edit .env file with your specific values:
# Database (auto-generated secure password)
POSTGRES_PASSWORD=your-super-secret-and-long-postgres-password
# JWT Secret (auto-generated)
JWT_SECRET=your-super-secret-jwt-token-with-at-least-32-characters-long
# Application Secret (auto-generated)
APP_SECRET=your-64-character-secret-key-for-application-security-here
# CryptAPI Payout Addresses (REQUIRED)
PAYOUT_BTC=your-btc-address-here
PAYOUT_XMR=your-xmr-address-here
PAYOUT_ETH=your-eth-address-here
PAYOUT_SOL=your-sol-address-here
PAYOUT_DOGE=your-doge-address-here
# Tatum API (REQUIRED for exchange rates)
TATUM_API_KEY=your-tatum-api-key-here
# Pricing (USD cents)
LISTING_PRICE_CENTS=100
BUMP_PRICE_CENTS=50# Start development environment
docker-compose up -d
# Watch application logs
docker-compose logs -f app
# Access database directly
docker-compose exec db psql -U postgres
# Restart specific service
docker-compose restart app
# Stop all services
docker-compose down# Access Supabase Studio (Database UI)
open http://localhost:3000
# Run SQL migrations
docker-compose exec db psql -U postgres -f /docker-entrypoint-initdb.d/migrations/custom/001_initial_schema.sql
# Backup database
docker-compose exec db pg_dump -U postgres postgres > backup.sql
# Restore database
docker-compose exec -T db psql -U postgres postgres < backup.sql- Database Changes: Add new migration files to
database/migrations/ - PHP Code: Modify files in
src/directory - Templates: Update templates in
templates/directory - Restart:
docker-compose restart appto apply changes
- Change all default passwords in
.env - Set
APP_DEBUG=false - Configure proper CryptAPI payout addresses
- Set up Tatum API key
- Configure proper backup strategy
- Set up monitoring and alerting
- Review and test Tor hidden service configuration
# 1. Prepare production environment
cp .env.example .env.production
# Edit .env.production with production values
# 2. Deploy with production config
docker-compose -f docker-compose.yml --env-file .env.production up -d
# 3. Verify deployment
docker-compose ps
docker-compose logs app | grep "Health check"
# 4. Get .onion address for distribution
docker-compose logs tor | grep -E "\.onion"- app: PHP 8.2 + Apache (Onion Classifieds application)
- db: PostgreSQL 15 (Supabase-compatible)
- kong: API Gateway for Supabase services
- auth: Supabase Auth service
- rest: PostgREST API
- realtime: Supabase Realtime
- storage: Supabase Storage
- studio: Supabase Studio (Database UI)
- analytics: Supabase Analytics
- tor: Tor hidden service
- User accesses .onion address via Tor Browser
- Tor container forwards requests to PHP application
- PHP application connects to local Supabase database
- Payment requests go to CryptAPI
- Exchange rates fetched from Tatum API
# Check application health
curl http://localhost:8080/health
# Check database connectivity
docker-compose exec app php -r "
require 'vendor/autoload.php';
\$config = new App\Core\Config();
\$db = new App\Core\Database(\$config);
echo \$db->ping() ? 'DB OK' : 'DB FAIL';
"# Application logs
docker-compose logs -f app
# Database logs
docker-compose logs -f db
# Tor logs
docker-compose logs -f tor
# All services
docker-compose logs -f# Automated backup script
./scripts/backup.sh
# Manual database backup
docker-compose exec db pg_dump -U postgres postgres > "backup-$(date +%Y%m%d).sql"-
Database Connection Failed
# Check database status docker-compose logs db # Restart database docker-compose restart db
-
Tor Hidden Service Not Working
# Check Tor logs docker-compose logs tor # Restart Tor service docker-compose restart tor
-
PHP Application Errors
# Check application logs docker-compose logs app # Check health endpoint curl http://localhost:8080/health
# Stop all services and remove data
docker-compose down -v
# Remove all images
docker-compose down --rmi all
# Start fresh
docker-compose up -d- Fork the repository
- Create a feature branch
- Make changes and test locally with Docker
- Submit a pull request
This application handles sensitive user data and cryptocurrency transactions. Always:
- Keep Docker images updated
- Monitor security advisories
- Use strong, unique passwords
- Regularly backup data
- Test security configurations
- Monitor for suspicious activity
MIT License
For issues and questions:
- Check the troubleshooting section
- Review Docker logs
- Create an issue in the repository