Gearman Job Server on Ubuntu 24.04 LTS
by cloudimg
Gearman Job Server on Ubuntu 24.04: a secure, closed-by-default distributed job queue
Gearman is a mature, language-agnostic job server that lets your application hand a unit of work to the server, distribute it to whichever worker process is free, and return the result to the caller. Workers can be written in a different language from the client, can run on a different machine, and can be added or removed while the system is running. This cloudimg image runs gearman-job-server 1.1.20 on Ubuntu 24.04 LTS from the signed Ubuntu archive, so the job server keeps receiving Ubuntu security updates on your running VM.
The problem this image solves: upstream Gearman has no authentication and no access control of any kind. Every client that can open a TCP connection to port 4730 can submit jobs, read the queue, and register itself as a worker for any function, including functions your own application defines. Stock packages happily bind that port to every interface, which turns an internet-reachable Gearman server into an open remote-execution surface.
Closed by default: this image binds the job protocol to the loopback address only, so nothing outside the instance can reach port 4730 until you deliberately change it. The recommended network security group opens SSH and the status console only, never port 4730. Two independent start guards enforce the binding: the job server will not start until first boot has provisioned this instance, and a start-time guard refuses to run against a world-open listen address. The build proves the job protocol refuses a connection on the instance's own routable address.
Durable on-box queue: background jobs are written to an on-instance persistent SQLite queue, so work accepted before a restart is replayed after it. Encrypted status console: a read-only console served over HTTPS shows live queue depth, registered functions, connected worker count and version, protected by basic authentication whose bcrypt password is generated uniquely for your instance on first boot. A separate unauthenticated health endpoint is provided for load balancer and monitoring probes.
Ready to use: the job server, the command line client and administration tools, and the status console are installed, wired together and managed by systemd. Client libraries exist for PHP, Perl, Python, Ruby, Java, Go, C and Node.js, so existing workers connect without code changes.
Gearman is distributed under the BSD 3-Clause License, free and open source with no per CPU or per deployment fee. cloudimg is not affiliated with or endorsed by the Gearman project. cloudimg provides the secure by default configuration, per instance credential and TLS automation, security patching, and 24/7 support with a guaranteed 24 hour response SLA.