By ajarana
Hello,
A few months ago I set up a 0.5gb droplet to get a small project of mine online. This was based off Reddit’s open source software, and installed by simply running a script on Ubuntu 14.04 (https://github.com/reddit/reddit/wiki/reddit-install-script-for-Ubuntu). I had to give it a 4gb swap and increase swappiness to 90, but it worked. Now I’m trying the same (and with a 1gb droplet this time), but all I get is 504 gateway time-out errors. Absolutely nothing else. The favicon loads, but that’s it. The script said the installation was a success (and it works when I ran it on a VM), all of Reddit’s dependencies seem to be working, but I keep getting 504 errors (for 2 days now).
I have a 4gb swap with 90 swappiness, and this is just frustrating given that it worked a few months ago but won’t now. Before running the script, I also installed apache2 and made sure that worked, but sadly that’s all that did. Is there anything else I can do (other than trying a 2gb+ droplet)?
My droplet’s ip: 45.55.78.86
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Since it’s been a while since I’ve played with Reddit’s open source code I took a few minutes to try and duplicate this problem on a droplet of my own. I was not able to duplicate it but I have an idea of the cause of the issue. You mentioned having installed apache2 before running the install-reddit.sh
script. My guess is that this prevented things from being configured properly.
Here are the steps I took to get a reddit install running:
1.) Created a new droplet (I used an 8GB droplet as recommended. A smaller one with swap should work just as well for testing but I would not recommend it for production).
2.) Created a user ‘reddit’
adduser reddit
3.) Added that user to sudoers
adduser reddit sudo
4.) Switched to the new user, changed to their home directory and downloaded the script
cd /home/reddit/;
su reddit;
wget https://raw.github.com/reddit/reddit/master/install-reddit.sh;
5.) Then I ran the script with sudo, as the reddit user.
sudo ./install-reddit.sh
Once the script completed, I created an entry in the /etc/hosts file on my local computer (on Windows this file is in C:\Windows\system32\drivers\etc\
while on Linux/Mac it is /etc/hosts
. The entry I created pointed the name reddit.local
to my droplet’s IP address. Then I could browse to reddit.local and see:
So, I would recommend doing a rebuild of your droplet with a fresh install of Ubuntu 14.04 and re-try the installation.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.