-
Notifications
You must be signed in to change notification settings - Fork 0
FAQ
This has only been tested as working with the desktop image of Ubuntu 14.04, although it should work on Ubuntu 14.04 server image. However, a newer/older version of Ubuntu, or another Debian-based distribution will likely result in errors and not work. Using a non-Debian-based distribution will not work at all unless you figure out a way to install the correct version of all of the dependencies with that distribution.
Go to where your DNS records are managed, whether that's a DNS hosting service like Cloudflare or your domain registrar's DNS hosting service. Remove any existing A records with the value @
, and setup a new A record pointing the value @
to the IP address where your paleocons.com instance is being hosted.
- Type
sudo nano /etc/hosts
- Remove the line stating
127.0.0.1 reddit.local
if such a line is present. - Add a line stating
127.0.0.1
hit TAB and then addYOURDOMAIN.TLD
Replace YOURDOMAIN.TLD with whatever your domain name is.
- Go to the reddit/r2 directory. You can get here by running
cd $REDDIT_HOME/src/reddit/r2
- Type
nano development.update
- There should be a line stating
domain = reddit.local
replace this with your domain name. - There should also be a line stating
oauth_domain = reddit.local
replace this with your domain name. - Click Ctrl+X and then Y.
- After you have completed these steps, run either
make all
ormake ini
from the r2 directory.
The most likely culprit for this is that your https_endpoint
value is pointing to reddit.local
while you are trying to access the website from a real domain name.
An easy way to verify this is the problem is to open your web browser's console and see if the login/register link being shown with the error begins with reddit.local
.
If you have verified this is the problem, or at least suspect it is, fixing it is very simple. Go through the following steps.
- Go to the project's /r2 directory. This can be done by executing
cd $REDDIT_HOME/src/reddit/r2/
- Type
nano development.update
- Under
[DEFAULT]
add a line statinghttps_endpoint = YOURDOMAIN.TLD
replace YOURDOMAIN.TLD with whatever your domain name is. - Click Ctrl+X and then Y.
- Remaining in the reddit/r2 directory, type
make all
and wait for that process to complete. - The issue should now be resolved.
This generally means that your default subreddit, the default_sr
value, is not pointing to a subreddit which exists. Generally, default_sr
is set to frontpage
. If this is the case, either create the appropriate subreddit manually, add a default_sr = EXISTINGSUBREDDIT
line to $REDDITHOME/src/reddit/r2/development.update
and run make all
or create a subreddit named 'frontpage.' It is shown in the install guide how to create subreddits/spaces.
Replace EXISTINGSUBREDDIT with an existing subreddit.
How do I set default subreddits? (These are the subreddits that display in the top bar, and ones users automatically are subscribed to.)
Make sure to replace name1, name2, and name3 with appropriate subreddit names. You can add more or less than 3 default subreddits as well.
- Type
reddit-shell
and then the following... -
from r2.models import Subreddit, LocalizedDefaultSubreddits
click ENTER -
srs = [Subreddit._by_name(name) for name in ["name1", "name2", "name3"]]
click ENTER -
LocalizedDefaultSubreddits.set_global_srs(srs)
click ENTER - Type
exit()
click ENTER - Execute
sudo start reddit-job-update_reddits
- Run
cd $REDDIT_HOME/src/reddit/r2
. - Type
nano development.update
- Go to the very end of the file and hit enter a few times.
- Add
[live_config]
like how there is a section labeled as[DEFAULT]
- Directly below
[live_config]
addemployees = %(system_user)s:admin, user1:admin, user2:admin
Replace user1 and user2 with the appropriate account names. Again, you may add more or less than 2 accounts.
There are two things you should do if this is the case.
- Type
sudo nano /etc/hosts
- Remove the line stating
127.0.0.1 reddit.local
if such a line is present. - Add a line stating
127.0.0.1
hit TAB and then addYOURDOMAIN.TLD
Replace YOURDOMAIN.TLD with whatever your domain name is.
- Go to the reddit/r2 directory. You can get here by running
cd $REDDIT_HOME/src/reddit/r2
- Type
nano development.update
- There should be a line stating
domain = reddit.local
replace this with your domain name. - There should also be a line stating
oauth_domain = reddit.local
replace this with your domain name. - After you have completed these steps, run
cd $REDDIT_HOME/src/reddit/r2
and then run eithermake all
ormake ini
Make sure that you have the domain set up as a real domain name or reddit.local. http://localhost will never work for cookies and http://127.0.0.1 can have problems as well.
Run sudo start reddit-job-update_reddits
to automatically run the necessary cron job. If this doesn't work, clear cache on your web browser and also run sudo reddit-restart
from your server.
By default, paleocons.com removes the html file for the top bar from the base code. This can be re-added by downloading the reddit open source project, navigating to r2/r2/templates
and copying the infobar.html
file over to the corresponding directory
If you've done this and it is still not showing up...
The domain
value in the development.update file may not match the domain name that you're accessing your website with. If you update this, make sure to then run make all
from the $REDDIT_HOME/src/reddit/r2
directory, same as any time you update a file.
Run make all
from the reddit/r2 directory. You can access this directory by running cd $REDDIT_HOME/src/reddit/r2
For whatever reason, you have to upload your new header image under a new name in order for the changes to apply correctly. Once you've added the picture to $REDDIT_HOME/src/reddit/r2/r2/public/static
then open $REDDIT_HOME/src/reddit/r2/r2/public/static/css/reddit.less
, go to #header-img.default-header
typically on line 269, and then modify the name of the image to match the one you just uploaded on the background-image
line. Make sure not to remove the preceding ../
if you put your new header image in $REDDIT_HOME/src/reddit/r2/r2/public/static
. As usual, go back to $REDDIT_HOME/src/reddit/r2
and run make all
after applying these changes.
cd $REDDIT_HOME/src/reddit/r2
- Run
reddit-run scripts/inject_test_data.py -c 'inject_test_data()'
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
This typically means that docker isn't running, to fix this, run the following commands
systemctl enable docker
systemctl start docker