LuaRocks is the package manager for Lua modules.

It allows you to create and install Lua modules as self-contained packages called rocks. You can download and install LuaRocks on Unix and Windows. Get started

LuaRocks is free software and uses the same license as Lua.

Recent Modules

(View all) (Recent versions)
  • lua-gdpr-iab-tcfv2 by peczenyj — downloads: 1
    A high-performance, zero-dependency, version-agnostic Lua parser and validator for IAB TCF v2.x.
  • matchigo-lua by SUP2Ak — downloads: 0
    Pattern matching for Lua — composable P.* primitives, optional Rust-style DSL, compiled dispatcher.
  • lua-resty-ctx by hanada — downloads: 6
    Share ngx.ctx between subrequests in OpenResty
  • lua-resty-m3u8 by hanada — downloads: 8
    HLS M3U8 playlist parser and serializer for OpenResty
  • aistemsplitter by codeugar — downloads: 2
    Official Lua SDK for the AIStemSplitter public API.

Most Downloaded

(This week)

View Modules by Labels

audio, authentication, awesome, aws, base-n, batteries, bitwise, commandline, compression, crypto, database, datastructure, dbus, debug, dns, doc, email, event, feed, ffi, filesystem, game, git, gui, haml, html, http, i18n, image, ini, irc, jit, json, kong, lapis, lint, linux, logs, love, lpeg, markdown, math, messagepack, metalua, midi, mjolnir, moonscript, mpi, neovim, network, nginx, object, openresty, posix, redis, regexp, rocks, search, security, serialization, spreadsheet, statemachine, strict, template, test, threads, time, torch, unicode, vim, web, wiki, windows, wsapi, xml, yaml, zeromq

Daily Module Downloads

(More graphs & stats)

Quick Start

Installing LuaRocks in a Unix system:

$ wget https://luarocks.org/releases/luarocks-3.13.0.tar.gz
$ tar zxpf luarocks-3.13.0.tar.gz
$ cd luarocks-3.13.0
$ ./configure && make && sudo make install
$ sudo luarocks install luasocket
$ lua
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
> require "socket"

On Windows? Installation instructions for Windows.

Contributing Modules

Anyone can upload and host Lua modules.

Register an account and upload a .rockspec to create a new module. If your module name is not taken it will be added to the root manifest.

After you have uploaded a .rockspec, you can upload .rock files for a specific version by going to the version’s page. Rock files ensure that your module will be installable as long as this site is up.

The most recent version of LuaRocks supports uploading modules with the upload command:

$ luarocks upload my_thing-1.0-1.rockspec

For older LuaRocks installations, you can use moonrocks:

$ luarocks install moonrocks
$ moonrocks upload my_thing-1.0-1.rockspec

Read more on the About Page.