A very fast & simple Ruby web server

Language: Ruby

Keywords: rack, rails, ruby, server, thin, web-server


A small and fast Ruby web server


gem install thin

Or add thin to your Gemfile:

gem 'thin'


A +thin+ script offers an easy way to start your Rack application:

thin start

Browse the example directory for sample applications.

Usage with Rails Action Cable

To use Thin with Action Cable, add the following to your Gemfile:

gem 'faye-websocket'
gem 'thin' # If not already done

Create a config/initializers/thin_action_cable.rb:

Rails.application.config.action_cable.use_faye = true
Faye::WebSocket.load_adapter 'thin'


Use a rackup ( file and bind to localhost port 8080:

thin -R -a -p 8080 start

Store the server process ID, log to a file and daemonize:

thin -p 9292 -P tmp/pids/ -l logs/thin.log -d start

Thin is quite flexible in that many options can be specified at the command line (see thin -h for more).

Configuration files

You can create a configuration file using thin config -C config/thin.yml.

You can then use it with all commands, such as: thin start -C config/thin.yml.

Here is an example config file:

user: www-data
group: www-data
pid: tmp/pids/
timeout: 30
wait: 30
log: log/thin.log
max_conns: 1024
require: []
environment: production
max_persistent_conns: 512
servers: 1
threaded: true
no-epoll: true
daemonize: true
socket: tmp/sockets/thin.sock
chdir: /path/to/your/apps/root
tag: a-name-to-show-up-in-ps aux


Ruby License,


The parser was originally from Mongrel by Zed Shaw. Mongrel is copyright 2007 Zed A. Shaw and contributors. It is licensed under the Ruby license and the GPL2.

Thin is copyright Marc-Andre Cournoyer

Get help at Report bugs at and major security issues directly to me at

Project Statistics

Sourcerank 18
Repository Size 1.8 MB
Stars 1,988
Forks 303
Watchers 65
Open issues 101
Dependencies 5
Contributors 81
Tags 36
Last updated
Last pushed

Top Contributors See all

Marc-André Cournoyer James Tucker Kevin Williams Michael Klishin Aman Gupta Marek Goldmann Prem Sichanugrist Mark Bates Matt Todd Joshua Peek Alex Robert McLeod Chris Cherry Glenn Rempe Steven Parkes Michal Kwiatkowski Greg Hurrell Vít Ondruch Jesse Cooke Richard Schneeman

Packages Referencing this Repo

A thin and fast web server
Latest release 1.7.2 - Updated - 1.99K stars

Recent Tags See all

v1.7.2 July 08, 2017
v1.7.1 June 13, 2017
v1.7.0 May 27, 2016
v1.6.4 September 19, 2015
v1.6.3 October 02, 2014
v1.6.2 March 04, 2014
v1.6.1 October 31, 2013
v1.6.0 October 02, 2013
v1.5.1 March 18, 2013
v2.0.0.pre September 21, 2012
v1.5.0 September 19, 2012
v1.4.1 July 03, 2012
v1.4.0 July 03, 2012
v1.3.1 November 14, 2011
v1.3.0 November 12, 2011

Interesting Forks See all

my experimental and patch branches for thin
Ruby - MIT - Last pushed - 17 stars - 2 forks
A very fast & simple Ruby web server
Ruby - MIT - Updated - 3 stars - 1 forks
A very fast & simple Ruby web server
Ruby - Last pushed - 3 stars - 2 forks
A very fast & simple Ruby web server
Ruby - MIT - Updated - 3 stars - 1 forks
A very fast & simple Ruby web server
Ruby - MIT - Last pushed - 3 stars

Something wrong with this page? Make a suggestion

Last synced: 2017-07-08 14:22:33 UTC

Login to resync this repository