Running an instance

Some notes on running a production instance.

Django admin

The normal Django admin can be found at /admin.

Executing the Django shell

Assuming included installation instructions were used, do the following:

sudo su - socialhome
workon socialhome
cd socialhome
python shell_plus

Confirming user emails via the shell

You can manually confirm user emails via the shell by running the following:


This will allow the user to log in without clicking the confirmation email link.

Admin user

To make a user an admin, log in to the shell and execute the following to set the user as superuser:

User.objects.filter(username=<username>).update(is_staff=True, is_superuser=True)


Three places should be backed up from the Socialhome instance to ensure recovery in the event of a disaster.

  • The database
  • Local settings in .env (assuming you are using this way to configure the application)
  • The path socialhome/media/ which contains for example image uploads
  • The Redis database (example instructions)

Give your instance some visibility

If you want some public visibility to your instance, consider registering it at some lists that track nodes in “The Federation”. Here are a few:

Why not also contribute to the numbers of the federated social web? Turn on SOCIALHOME_STATISTICS to expose some activity counts.

Log files

There are two main logs where Socialhome sends information during runtime.

  • Circus process log

    Rotated log files in /var/log/upstart/socialhome-circus.log. The location will differ if not using an Upstart based system.

    This log contains the output of all the processes required to run Socialhome, if using the recommended way of running Socialhome using Circus. Any errors for example when starting uWSGI or the worker processes will be found here.

  • Application log

    See SOCIALHOME_LOG_TARGET configuration value. This log contains logging entries from the application itself. Useful for debugging federation issues or other problems with the actual code.


Configuration mainly happens through environment variables. Those are passed to Django via the file .env in the repository root. The following items of note can be changed.

After making changes to this file, don’t forget to reload the app with sudo service socialhome restart.


Default: postgres:///socialhome

This must be set to a proper database URL, for example postgres://socialhome:DATABASEPASSWORDHERE@


Default: True

Set this to False if you want to disable signups.


Default: info@socialhome.local

Admin email for example for outgoing emails and providing a feedback channel for users.


Default: Socialhome Admin

Admin display name for example for outgoing emails.


Default: socialhome.local

Domain that is used for this instance. Must be set to the right domain. Note, it’s not a good idea to use a sub-domain wildcard for www, ie . as per Django docs. Federated sites work better with only one absolute domain.


Default: noreply@socialhome.local

Set this to the email address that emails should be sent out as.


Default: django.core.mail.backends.console.EmailBackend

Must be set to some real email backend if you wish to send emails. See docs for backend options and additional configuration help.

The possible email related additional settings are as follows:

  • DJANGO_EMAIL_HOST (default localhost)
  • DJANGO_EMAIL_PORT (default 587)
  • DJANGO_EMAIL_HOST_USER (default ‘’)
  • DJANGO_EMAIL_USE_TLS (default True)
  • DJANGO_EMAIL_USE_SSL (default False)
  • DJANGO_EMAIL_TIMEOUT (default ‘’)
  • DJANGO_EMAIL_SUBJECT_PREFIX (default [Socialhome])
  • DJANGO_SERVER_EMAIL (default noreply@socialhome.local)

Note, email is required for signing up. Users will not be able to sign up if the instance does not have working email sending.


Default: ‘’

Must be set to a long secret string. Don’t expose it to anyone. See docs


Default: True

See docs.


Default: True

See docs.


Default: True

See docs.


Default: True

Redirect all requests to HTTPS. See docs.


Default: 0


Default: localhost


Default: ‘’


Default: 6379


Default: None

Allows to plug in additional third-party apps, string with comma-separated values, for example django.contrib.gis,myapp.


Default: None

Allows to use additional third-party app url-conf, string with two comma-separated values, url prefix and path to urlpatterns, for example myapp/,myapp.urls. If you need to include urls from more than one app, this could be done by creating intermediary app which aggregates urls.


Default: socialhome.local

Must be set to your Socialhome instance domain. Used for example to generate outbound links.


Default: None

Allows to use on main page custom view from third-party app, string with path to view, for example myapp.views.AwesomeHomeView.


Default: True

Force HTTPS. There should be no reason to turn this off.


Default: file

Define target for Django and application logs. Possible options:

  • file, logs will go to a file defined in SOCIALHOME_LOGFILE. Note, due to multiple processes logging to the same file, this file log is only really useful for tailing or if running different processes on separate containers or machines.
  • syslog, logs to syslog, to the local7 facility.


Default: /tmp/socialhome.log

Where to write the main application log.



URL to make signup link go to in the case that signups are closed.


Default: diaspora://

Which relay instance ID to send outgoing content to. Socialhome automatically integrates with the relay system.


Default: ‘’

If this is set to a local username, that users profile will be shown when navigating to / as not logged in user. Logged in users will still see their own profile. Good for single user instances.


Default: False

Controls whether to expose some generic statistics about the node. This includes local user, content and reply counts. User counts include 30 day and 6 month active users.


Default: 100

Amount of items to store in stream precaches, per user, per stream. Increasing this setting can radically increase Redis memory usage. If you have a lot of users, you might consider decreasing this setting. See Precaching.


Default: local7

Define the logging facility for syslog, if SOCIALHOME_LOG_TARGET is set to syslog.


Default: INFO

Define the logging level of syslog logging, if SOCIALHOME_LOG_TARGET is set to syslog. Possible options: DEBUG, INFO, WARNING, ERROR.