All Projects → krisives → cronnit.com

krisives / cronnit.com

Licence: MIT license
A free tool for scheduling posts to Reddit.

Programming Languages

HTML
75241 projects
PHP
23972 projects - #3 most used programming language
shell
77523 projects
ruby
36898 projects - #4 most used programming language
javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to cronnit.com

crypto-subreddits-cli
👽 Track Cryptocurrency Subreddits On The Command Line 👽
Stars: ✭ 24 (+700%)
Mutual labels:  reddit, reddit-bot, reddit-api
reddit-comment-bot
Reddit bot that auto replies to comments on set subreddits
Stars: ✭ 59 (+1866.67%)
Mutual labels:  reddit, reddit-bot, reddit-api
Reddit Bot
🤖 Making a Reddit Bot using Python, Heroku and Heroku Postgres.
Stars: ✭ 99 (+3200%)
Mutual labels:  reddit, reddit-api
Unim.press
A Reddit front-page reader in the style of The New York Times.
Stars: ✭ 199 (+6533.33%)
Mutual labels:  reddit, reddit-api
Praw
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.
Stars: ✭ 2,675 (+89066.67%)
Mutual labels:  reddit, reddit-api
Snoo
A Reddit command line client written in Node.js, using modern ES-features
Stars: ✭ 39 (+1200%)
Mutual labels:  reddit, reddit-api
Psraw
PowerShell Reddit API Wrapper
Stars: ✭ 42 (+1300%)
Mutual labels:  reddit, reddit-api
Mvvm Reddit
A companion project for our blog post on better Android software development using MVVM with RxJava.
Stars: ✭ 106 (+3433.33%)
Mutual labels:  reddit, reddit-api
reddit-image-fetcher
A JavaScript package for fetching reddit images, memes, wallpapers and more.
Stars: ✭ 40 (+1233.33%)
Mutual labels:  reddit, reddit-api
Reddit-Bot-List
⚡️🤖 A list of Reddit bots
Stars: ✭ 21 (+600%)
Mutual labels:  reddit, reddit-bot
context-mod
an event-based, reddit moderation bot built on top of snoowrap and written in typescript
Stars: ✭ 38 (+1166.67%)
Mutual labels:  reddit, reddit-bot
Redditbot
Discord bot for reddit.com
Stars: ✭ 17 (+466.67%)
Mutual labels:  reddit, reddit-api
Shreddit
Remove your comment history on Reddit as deleting an account does not do so.
Stars: ✭ 669 (+22200%)
Mutual labels:  reddit, reddit-api
Reddsaver
CLI tool to download saved and upvoted media from Reddit
Stars: ✭ 76 (+2433.33%)
Mutual labels:  reddit, reddit-api
Social Amnesia
Forget the past. Social Amnesia makes sure your social media accounts only show your posts from recent history, not from "that phase" 5 years ago.
Stars: ✭ 656 (+21766.67%)
Mutual labels:  reddit, reddit-api
Jraw
The Java Reddit API Wrapper
Stars: ✭ 320 (+10566.67%)
Mutual labels:  reddit, reddit-api
saveddit
Bulk Downloader for Reddit
Stars: ✭ 130 (+4233.33%)
Mutual labels:  reddit, reddit-api
PlayStoreLinks Bot
A Reddit Bot that links to Android Apps when requested.
Stars: ✭ 91 (+2933.33%)
Mutual labels:  reddit, reddit-bot
node-express-reddit-clone
Build a Node, Express and MySQL-based clone of Reddit for DecodeMTL web development bootcamp
Stars: ✭ 28 (+833.33%)
Mutual labels:  reddit, reddit-api
roux
Simple and (a)synchronous Reddit API wrapper for Rust.
Stars: ✭ 41 (+1266.67%)
Mutual labels:  reddit, reddit-api

Cronnit

A free service for making scheduled posts to Reddit. It's available at https://cronnit.com or you can download the code and host it yourself!

Installation

Quick Install

If you have a fresh server you can run the install script:

wget https://raw.githubusercontent.com/krisives/cronnit.com/master/install.sh
nano install.sh # Enter your hostname, client_id, etc.
chmod +x install.sh
sudo ./install.sh

This will:

  • Install all the packages needed for Apache, MySQL, PHP, etc.
  • Create a 2GB swapfile to ensure the server doesn't run out of memory
  • Create the Linux user cronnit
  • Create a cronnit MySQL database
  • Create a cronnit MySQL user (with a secure random 30 character password)
  • Grant permissions for cronnit to use the database
  • Import the Cronnit SQL schema
  • Disable insecure Apache modules (mod_status, mod_userdir)
  • Acquire an SSL certificate from LetsEncrypt using certbot
  • Configure Apache to run Cronnit including the SSL certificate
  • Downloads the latest version of Cronnit from GitHub
  • Generates a config.php script for Cronnit
  • Installs all of the composer dependencies
  • Creates a CRON job to run the cron.sh script
  • Creates a CRON job to update from GitHub every day
  • Configures the system to install security updates automatically

Before running the script you should ensure the DNS record for your domain name point to the IP running this server.

For client_id and client_secret you will need to create a Reddit app using a redirect URI of https://example.com/authorize ensure you are using https:// in the URI.

You can skip using https:// and certbot if you want by running the script with the HTTP_ONLY environment variable set:

sudo HTTP_ONLY=1 ./install.sh

Development Server

If you want to run Cronnit using the PHP development server:

sudo apt install php-cli php-sqlite3 composer
git clone [email protected]:/krisives/cronnit.com.git
cd cronnit
composer update
cp config.php.example config.php
nano config.php
cd public_html/
php -S localhost:8080

Configuring Reddit Application for Dev Server

If you're running cronnit via the PHP development server, it's likely slightly simpler than a full-fledged server.

For the configuration (certbot, etc), if you're not keen to set this up, (or your server isn't actually public facing) you can get away with running via http, by specifying http urls (rather than https) in config.php and your reddit app's redirect uri.

  • Set up a reddit application for oauth:
    • From https://www.reddit.com/prefs/apps
      • Create an app, it should be a web-app.
        • Name it whatever.
        • For the redirect URI, choose the exact same address and port as you specified in config.php, suffixed by /authorize.
          • If you're bringing up the dev server using vagrant, that should be: http://cronnit.local/authorize.
        • The about URL and description don't really matter.
    • The client_id should appear below your application name/to the right of the icon on the apps page.

Setting Up the Development Server on a fresh VM

Tested on:

vagrant 2.2.9
VirtualBox 6.1.6 r137129

(In my experience) VirtualBox >= 6.1.8 seems to hang on vagrant up. See this ticket

  • Install vagrant and VirtualBox 6.1.6

  • Install the vagrant-hostmanager & vagrant-env plugins

    vagrant plugin install vagrant-hostmanager 
    vagrant plugin install vagrant-env
  • Configure a .env configuration file:

    vim .env
    CRONNIT_CLIENT_ID=<client_id>
    CRONNIT_CLIENT_SECRET=<client_secret>
    CRONNIT_EMAIL=<email to use for letsencrypt>
    LOCAL_MIRROR_SUBDOMAIN=<optional subdomain for ubuntu package repositories>
    • <client_id> & <client_secret> are those obtained from your reddit app.
  • From within this project (where the vagrantfile lives):

    • install the vm with:
      vagrant up
    • Log into the vm with:
      vagrant ssh
      You should find yourself logged in as cronnit@ubuntu-focal.

You should be able to access the server by navigating to cronnit.local in your browser.

Donate

If you find Cronnit useful as a tool or source please consider making a donation!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].