- Docker — fastest start, no Java required, includes the SQL Client
- Local binary — run Flink directly on your OS, requires Java
- PyFlink — Python development with no separate cluster needed for local mode
Option A: Docker
Create the docker-compose.yml file
Create a file named
docker-compose.yml with the following content. It defines a JobManager, a TaskManager, and a SQL Client service:docker-compose.yml
Start the cluster
flink:latest image and starts the JobManager and TaskManager containers in the background.Verify the cluster is running
Open the Flink Web UI at http://localhost:8081. You should see the dashboard with one connected TaskManager and two available task slots.
If the UI is not available immediately, wait a few seconds for the containers to finish starting.
Start an interactive SQL session (optional)
exit; and press Enter to quit.Option B: Local installation
Prerequisites
Flink runs on all UNIX-like environments (Linux, macOS, Cygwin/WSL on Windows). You need Java 11, 17, or 21 installed. Verify your Java version:Download and extract Flink
Download the latest binary release from the Apache Flink downloads page and extract the archive:The extracted directory contains everything needed to run a local Flink cluster, including the
bin/, conf/, lib/, and examples/ directories.Start the cluster
Verify the cluster is running
Open the Flink Web UI at http://localhost:8081. The dashboard shows the connected TaskManagers and their available task slots.Alternatively, check that the processes are running:
Run an example job
Flink ships with built-in example programs in the The job reads a built-in text and counts word occurrences. When it completes, check the output in the TaskManager logs:You should see lines like:You can also view the completed job in the Web UI under Completed Jobs.
examples/ directory. Submit the streaming word count example:Start the SQL Client (optional)
To open an interactive SQL session against your running cluster:Type
exit; to quit the SQL Client.Option C: PyFlink
PyFlink lets you write Flink applications in Python using the Table API or DataStream API. During development, PyFlink runs in a local mini-cluster automatically — you do not need a separate Flink installation.Prerequisites
Create a virtual environment (recommended)
Install PyFlink
apache-flink package, which includes both the Python API bindings and the Flink runtime JARs.Verify the installation
Next steps
With a running cluster or PyFlink installed, choose a tutorial to continue:| Tutorial | Description | Requires |
|---|---|---|
| SQL Quickstart | Query streaming data interactively with SQL | Option A or B |
| Table API Quickstart | Build a streaming aggregation pipeline | Maven (Java) or Option C |
| DataStream API Quickstart | Build a stateful fraud detection system | Maven (Java) or Option C |

