A free tool for scheduling posts to Reddit.
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!
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:
cronnit
cronnit
MySQL databasecronnit
MySQL user (with a secure random 30 character password)cronnit
to use the databasemod_status
, mod_userdir
)certbot
config.php
script for Cronnitcron.sh
scriptBefore 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
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
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.
config.php
, suffixed by /authorize
.
vagrant
, that should be:
http://cronnit.local/authorize
.client_id
should appear below your application name/to the right of
the icon on the apps page.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):
vagrant up
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.
If you find Cronnit useful as a tool or source please consider making a donation!