"GNU MediaGoblin is a free, decentralized Web application for hosting and sharing many forms of digital media. It strives to provide an extensible, federated, and freedom-respectful software replacement to major media publishing services such as Flickr, DeviantArt, and YouTube." From Wikipedia.
Native functionality and plugins exist for images, videos, sound, ASCII art, PDF, ODF, and even 3D models.
Federation support isn't finished as of version 0.9.0, but is said to be arriving for 1.0. Stay tuned and cross your fingers.
# pacman -S mediagoblin
Configuration is occurs inside /etc/webapps/mediagoblin/. A few basic properties must be set before MediaGoblin will work:
- Set email_sender_address to the address you wish to be used as the sender for system-generated emails.
- Edit direct_remote_path, base_dir, and base_url if your mediagoblin directory is not the root directory of your vhost.
- Set host and port under the [server:main] section. By default Mediagoblin will listen to local requests on port 6543.
2.1 Account management
This is how you disable open registration in /etc/webapps/mediagoblin/mediagoblin_local.ini:
[mediagoblin] allow_registration = false
You can still make accounts for people you know and trust via the /usr/share/webapps/mediagoblin/bin/gmg adduser command:
# su -c '/usr/share/webapps/mediagoblin/bin/gmg adduser -u <user> -p <password> -e <email>' - mediagoblin
gmg makeadmin and gmg changepw in turn grant administrative privileges and change passwords.
Alternatively, use one of the available CAPTCHA plugins.
2.2 Session security
MediaGoblin currently supports PostgreSQL and SQLite. The default is a local SQLite database. This will “just work” for small deployments. For medium to large deployments we recommend PostgreSQL. If you don’t want/need postgres, skip this section.
# pacman -S --needed --asdeps postgresql python-psycopg2
The installation process will create a new system user named postgres, which will have privilegies sufficient to manage the database. We will create a new database user with restricted privilegies and a new database owned by our restricted database user for our MediaGoblin instance.
In this example, the database user will be mediagoblin and the database name will be mediagoblin too.
We’ll add these entities by first switching to the postgres account:
# su - postgres
This will change your prompt and environment to postgres'. Enter the following createuser and createdb commands at that prompt. We’ll create the mediagoblin database user first:
[postgres $] createuser -A -D mediagoblin
Then we’ll create an empty database where all of our MediaGoblin data will be stored:
[postgres $] createdb -E UNICODE -O mediagoblin mediagoblin
Edit the [mediagoblin] section in your /etc/webapps/mediagoblin/mediagoblin_local.ini and put in:
[mediagoblin] sql_engine = postgresql:///mediagoblin
Before you start using the database, you need to populate it with the basic Mediagoblin schema. Run gmg dbupdate as the mediagoblin user. E.g:
# su -c '/usr/share/webapps/mediagoblin/bin/gmg dbupdate' - mediagoblin
2.4 FastCGI with Nginx
By default Mediagoblin runs a standalone WSGI/Paste server. We will explain with a configuration example how to tell Nginx to talk to Mediagoblin via FastCGI, however, you may use any webserver of your choice as long as it supports the FastCGI protocol. (See the next subsection, #Other servers).
You may also skip this section entirely and continue to activate the standalone server. That will be good enough for small installations.
2.4.1 Other servers
Instructions and scripts for running MediaGoblin on Apache and other servers can be found on the MediaGoblin wiki.
Enable and start the paster and celery services:
# systemctl enable --now mediagoblin-paster.service mediagoblin-celeryd.service
Celery is a separate process in communication with the standalone Paste web server. Celery offloads the latter by doing all the heavy-lifting in the background, such as media processing, allowing for a smoother user experience.
This article contains information from the official Mediagoblin 0.9.0 documentation, which was released to the public domain via CC0.systemctl start mediagoblin-paster.service mediagoblin-celeryd.service