---
title: "Running Redis"
date: "2015-01-13"
category: "guides"
slug: "running-redis"
---

[Redis](http://redis.io/) is an advanced key-value cache and store with [high performance](http://redis.io/topics/benchmarks), similar to Memcached. It is available on [[determining-platform-version]] (v6+) without [[compiling-programs]] from source. Accounts with [[is-terminal-access-available]] are eligible to use Redis.

## Quickstart

From the [[accessing-terminal]], run:

```
redis-server --bind 127.0.0.1 --port PORT
```

Replace `PORT` with a [[listening-ports]] assigned to your account.

> **Note:** Binding to `127.0.0.1` restricts access to local traffic only. For CGI or [[setting-rails-passenger]] applications, you can use a UNIX socket instead: `--unixsocket /tmp/redis.sock` (omit `--bind` and `--port`).

## Configuring and Daemonizing

Create a configuration file named `redis.conf` in your home directory. Replace the port number with a [[listening-ports]] assigned to your account:

```
# Run as a background service
daemonize yes
pidfile ~/redis.pid

# Network settings (use your assigned port)
port 123
bind 127.0.0.1

# For high-performance local connections, uncomment
# these 2 lines and comment out port/bind above:
# unixsocket /tmp/redis.sock
# unixsocketperm 700

timeout 60
tcp-keepalive 30

# Logging
loglevel warning
logfile /tmp/redis.log

# Resource limits
maxclients 1000
maxmemory 128m
```

### Creating the File with Vim

1. Run `vim ~/redis.conf`
2. Press `i` to enter Insert mode
3. Paste the configuration (CTRL+V, Shift+INS, or your terminal's paste shortcut)
4. Press **Esc**
5. Type `:wq` and press Enter

Start Redis with the configuration file:

```
redis-server ~/redis.conf
```

### Starting on Server Boot

1. In the [[logging-into-the-control-panel]], navigate to **Dev** > **Task Scheduler**
2. Under **Command**, enter: `redis-server ~/redis.conf`
3. Under **Scheduling**, select **Server Start**
4. Click **Add**

## See Also

- Redis [documentation](http://redis.io/documentation)
- [The Little Redis Book](http://openmymind.net/2012/1/23/The-Little-Redis-Book/)
