Solutions
Device management
Remotely manage, and protect laptops and mobile devices.
Orchestration
Automate tasks across devices, from app installs to scripts.
Software management
Inventory, patch, and manage installed software.
Extend Fleet
Integrate your favorite tools with Fleet.
Customers
Fintech + Fleet
Fintech giant consolidates multiple tools with Fleet.
Foursquare + Fleet
Foursquare quickly migrates to Fleet for device management.
What people are saying
Stories from the Fleet community.
More
Kitzy
Kitzy
This guide walks you through deploying Fleet using Docker Compose. You'll have a Fleet instance running with MySQL and Redis in about 15 minutes.
Create a new directory for your Fleet deployment:
mkdir fleet-deployment
cd fleet-deploymentDownload the Docker Compose file and environment template:
curl -O https://raw.githubusercontent.com/fleetdm/fleet/refs/heads/main/docs/solutions/docker-compose/docker-compose.yml
curl -O https://raw.githubusercontent.com/fleetdm/fleet/refs/heads/main/docs/solutions/docker-compose/env.exampleCopy the env.example file
cp env.example .envGenerate a random server key with this command:
openssl rand -base64 32Open the .env file and update these required values, using the key you generated in the last step as your FLEET_SERVER_PRIVATE_KEY:
# Generate a secure password for MySQL root
MYSQL_ROOT_PASSWORD=your_secure_root_password
# Generate a secure password for the Fleet database user
MYSQL_PASSWORD=your_secure_fleet_password
# Generate Fleet's server key (this encrypts session tokens)
FLEET_SERVER_PRIVATE_KEY=your_random_32_char_base64_key_hereSave the changes to your .env file.
Fleet requires HTTPS for MDM enrollment. Choose the option that fits your setup:
Option 1: Reverse proxy or load balancer handles TLS (recommended for production)
If you're running Fleet behind a reverse proxy (nginx, Caddy, Traefik) or load balancer that terminates TLS, set this in your .env file:
FLEET_SERVER_TLS=falseYour reverse proxy handles HTTPS, and Fleet listens on HTTP internally. Skip to "Start Fleet" below.
Option 2: Fleet handles TLS directly
For testing or simple deployments where Fleet serves HTTPS directly, you'll need TLS certificates.
Create a directory for your certificates:
mkdir certsGenerate a self-signed certificate (valid for 365 days):
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout certs/fleet.key \
-out certs/fleet.crt \
-subj "/CN=localhost"For production with a custom domain, replace localhost with your domain name:
openssl req -x509 -nodes -days 365 -newkey rsa:2048 \
-keyout certs/fleet.key \
-out certs/fleet.crt \
-subj "/CN=fleet.example.com"For production deployments, replace the self-signed certificate with one from a trusted certificate authority (Let's Encrypt, DigiCert, etc.).
Set this in your .env file:
FLEET_SERVER_TLS=trueThe docker-compose.yml mounts your certificates from the ./certs directory automatically.
If you have a Fleet Premium license, add it to your .env file:
FLEET_LICENSE_KEY=your_license_key_hereLeave this blank to use Fleet's free tier.
Fleet can store software installers in S3-compatible storage. If you want to use this feature, update these values in your .env file:
FLEET_S3_SOFTWARE_INSTALLERS_BUCKET=your_bucket_name
FLEET_S3_SOFTWARE_INSTALLERS_ACCESS_KEY_ID=your_access_key
FLEET_S3_SOFTWARE_INSTALLERS_SECRET_ACCESS_KEY=your_secret_key
FLEET_S3_SOFTWARE_INSTALLERS_REGION=us-east-1For Minio or LocalStack, also set:
FLEET_S3_SOFTWARE_INSTALLERS_ENDPOINT_URL=http://your-minio-host:9000
FLEET_S3_SOFTWARE_INSTALLERS_FORCE_S3_PATH_STYLE=true
FLEET_S3_SOFTWARE_INSTALLERS_REGION=minioRun Docker Compose to start all services:
docker compose up -dDocker will download the images and start MySQL, Redis, and Fleet. This takes 2-3 minutes on the first run.
Check the status:
docker compose psAll services should show as "healthy" after about 30 seconds.
Open your browser and navigate to:
If using TLS (FLEET_SERVER_TLS=true):
https://localhost:1337If behind a reverse proxy (FLEET_SERVER_TLS=false):
http://localhost:1337If using a self-signed certificate, your browser will warn you about the connection. This is expected - click "Advanced" and proceed.
You'll see the Fleet setup screen. Follow the prompts to:
That's it! Fleet is running.
This deployment includes three services and one initialization container:
fleet-init is a one-time setup container that fixes volume permissions before Fleet starts. Fleet runs as a non-root user (UID 100) for security, but Docker creates volumes owned by root. This container runs once, sets the correct ownership, and exits. You'll see it listed as "Exited (0)" when you run docker compose ps -a.
MySQL stores all Fleet data (devices, policies, queries, users). The database persists in a Docker volume so your data survives restarts.
Redis handles background jobs and caching. Fleet uses this for scheduling tasks and improving performance.
Fleet is the main application. It serves the web UI, API, and handles device connections.
Devices connect to Fleet on ports 1337 and 8220. If you're running Fleet on a server, update your firewall to allow:
Check Fleet's logs if you run into issues:
docker compose logs fleetView MySQL or Redis logs:
docker compose logs mysql
docker compose logs redisPull the latest Fleet image:
docker compose pull fleet
docker compose up -d fleetFleet automatically runs database migrations on startup.
Stop all services:
docker compose downStop and remove all data (careful - this deletes everything):
docker compose down -vPermission denied errors on /logs
The docker-compose file includes an initialization container that automatically fixes volume permissions. If you still see errors like open /logs/osqueryd.status.log: permission denied, try:
docker compose down
docker compose up -dThis restarts the initialization process.
Fleet won't start
Check that all required environment variables are set in your .env file. The FLEET_SERVER_PRIVATE_KEY must be a valid base64 string.
Can't access the web UI
Verify Fleet is running:
docker compose ps fleetCheck that port 1337 isn't blocked by your firewall.
If using TLS, verify your certificates exist in the ./certs directory and are readable.
Certificate errors
If you see certificate-related errors in the logs, verify:
ls -l certs/Both fleet.crt and fleet.key should exist and be readable. If using Option 1 (reverse proxy), make sure FLEET_SERVER_TLS=false in your .env file.
Devices won't connect
Ensure ports 1337 and 8220 are accessible from your devices. Check your firewall and network configuration.
If using self-signed certificates, devices need the certificate installed or TLS verification disabled (not recommended for production).
This deployment works well for testing and small fleets. For production use with many devices:
See Fleet's Reference configuration strategies for production best practices.