Running an instance¶
Some notes on running a production instance.
The normal Django admin can be found at
Executing the Django shell¶
Assuming included installation instructions were used, do the following:
sudo su - socialhome workon socialhome cd socialhome python manage.py 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.
To make a user an admin, log in to the shell and execute the following to set the user as superuser:
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.
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.
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.
This must be set to a proper database URL, for example
Set this to
False if you want to disable signups.
Admin email for example for outgoing emails and providing a feedback channel for users.
Admin display name for example for outgoing emails.
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.
Set this to the email address that emails should be sent out as.
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:
Note, email is required for signing up. Users will not be able to sign up if the instance does not have working email sending.
Must be set to a long secret string. Don’t expose it to anyone. See docs