This repository is a fork of the original reddit codebase updated for modern systems. Highlights:
- Python: Upgraded to Python 3 (tested with Python 3.12).
- Platform: Targeted for Ubuntu 24.04 (noble).
- Compatibility: Includes compatibility shims and updated install/build scripts to work with current packaging and system tooling.
This fork is intended for local development and experimentation. For the original upstream project and documentation refer to the upstream repository.
The following steps produce a development-ready environment on Ubuntu 24.04.
- Create the runtime user (adjust
redditas needed):
useradd -m -s /bin/bash reddit- Clone the repository:
git clone https://github.com/acalcutt/reddit.git /opt/reddit
cd /opt/reddit- Run the installer as root, specifying the user and domain:
REDDIT_USER=reddit REDDIT_DOMAIN=reddit.local ./install-reddit.shThe installer will handle system dependencies, Python virtual environment setup, database configuration, and service installation. A Python venv is created at /home/reddit/venv.
- Add the domain to your hosts file (on the host machine if using a VM):
echo "127.0.0.1 reddit.local" >> /etc/hostsYou can customize the install by setting environment variables:
| Variable | Default | Description |
|---|---|---|
REDDIT_USER |
(required) | User to run reddit as |
REDDIT_DOMAIN |
reddit.local |
Domain for the site (must contain a dot) |
REDDIT_HOME |
/home/$REDDIT_USER |
Base directory for install |
REDDIT_VENV |
/home/$REDDIT_USER/venv |
Python virtual environment location |
REDDIT_PLUGINS |
about gold |
Plugins to install |
- If you encounter locale errors when creating the Postgres DB, run:
localedef -i en_US -f UTF-8 en_US.UTF-8 - The domain must contain a dot (e.g.,
reddit.local) as browsers don't support cookies for dotless domains.