Unnamed repository; edit this file 'description' to name the repository.
Find a file
2024-11-12 10:48:28 +02:00
.vscode Add initial metadata 2023-11-26 12:45:00 +02:00
data Add initial metadata 2023-11-26 12:45:00 +02:00
files Change force to redownload 2024-08-19 13:49:27 +03:00
manifests Add option to manage redis or not 2024-11-12 10:48:28 +02:00
spec Add initial metadata 2023-11-26 12:45:00 +02:00
templates add systemd units 2023-11-28 20:32:55 +02:00
.fixtures.yml Add initial metadata 2023-11-26 12:45:00 +02:00
.gitattributes Add initial metadata 2023-11-26 12:45:00 +02:00
.gitignore Add initial metadata 2023-11-26 12:45:00 +02:00
.pdkignore Add initial metadata 2023-11-26 12:45:00 +02:00
.puppet-lint.rc Add initial metadata 2023-11-26 12:45:00 +02:00
.rspec Add initial metadata 2023-11-26 12:45:00 +02:00
.rubocop.yml Add initial metadata 2023-11-26 12:45:00 +02:00
.sync.yml Add initial metadata 2023-11-26 12:45:00 +02:00
.yardopts Add initial metadata 2023-11-26 12:45:00 +02:00
CHANGELOG.md Add initial metadata 2023-11-26 12:45:00 +02:00
Gemfile Add initial metadata 2023-11-26 12:45:00 +02:00
hiera.yaml Add initial metadata 2023-11-26 12:45:00 +02:00
metadata.json Add let's encrypt module 2023-11-29 16:56:16 +02:00
Rakefile Add initial metadata 2023-11-26 12:45:00 +02:00
README.md Update setup 2024-02-16 18:48:17 +02:00

mastodon

This module install and manage Mastodon, Redis and PostgreSQL servers.

Table of Contents

  1. Description
  2. Setup - The basics of getting started with mastodon
  3. Usage - Configuration options and additional functionality
  4. Limitations - OS compatibility, etc.
  5. Development - Guide for contributing to the module

Description

Mastodon https://joinmastodon.org/ is a decrentralized social network using the ActivityPub protocol to federate. This module install and configure it with the required components (PostgreSQL and Redis).

Setup

What mastodon affects

This module will install PostgreSQL and Redis server.

Setup Requirements

You will need a host name registered in DNS.

Beginning with mastodon

You need to generate these secrets:

  • mastodon::db_password
  • mastodon::secret_key_base
  • mastodon::otp_secret
  • mastodon::vapid_private_key
  • mastodon::vapid_public_key

Usage

In your Puppetfile include:

mod 'mastodon',
    :git => 'https://codeberg.org/adelgado/puppet-mastodon.git',
    :branch => 'production'

Hiera data to set up the instance:

classes:
  - mastodon

mastodon::hostname: mastodon.example.org
mastodon::db_host: /var/run/postgresql
mastodon::db_port: 5432
mastodon::db_name: mastodon
mastodon::db_user: mastodon
mastodon::users:
  - username: my_custom_admin
    email: admin@example.org
    confirmed: true
    role: Owner
mastodon::config:
  SINGLE_USER_MODE: false
  REDIS_HOST: 127.0.0.1
  SMTP_SERVER: 127.0.0.1
  SMTP_PORT: 25
  SMTP_AUTH_METHOD: none
  SMTP_OPENSSL_VERIFY_MODE: none
  SMTP_ENABLE_STARTTLS: auto
  SMTP_FROM_ADDRESS: 'Mastodon <notifications@example.org>'

And some secrets in eyaml (you can do a first run that fails and then run RAILS_ENV=production bundle exec rake mastodon:setup to create this secrets).

mastodon::db_password: >
  ENC[PKCS7,]  

mastodon::secret_key_base: >
  ENC[PKCS7,]  

mastodon::otp_secret: >
  ENC[PKCS7,]  

mastodon::vapid_private_key: >
  ENC[PKCS7,]  

mastodon::vapid_public_key: >
  ENC[PKCS7,]  

Updating your instance

The module deploys a script to do updates. But many updates required extra steps that are not included in the script, so use it at your own risk. This script requires a Github token with access to read public repositories.

Limitations

Tested in Ubuntu

Development

Release Notes/Contributors/Etc.