Quickstart
This guide helps you set up Unleash in just a few minutes. The fastest way to get started is by using Docker. If Docker doesn't work for you, see other ways to try Unleash.
Set up Unleash with Docker
Start Unleash locally
To start Unleash locally, clone the Unleash repository and start the server with Docker Compose:
git clone git@github.com:Unleash/unleash.git
cd unleash
docker compose up -d
Log in to the Unleash Admin UI
In your browser, go to http://localhost:4242 and log in using the following credentials:
- username:
admin
- password:
unleash4all
Create your first flag
To create your first flag:
- Open the Default project.
- Click New feature flag.
- Enter a name, and click Create feature flag.
For more details on creating feature flags, see How to create a feature flag.
Connect an SDK
Next, use one of the client or server-side SDKs to connect Unleash with your application.
- Create an API token:
- For client-side SDKs, use a frontend token.
- For server-side SDKs, use a client token.
- Determine your Unleash URL:
- For client-side SDKs, use
<your-unleash-instance>/api/frontend
. - For server-side SDKs, use
<your-unleash-instance>/api
.
- For client-side SDKs, use
- Use the SDK to connect to Unleash in your application.
The following example shows how to use the JavaScript SDK and the Node.js SDK to connect to your Unleash instance:
- Connect a client-side SDK
- Connect a server-side SDK
import { UnleashClient } from "unleash-proxy-client";
const unleash = new UnleashClient({
url: "https://<your-unleash-instance>/api/frontend",
clientKey: "<your-token>",
appName: "<your-app-name>",
});
unleash.on("synchronized", () => {
// Unleash is ready to serve updated feature flags.
// Check a feature flag
if (unleash.isEnabled("some-flag")) {
// do cool new things when the flag is enabled
}
});
const { initialize } = require("unleash-client");
const unleash = initialize({
url: "https://<your-unleash-instance>/api/",
appName: "<your-app-name>",
customHeaders: {
Authorization: "<your-token>",
},
});
unleash.on("synchronized", () => {
// Unleash is ready to serve updated feature flags.
if (unleash.isEnabled("some-flag")) {
// do cool new things when the flag is enabled
}
});
Other ways to try Unleash
Unleash demo instance
You can also use the Unleash demo instance to test different use cases before setting up your own instance. The demo instance is available at https://app.unleash-hosted.com/demo/
.
To run tests on this instance, use the following API URLs and keys:
- Client-side:
- API URL:
https://app.unleash-hosted.com/demo/api/frontend
- Frontend key:
demo-app:default.bf8d2a449a025d1715a28f218dd66a40ef4dcc97b661398f7e05ba67
- API URL:
- Server-side:
- API URL:
https://app.unleash-hosted.com/demo/api
- Client key:
56907a2fa53c1d16101d509a10b78e36190b0f918d9f122d
- API URL:
To test the credentials and retrieve feature flags, run this command:
curl https://app.unleash-hosted.com/demo/api/client/features \
-H "Authorization: 56907a2fa53c1d16101d509a10b78e36190b0f918d9f122d"
Other local setup options
For other ways to get started locally, see the steps for starting an Unleash server.
Hosting Unleash
Hosted by Unleash
With our Pro and Enterprise plans, you can run Unleash in the cloud by using our hosted offerings.
Self-hosted
Self-hosting Unleash is available for Open-Source and Enterprise customers. Visit Self-hosting Unleash to learn more.
Next steps
Check out our reference documentation that explains all core concepts you need to get the most out of Unleash.
Explore feature flag best practices and language-specific tutorials in our developer guides.