Difference between revisions of "FAQ for pod maintainers"
|Line 181:||Line 181:|
the IRC channels, so if you can't get your question answered in IRC, you can try here.
the IRC channels, so if you can't get your question answered in IRC, you can try here.
* [http://groups.google.com/group/diaspora-discuss - Google group for discussion of non-technical topics
* [http://groups.google.com/group/diaspora-dev - Google group for discussion of installation, source code, and other technical topics
Revision as of 15:12, 23 October 2012
We've started adding questions that we see a lot to this page, but it doesn't cover everything. If you have other questions, the best way to get an answer quickly is to visit us in IRC. You might think, "IRC? For real? Is this 1994 again?"
Yes. I mean, **no**! Just think of IRC as the open-source equivalent of a Campfire room. **Links to IRC channels and mailing lists are at the bottom of this page.**
Do you have a detailed install guide?
What ports does Diaspora need open for communication?
Your webserver must be on port 443 for HTTPS. You must forward that port to 3000 or configure Apache or Nginx to do reverse-proxying. Otherwise friend requests may cause lockups on other servers. See the command-line switches below.
Can I use Apache to run Diaspora?
What are the command line options for launching thin (Diaspora's HTTP server)?
There are a couple of helpful command line options for setting the address and port for thin:
bundle exec thin -a <address> -p <port> start
-D to turn on debug mode. Run
thin -h to see a complete list.
How do I install on various linux distros or Mac?
See the Installation Guides for a list of supported distros/OSs and what to do in each case.
There is also an AUR package for Arch Linux and some guides to install it manually:
Unofficial guide for Arch Linux installation 1 (Arch Linux Forums)
Unofficial guide for Arch Linux installation 2
I'm getting SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol!
Close the port, make it do connection refused, not timeout. (Disclaimer: hopefully this doesn't screw up anyone) <james_> On Ubuntu: sudo ufw enable, sudo ufw reject 443 (, sudo reboot?)
I installed Diaspora on my machine, went to http://localhost:3000 and signed up. But my friends can't add me!
You signed up with "localhost" which is not a valid external address. You first need an externally-accessible address - either a domain name or an IP address. Once you have that working, you need to clear your database (`$ bundle exec rake db:migrate:reset`) and re-register coming in on the outside URL.
bundle install >>> command not found ?
sudo ln -s /var/lib/gems/1.8/bin/bundle /usr/local/bin/bundle though the best solution is ./ubuntu-setup.bash
How do I get past the sign in page to create a new account?
To create a new account, go to http://yourdiasporainstance.com/users/sign_up (replacing *yourdiasporainstance.com* with the the host name of your pod).
I installed Diaspora on my machine, but when I load the site there are no images and the layout looks horrible!
If you're missing your images in the production environment, change serve_static_assets in config/environments/production.rb to true and restart Diaspora. Or set up a reverse proxy to serve the files directly under public/.
There are no images on my pod
You are most likely in production mode and/or your apache/nginx is not serving static assets. If you just want to run your server directly from thin on port 3000, you can set ruby to servce static assets by changing `serve_static_assets` to `true` in your `config/application.yml`. Please note, that it is faster if apache/nginx is set up to serve the files from the `public/` directory, since that's what it's build to do - serve files over http.
- When deploying to heroku:*
Be sure to check that the `serve_static_assets` is set to true in the production block of your `config/application.yml` file.
production: <<: *defaults serve_static_assets: true
Webfinger does not seem to be working
Is your _resque_ worker running? Can you see the error in resque web? Does your SSL cert check out? (try a [ssl cert checker][ssl-check]). We do not support self signed certs, but you can get a free one from StartSSL.
I am receiving posts, but nobody is receiving mine...
[Check your ssl certs][ssl-check]!
I'm getting the warning "... in production without Resque workers"'
Resque is the backend we use for processing background jobs. Normally, resque is spawned as a separate process, but in this case you have configured Diaspora to run the jobs in the same process as the application. This is normally used for development or testing purposes, but if used in production, it can bring major performance penalties. Thus you should always run resque in its own process, by setting `single_process_mode` to `false` in your `config/application.yml` and starting the resque process with
RAILS_ENV=production DB=mysql QUEUE=* bundle exec rake resque:work # or RAILS_ENV=production DB=postgres QUEUE=* bundle exec rake resque:work
(In case you are using `script/server` to start Diapora, then you don't have to manually start the workers. This is already done by the script.)
Is there anything I should do before upgrading my installation?
We have a service (Travis) that builds all our code for each ruby version/database combination that we support. Before you update your Diaspora installation, you should check here to see if your combination is green: http://travis-ci.org/diaspora/diaspora If it's not green, wait to do the update. (Note: Travis is having issues with their SSL cert, so you may get a warning, but it is safe to proceed.)
How do I roll back my installation if an update breaks it?
Just do: `git checkout [ref]` Where [ref] is the identifier of the commit to go back to. It's a long guid-like string of letters and numbers. You can find the ref by doing a git log, eyeballing the commit dates, and figuring out where you were before you pulled. Of course it's best if you keep track of that ref before you update. :)
What if there were database migrations in the code I am rolling back?
Then you also need to roll those back separately. You need to do this BEFORE you roll back the code. Look in the db/migrate directory and figure out which files are new since the last time you pulled - i.e., which migration your db should be on. They are in timestamp order in that directory. Then do: `rake db:rollback` And look at the output. It will tell you which migration you are now on. It rolls back one each time you run it. Run it until you're on the right migration and then roll back the code as described above.
Also be aware that database rollbacks can fail - they depend on the migration author writing the correct code to roll back. And if they didn't right the correct code to roll forward... :) So really, the best thing you can do to avoid this is check Travis (as described above) before doing an update.
Will a pod eventually receive federated posts that it misses while being offline/down?
Currently no, there are no retries, though we'd like to add that at some point.
What do I do about all these PGErrors, like disconnects and SSL problems?
If you are running Diaspora with PostgreSQL, beware that having the ssl setting turned on in the PostgreSQL config has been causing problems for several people. We recommend turning it off unless you know what you're doing.
I've got my pod running. How do I disable outside logins?
registrations_closed in config/application.yml from false to true, and then
restart the server.
How do I back up the database?
From the command line type:
mysqldump -u <mysql username> -p diaspora_development > backup.sql
Enter your mysql password when prompted for it. Replace \_development with \_production if you're running the production environment.
What's up with assets/jammit/js-runtime?
I am on PPC (e.g. old iMac) and want to use it for serving Diaspora, but there is no ExecJS compatible JS runtime
What are roles and how do I use them?
We switched from statically configured 'special' user accounts in the config file to a role system, which lets us change role assignments without having to restart the server. In order to convert your current config to the new roles you can import them by going to the rails console in the production environment by running the following command in your diaspora directory:
$ RAILS_ENV=production rails c
There you can run the functions that will convert the config values to database entries:
> Role.load_admins > Role.load_spotlight
In case you want to assign roles to other users, you can do so by running these commands:
> u = User.find_by_email("email@example.com") > Role.add_admin(u.person) # to add as admin, or > Role.add_beta(u.person) # to add as 'beta' user, or > Role.add_spotlight(u.person) # to add as 'community spotlight'
When you are done, you can exit the console with
What if my question isn't answered here?
IRC is the best way to get an answer quickly. Click the link to the join the channel in a new browser window. You can also download and use an IRC client such as Colloquy for OS X or mIRC for Windows.
- #diaspora on irc.freenode.net - general discussion and help for folks installing Diaspora
- #diaspora-dev on irc.freenode.net - discussion of the source code and help for new developer contributors
- #diaspora-de on irc.freenode.net - discussion in German.
We have two mailing lists, both Google groups. They tend to have a slightly different audience than the IRC channels, so if you can't get your question answered in IRC, you can try here.