You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
2.0 KiB

  1. Heroku guide
  2. ============
  3. [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://dashboard.heroku.com/new?button-url=https://github.com/tootsuite/mastodon&template=https://github.com/tootsuite/mastodon)
  4. Mastodon can be run on a free [Heroku](https://heroku.com) app. It should be
  5. noted this has limited testing and could have unpredictable results.
  6. ## Basic setup
  7. Click the button above to start creating a Heroku app with the Mastodon repo as
  8. the source. This tells Heroku to use the `app.json` file which does things like
  9. prompt for config variables, set up the right buildpacks, run a postdeploy task,
  10. and add the appropriate addons.
  11. If you don't use the deploy button and app.json approach, you will need to do
  12. some of that manually.
  13. ## Domain names and SSL
  14. You can add your domain name to the Heroku app's setting, and then also use
  15. Heroku's (free) auto renewal program for Lets Encrypt certificates, by
  16. requesting a cert from the settings screen. You'll have to point your hostname
  17. DNS at Heroku using the values heroku gives you on this screen, using whatever
  18. method is appropriate for your DNS setup.
  19. You should set the Heroku config vars of `LOCAL_DOMAIN` to your hostname, and
  20. `LOCAL_HTTPS` to "true" as well.
  21. ## Email
  22. Consider using [Mailgun](https://mailgun.com) or similar, who offer free plans
  23. that should suit your interests. Look in `production.rb` to see which config
  24. variables need to be set on Heroku for outgoing email to work.
  25. ## File storage
  26. You will want Amazon S3 for file storage. The only exception is for development
  27. purposes, where you may not care if files are not saved. Follow a guide online
  28. for creating a free Amazon S3 bucket and Access Key, then enter the details.
  29. ## Deployment
  30. You can deploy from the Heroku web interface or from the command line. Run:
  31. `heroku run rails db:migrate`
  32. after you first deploy to set up the first database.
  33. To make yourself an admin, you may need to use the `heroku` CLI application after creating an account online:
  34. `heroku rake mastodon:make_admin USERNAME=yourUsername`