Hangfire Server on Linux


My organisation is currently trying to step from the ASP.NET Web API 2 in Windows to .NET Core in Linux.
We currently have a ASP.NET MVC application which hosts a Hangfire dashboard and several Windows Services which all host a Hangfire Server.

I was wondering, is there anyone who currently have experience with developing an application which should have Hangfire Servers on Linux? I’m wondering if there is a possibility the Hangfire Server could be hosted as a Linux service or something.

I’m running Hangfire with ASP.NET Core 2 on Linux for half a year already. Not without issues though :slight_smile:

The first significant problem was storage selection. For the reason of running purely on Linux, I haven’t used MSSQL storage, and many other 3rd-party storages have troubles on their own, like faulty distributed lock implementations, or freezing the entire process after some time (I’ve tried MongoDB, MySQL, and PostgreSQL storages at that time). The only storage that worked reliably in my case was actually Redis, but it also had some issues (I’ve pushed a few pull requests for those, so the latest version is actually working okay).

The other problem with timezones may arise if you’re running some servers on Linux while the Dashboard and/or other servers are still on Windows.

But it actually works :slight_smile:

Hi @pieceofsummer, do you use premium hangfire or just use the free hangfire to use it in Linux OS?

Just a free one, with an open source Hangfire.Redis.StackExchange package for Redis storage.

Thanks for the info. Will try it.

are you building to linux containers ?

Nope, just to a VPS. But publishing to a container shouldn’t be much different.

@pieceofsummer can you elaborate what problems you had with MongoDb while on linux?