Skip to content
This repository has been archived by the owner on Mar 19, 2019. It is now read-only.


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?


Failed to load latest commit information.
Latest commit message
Commit time


Official Site Latest version Build status

This repo will add a Google Firebase storage support to Hangfire - fire-and-forget, delayed and recurring tasks runner for .NET. Scalable and reliable background job runner. Supports multiple servers, CPU and I/O intensive, long-running and short-running jobs.


Hangfire.Firebase is available as a NuGet package. Install it using the NuGet Package Console window:

PM> Install-Package Hangfire.Firebase


Use one the following ways to initialize FirebaseStorage

GlobalConfiguration.Configuration.UseFirebaseStorage("<url>", "<authSecret>");

Firebase.FirebaseStorage firebaseStorage = new Firebase.FirebaseStorage("<url>", "<authSecret>");

// customize any options
Firebase.FirebaseStorageOptions firebaseOptions = new Firebase.FirebaseStorageOptions
    Queues = new[] { "default", "critical" },
    RequestTimeout = System.TimeSpan.FromSeconds(30),
    ExpirationCheckInterval = TimeSpan.FromMinutes(15),
    CountersAggregateInterval = TimeSpan.FromMinutes(1),
    QueuePollInterval = TimeSpan.FromSeconds(2)
Firebase.FirebaseStorage firebaseStorage = new Firebase.FirebaseStorage("<url>", "<authSecret>", firebaseOptions);

Firebase Rule Setup

Under the Firebase database, please update the json so .indexOn is aviable for query. Note hangfire is the parent node. If you had additional queue, repeat the .indexOn for the queue.

  "rules": {
    "hangfire": {
      "servers": {
        ".indexOn": [ "_id", "server_id" ]
      "queue": {
        "default": {
          ".indexOn": [ "_id", "server_id" ]
        "critical": {
          ".indexOn": [ "_id", "server_id" ]
      "jobs": {
        ".indexOn": [ "_id", "server_id", "state_name" ]
      "sets": {
        ".indexOn": [ "key" ]
       "lists": {
        ".indexOn": [ "key" ]
    ".read": "auth != null",
    ".write": "auth != null"


Open-source project are developing more smoothly, when all discussions are held in public.

If you have any questions or problems related to Hangfire.Firebase itself or this storage implementation or want to discuss new features, please create under issues and assign the correct label for discussion.

If you've discovered a bug, please report it to the GitHub Issues. Detailed reports with stack traces, actual and expected behavours are welcome.