Commit | Line | Data |
---|---|---|
473a4431 CAW |
1 | .. MediaGoblin Documentation |
2 | ||
3 | Written in 2011, 2012 by MediaGoblin contributors | |
4 | ||
5 | To the extent possible under law, the author(s) have dedicated all | |
6 | copyright and related and neighboring rights to this software to | |
7 | the public domain worldwide. This software is distributed without | |
8 | any warranty. | |
9 | ||
10 | You should have received a copy of the CC0 Public Domain | |
11 | Dedication along with this software. If not, see | |
12 | <http://creativecommons.org/publicdomain/zero/1.0/>. | |
13 | ||
ccff46ab CAW |
14 | .. _configuration-chapter: |
15 | ||
16 | ======================== | |
17 | Configuring MediaGoblin | |
18 | ======================== | |
19 | ||
20 | So! You've got MediaGoblin up and running, but you need to adjust | |
21 | some configuration parameters. Well you've come to the right place! | |
22 | ||
0c8e20cf | 23 | |
ccff46ab CAW |
24 | MediaGoblin's config files |
25 | ========================== | |
26 | ||
27 | When configuring MediaGoblin, there are two files you might want to | |
28 | make local modified versions of, and one extra file that might be | |
29 | helpful to look at. Let's examine these. | |
30 | ||
e82857fa BS |
31 | ``mediagoblin.ini`` |
32 | This is the main config file for MediaGoblin. If you want to tweak any | |
33 | settings for MediaGoblin, you'll usually do that here. | |
ccff46ab | 34 | |
e82857fa BS |
35 | ``mediagoblin.example.ini`` |
36 | When you run MediaGoblin for the first time, this default config is copied to | |
37 | your new ``mediagoblin.ini``. Keep this in mind if you need to refer back to | |
38 | the original settings. | |
39 | ||
40 | ``paste.ini`` | |
076bf0cf WKG |
41 | This is primarily a server configuration file, on the Python side |
42 | (specifically, on the WSGI side, via `paste deploy | |
9205872e CAW |
43 | <http://pythonpaste.org/deploy/>`_ / `paste script |
44 | <http://pythonpaste.org/script/>`_). It also sets up some | |
45 | middleware that you can mostly ignore, except to configure | |
46 | sessions... more on that later. If you are adding a different | |
e8be4722 | 47 | Python server other than Waitress / plain HTTP, you might configure it |
82c2f9a9 | 48 | here. You probably won't need to change this file very much. |
9205872e CAW |
49 | |
50 | ||
51 | There's one more file that you certainly won't change unless you're | |
9650aa39 | 52 | making coding contributions to MediaGoblin, but which can be useful to |
9205872e CAW |
53 | read and reference: |
54 | ||
e82857fa | 55 | ``mediagoblin/config_spec.ini`` |
9205872e CAW |
56 | This file is actually a specification for mediagoblin.ini itself, as |
57 | a config file! It defines types and defaults. Sometimes it's a | |
49fca84b | 58 | good place to look for documentation... or to find that hidden |
9205872e | 59 | option that we didn't tell you about. :) |
ccff46ab CAW |
60 | |
61 | ||
ccff46ab CAW |
62 | |
63 | Common changes | |
64 | ============== | |
65 | ||
14fbfd18 CAW |
66 | Enabling email notifications |
67 | ---------------------------- | |
68 | ||
0c8e20cf | 69 | You'll almost certainly want to enable sending email. By default, |
14fbfd18 | 70 | MediaGoblin doesn't really do this... for the sake of developer |
0c8e20cf WKG |
71 | convenience, it runs in "email debug mode". |
72 | ||
73 | To make MediaGoblin send email, you need a mailer daemon. | |
74 | ||
75 | Change this in your ``mediagoblin.ini`` file:: | |
14fbfd18 | 76 | |
076bf0cf | 77 | email_debug_mode = false |
14fbfd18 | 78 | |
0c8e20cf WKG |
79 | You should also change the "from" email address by setting |
80 | ``email_sender_address``. For example:: | |
14fbfd18 | 81 | |
0c8e20cf | 82 | email_sender_address = "foo@example.com" |
14fbfd18 CAW |
83 | |
84 | If you have more custom SMTP settings, you also have the following | |
85 | options at your disposal, which are all optional, and do exactly what | |
86 | they sound like. | |
87 | ||
15ddb7c0 BS |
88 | - ``email_smtp_host`` |
89 | - ``email_smtp_port`` | |
90 | - ``email_smtp_user`` | |
91 | - ``email_smtp_pass`` | |
92 | - ``email_smtp_use_ssl`` (default is ``False``) | |
93 | - ``email_smtp_force_starttls`` (default is ``False``) | |
ccff46ab | 94 | |
e82857fa BS |
95 | Changing the data directory |
96 | --------------------------- | |
11f0e2f8 JT |
97 | |
98 | MediaGoblin by default stores your data in wherever ``data_basedir``. | |
99 | This can be changed by changing the value in your ``mediagoblin.ini`` file | |
100 | for example:: | |
101 | ||
102 | [DEFAULT] | |
103 | data_basedir = "/var/mediagoblin/user_data" | |
104 | ||
105 | For efficiency reasons MediaGoblin doesn't serve these files itself and | |
106 | instead leaves that to the webserver. You will have to alter the location | |
107 | to match the path in ``data_basedir``. | |
108 | ||
109 | If you use ``lazyserver.sh`` you need to change the ``paste.ini`` file:: | |
110 | ||
111 | [app:mediagoblin] | |
112 | /mgoblin_media = /var/mediagoblin/user_data | |
113 | ||
9650aa39 | 114 | If you use Nginx you need to change the config:: |
11f0e2f8 JT |
115 | |
116 | # Instance specific media: | |
117 | location /mgoblin_media/ { | |
118 | alias /var/mediagoblin/user_data; | |
119 | } | |
120 | ||
121 | Once you have done this you will need to move any existing media you had in the | |
122 | old directory to the new directory so existing media still can be displayed. | |
0c8e20cf | 123 | |
28ce1d11 CAW |
124 | All other configuration changes |
125 | ------------------------------- | |
126 | ||
076bf0cf | 127 | To be perfectly honest, there are quite a few options and we haven't had |
e82857fa | 128 | time to document them all, including Celery configuration. |
28ce1d11 CAW |
129 | |
130 | So here's a cop-out section saying that if you get into trouble, hop | |
3a438f5e WKG |
131 | onto IRC and we'll help you out. Details for the IRC channel is on the |
132 | `join page`_ of the website. | |
133 | ||
134 | .. _join page: http://mediagoblin.org/join/ |