Danbooru is a taggable image board written in Rails 5.
Ruby HTML PLpgSQL JavaScript CSS
Switch branches/tags
staging-2018.08.15-231306-utc staging-2018.08.05-045909-utc staging-2018.08.05-045627-utc staging-2018.08.05-045236-utc staging-2018.08.05-045014-utc staging-2018.08.05-044032-utc staging-2018.08.05-043036-utc staging-2018.08.05-041317-utc staging-2018.08.05-001507-utc staging-2018.08.03-230559-utc staging-2018.08.02-000018-utc staging-2018.08.01-223606-utc staging-2018.08.01-222825-utc staging-2018.07.31-234622-utc staging-2018.07.28-212745-utc staging-2018.07.27-222530-utc staging-2018.07.24-221951-utc staging-2018.07.24-215450-utc staging-2018.07.18-200301-utc staging-2018.07.18-195615-utc staging-2018.07.18-184148-utc staging-2018.07.10-235123-utc staging-2018.07.10-221336-utc staging-2018.07.06-212739-utc staging-2018.07.06-190407-utc staging-2018.06.24-001246-utc staging-2018.06.23-190415-utc staging-2018.06.23-190235-utc staging-2018.06.22-233243-utc staging-2018.06.22-233101-utc staging-2018.06.22-232939-utc staging-2018.06.22-231143-utc staging-2018.06.22-230435-utc staging-2018.06.22-225749-utc staging-2018.06.22-225700-utc staging-2018.06.22-214245-utc staging-2018.06.22-191332-utc staging-2018.06.21-234855-utc staging-2018.06.21-214857-utc staging-2018.06.20-235146-utc staging-2018.06.20-234110-utc staging-2018.06.20-232651-utc staging-2018.06.20-231219-utc staging-2018.06.20-230849-utc staging-2018.06.20-230141-utc staging-2018.06.20-225645-utc staging-2018.06.20-225325-utc staging-2018.06.20-185429-utc staging-2018.06.19-230202-utc staging-2018.06.19-225017-utc staging-2018.06.19-000153-utc staging-2018.06.18-192346-utc staging-2018.06.15-215701-utc staging-2018.06.15-005329-utc staging-2018.06.13-201500-utc staging-2018.06.13-175641-utc staging-2018.06.06-215618-utc staging-2018.05.24-220829-utc staging-2018.05.23-003312-utc staging-2018.05.17-165540-utc staging-2018.05.10-001127-utc staging-2018.04.30-183628-utc staging-2018.04.30-183025-utc staging-2018.04.30-175903-utc staging-2018.04.28-190711-utc staging-2018.04.28-003501-utc staging-2018.04.26-230106-utc staging-2018.04.26-185503-utc staging-2018.04.25-172612-utc staging-2018.04.17-233342-utc staging-2018.04.11-184136-utc staging-2018.04.03-182407-utc staging-2018.03.29-170057-utc staging-2018.03.29-002423-utc staging-2018.03.10-202424-utc staging-2018.01.30-201923-utc staging-2018.01.30-200532-utc staging-2018.01.18-222652-utc staging-2018.01.18-205255-utc staging-2018.01.18-204804-utc staging-2018.01.02-203936-utc staging-2017.12.28-003216-utc staging-2017.12.26-190855-utc staging-2017.12.21-013657-utc staging-2017.11.17-220823-utc staging-2017.11.13-225347-utc staging-2017.11.13-225104-utc staging-2017.11.13-224745-utc staging-2017.11.13-222634-utc staging-2017.11.07-200724-utc staging-2017.10.11-200449-utc staging-2017.10.11-195732-utc staging-2017.10.11-194404-utc staging-2017.10.11-194157-utc staging-2017.10.11-192952-utc staging-2017.10.11-192452-utc staging-2017.10.11-191345-utc staging-2017.10.11-185544-utc staging-2017.10.11-184845-utc staging-2017.10.11-184659-utc
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.circleci split tests by timings for circleci [skip ci] May 15, 2018
app posts/show: fix flash message when faving/unfaving posts. Aug 16, 2018
bin Expire unused aliases and implications after 2 years of inactivity Aug 1, 2018
config more consistent behavior of CurrentUser.root_url Aug 15, 2018
db Add alt_source field on uploads to deal with twitter galleries Aug 4, 2018
doc fixes #3320 Oct 9, 2017
lib fix base dir for image distribute rake task Apr 12, 2018
public Added Twitter widget Aug 4, 2018
script add mock recommender service for development, add user-context recomm… Jul 21, 2018
test Fix #3813: Favorite limit can be bypassed. Aug 12, 2018
tmp added approval step for aliases/implications Oct 23, 2011
.babelrc Migrate assets to use Webpacker Jul 27, 2018
.env Recommend posts on /posts/show based on voting patterns Jul 20, 2018
.eslintrc.yml Add eslint support. Aug 5, 2018
.gitignore Migrate assets to use Webpacker Jul 27, 2018
.postcssrc.yml Migrate assets to use Webpacker Jul 27, 2018
.ruby-version upgrade to ruby 2.5.1 Mar 29, 2018
Capfile move newrelic + deploytags gem to production env, rename cap tasks to… Dec 6, 2016
Gemfile update readme, remove sprockets gem Aug 1, 2018
Gemfile.lock update readme, remove sprockets gem Aug 1, 2018
INSTALL.debian fixes #3648 Apr 17, 2018
LICENSE Create LICENSE Jun 29, 2013
Procfile add mock recommender service for development, add user-context recomm… Jul 21, 2018
README.md remove similar users report Aug 4, 2018
Rakefile fixes #2133 Apr 17, 2014
config.ru fixes #3512 Jan 30, 2018
package.json Add eslint support. Aug 5, 2018
yarn.lock Add eslint support. Aug 5, 2018



It is recommended that you install Danbooru on a Debian-based system since most of the required packages are available on APT. Danbooru has been successfully installed on Fedora, CentOS, FreeBSD, and OS X. The INSTALL.debian install script is straightforward and should be simple to adapt for other platforms.

For best performance, you will need at least 256MB of RAM for PostgreSQL and Rails. The memory requirement will grow as your database gets bigger.

On production Danbooru uses PostgreSQL 9.4, but any 9.x release should work.

Use your operating system's package management system whenever possible. This will simplify the process of installing init scripts, which will not always happen when compiling from source.


These instructions won't work for everyone. If your setup is not working, here are the steps I usually recommend to people:

  1. Test the database. Make sure you can connect to it using psql. Make sure the tables exist. If this fails, you need to work on correctly installing PostgreSQL, importing the initial schema, and running the migrations.

  2. Test the Rails database connection by using rails console. Run Post.count to make sure Rails can connect to the database. If this fails, you need to make sure your Danbooru configuration files are correct.

  3. Test Nginx to make sure it's working correctly. You may need to debug your Nginx configuration file.

  4. Check all log files.


Danbooru employs numerous external services to delegate some functionality.

For development purposes, you can just run mocked version of these services. They're available in scrtip/mock_services and can be started automatically using Foreman and the provided Procfile.

Amazon Web Services

In order to enable the following features, you will need an AWS SQS account:

  • Pool versions
  • Post versions
  • IQDB
  • Saved searches
  • Related tags

Google APIs

The following features requires a Google API account:

  • Bulk revert
  • Post versions report

IQDB Service

IQDB integration is delegated to the IQDBS service.

Listbooru Service

In order to access saved search functionality you will need to install and configure the Listbooru service.

Archive Service

In order to access versioned data for pools and posts you will need to install and configure the Archives service.

Reportbooru Service

The following features are delegated to the Reportbooru service:

  • Related tags
  • Missed searches report
  • Popular searches report
  • Favorite searches
  • Upload trend graphs

Recommender Service

Post recommendations require the Recommender service.

Cropped Thumbnails

There's optional support for cropped thumbnails. This relies on installing libvips-8.6 or higher and setting Danbooru.config.enable_image_cropping to true.