Skip to main content
Docker deployment is the easiest and fastest way to run Spoo.me locally. Everything you need—MongoDB, Redis, and the application—runs together with a single command. No complex setup required!
What’s Included: Docker Compose automatically sets up MongoDB, Redis, and the Spoo.me application in isolated containers. You don’t need to install or configure databases separately.

Prerequisites

All you need:
  • Docker and Docker Compose installed on your system
  • That’s it! MongoDB and Redis are automatically included

Installing Docker

Download and install Docker Desktop from docker.com, or use Homebrew:
Start Docker Desktop and verify:

Quick Start - Get Running in 4 Steps

1

Clone the Repository

2

Create .env File

That’s it! The default .env.example works out of the box. MongoDB and Redis are automatically configured by Docker.
If you want v1 API features (user authentication, URL management, API keys), you can optionally configure:You can skip these and add them later—basic URL shortening works without them!
3

Start Docker Compose

This single command starts everything:
  • MongoDB database
  • Redis cache
  • Spoo.me application
First run takes 3-5 minutes to download images and build. Subsequent starts take only seconds!
4

Access Your Instance

Open your browser and visit:http://localhost:8000
Try shortening a URL to verify everything works!

What Just Happened?

Docker Compose automatically:
  • ✅ Created a MongoDB database container
  • ✅ Created a Redis cache container
  • ✅ Built the Spoo.me application container
  • ✅ Connected everything together
  • ✅ Persisted your data in Docker volumes
No manual database setup, no configuration files, no complex installation steps!

Production Deployment

Want to deploy to a production server with a domain? Just a few small changes:
1

Use Cloud Database (Recommended)

For production, use a managed database instead of local containers:In your .env file:
Using MongoDB Atlas (free tier available) gives you automatic backups, better performance, and no maintenance hassle.
2

Update Docker Compose for Production

Modify docker-compose.yml to remove local database containers:
3

Add Reverse Proxy (Optional)

For custom domains and SSL, add Nginx:
Basic nginx.conf:
Use Certbot to get free SSL certificates:
Update your nginx config to handle HTTPS and redirect HTTP to HTTPS.

Common Commands

Start Services

Starts all containers in the background

Stop Services

Stops and removes containers (data persists in volumes)

View Logs

Follow logs in real-time for all services

Restart

Restart all containers

More Useful Commands

Accessing Containers

Troubleshooting

Error: Cannot start service app: Ports are not available: port is already allocatedSolution: Another service is using port 8000. Either stop that service or change the port:
Cause: Usually a configuration error in .envSolution: Check logs for the specific container:
Common issues:
  • Invalid MongoDB URI format
  • Missing required environment variables
  • Docker resource limits too low
For local Docker setup: This shouldn’t happen! The containers are auto-configured.For production with cloud databases:
  • Verify your MONGODB_URI in .env is correct
  • Check firewall rules allow connections
  • Ensure IP whitelist includes your server IP
Error: Cannot connect to the Docker daemonSolution:

Why Docker is the Best Option

Zero Configuration: MongoDB and Redis work instantly, no setup needed Everything Bundled: One command installs the complete stack Consistent Environment: Works the same on any OS (macOS, Linux, Windows) Easy Updates: git pull && docker-compose up -d --build Data Persistence: Your URLs and data survive container restarts Clean Uninstall: Remove everything with docker-compose down -v

Next Steps

Enable Authentication

Add OAuth login for v1 API features

Local Development

Set up for code customization and development

Cloud Deployment

Deploy to production with managed databases

Create Webhooks

Get notifications for contact forms and reports