-use Mix.Config
-alias Pleroma.Docs.Generator
+import Config
websocket_config = [
path: "/websocket",
label: "Build directory",
type: :string,
description: "The directory inside the zip file "
+ },
+ %{
+ key: "custom-http-headers",
+ label: "Custom HTTP headers",
+ type: {:list, :string},
+ description: "The custom HTTP headers for the frontend"
}
]
key: :base_url,
label: "Base URL",
type: :string,
- description: "Base URL for the uploads, needed if you use CDN",
+ description:
+ "Base URL for the uploads. Required if you use a CDN or host attachments under a different domain.",
suggestions: [
"https://cdn-host.com"
]
%{
key: :proxy_remote,
type: :boolean,
- description:
- "If enabled, requests to media stored using a remote uploader will be proxied instead of being redirected"
- },
- %{
- key: :proxy_opts,
- label: "Proxy Options",
- type: :keyword,
- description: "Options for Pleroma.ReverseProxy",
- suggestions: [
- redirect_on_failure: false,
- max_body_length: 25 * 1_048_576,
- http: [
- follow_redirect: true,
- pool: :media
- ]
- ],
- children: [
- %{
- key: :redirect_on_failure,
- type: :boolean,
- description:
- "Redirects the client to the real remote URL if there's any HTTP errors. " <>
- "Any error during body processing will not be redirected as the response is chunked."
- },
- %{
- key: :max_body_length,
- type: :integer,
- description:
- "Limits the content length to be approximately the " <>
- "specified length. It is validated with the `content-length` header and also verified when proxying."
- },
- %{
- key: :http,
- label: "HTTP",
- type: :keyword,
- description: "HTTP options",
- children: [
- %{
- key: :adapter,
- type: :keyword,
- description: "Adapter specific options",
- children: [
- %{
- key: :ssl_options,
- type: :keyword,
- label: "SSL Options",
- description: "SSL options for HTTP adapter",
- children: [
- %{
- key: :versions,
- type: {:list, :atom},
- description: "List of TLS versions to use",
- suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
- }
- ]
- }
- ]
- },
- %{
- key: :proxy_url,
- label: "Proxy URL",
- type: [:string, :tuple],
- description: "Proxy URL",
- suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
- }
- ]
- }
- ]
+ description: """
+ Proxy requests to the remote uploader.\n
+ Useful if media upload endpoint is not internet accessible.
+ """
},
%{
key: :filename_display_max_length,
description: "S3 bucket namespace",
suggestions: ["pleroma"]
},
- %{
- key: :public_endpoint,
- type: :string,
- description: "S3 endpoint",
- suggestions: ["https://s3.amazonaws.com"]
- },
%{
key: :truncated_namespace,
type: :string,
description:
"If you use S3 compatible service such as Digital Ocean Spaces or CDN, set folder name or \"\" etc." <>
- " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in public_endpoint."
+ " For example, when using CDN to S3 virtual host format, set \"\". At this time, write CNAME to CDN in Upload base_url."
},
%{
key: :streaming_enabled,
}
]
},
- %{
- group: :pleroma,
- key: :fed_sockets,
- type: :group,
- description: "Websocket based federation",
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enable FedSockets"
- }
- ]
- },
%{
group: :pleroma,
key: Pleroma.Emails.Mailer,
type: :group,
description: "Mailer-related settings",
children: [
+ %{
+ key: :enabled,
+ label: "Mailer Enabled",
+ type: :boolean
+ },
%{
key: :adapter,
type: :module,
description:
- "One of the mail adapters listed in [Swoosh readme](https://github.com/swoosh/swoosh#adapters)," <>
- " or Swoosh.Adapters.Local for in-memory mailbox",
+ "One of the mail adapters listed in [Swoosh documentation](https://hexdocs.pm/swoosh/Swoosh.html#module-adapters)",
suggestions: [
- Swoosh.Adapters.SMTP,
- Swoosh.Adapters.Sendgrid,
- Swoosh.Adapters.Sendmail,
- Swoosh.Adapters.Mandrill,
+ Swoosh.Adapters.AmazonSES,
+ Swoosh.Adapters.Dyn,
+ Swoosh.Adapters.Gmail,
Swoosh.Adapters.Mailgun,
Swoosh.Adapters.Mailjet,
+ Swoosh.Adapters.Mandrill,
Swoosh.Adapters.Postmark,
- Swoosh.Adapters.SparkPost,
- Swoosh.Adapters.AmazonSES,
- Swoosh.Adapters.Dyn,
+ Swoosh.Adapters.SMTP,
+ Swoosh.Adapters.Sendgrid,
+ Swoosh.Adapters.Sendmail,
Swoosh.Adapters.SocketLabs,
- Swoosh.Adapters.Gmail,
- Swoosh.Adapters.Local
+ Swoosh.Adapters.SparkPost
]
},
- %{
- key: :enabled,
- type: :boolean,
- description: "Allow/disallow send emails"
- },
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :relay,
type: :string,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting",
- suggestions: ["smtp.gmail.com"]
+ description: "Hostname or IP address",
+ suggestions: ["smtp.example.com"]
+ },
+ %{
+ group: {:subgroup, Swoosh.Adapters.SMTP},
+ key: :port,
+ type: :integer,
+ description: "SMTP port",
+ suggestions: ["1025"]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :username,
type: :string,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting",
- suggestions: ["pleroma"]
+ description: "SMTP AUTH username",
+ suggestions: ["user@example.com"]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :password,
type: :string,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting",
+ description: "SMTP AUTH password",
suggestions: ["password"]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :ssl,
- label: "SSL",
+ label: "Use SSL",
type: :boolean,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting"
+ description: "Use Implicit SSL/TLS. e.g. port 465"
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :tls,
- label: "TLS",
- type: :atom,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting",
- suggestions: [:always, :never, :if_available]
+ label: "STARTTLS Mode",
+ type: {:dropdown, :atom},
+ description: "Explicit TLS (STARTTLS) enforcement mode",
+ suggestions: [:if_available, :always, :never]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :auth,
- type: :atom,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting",
- suggestions: [:always, :never, :if_available]
- },
- %{
- group: {:subgroup, Swoosh.Adapters.SMTP},
- key: :port,
- type: :integer,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting",
- suggestions: [1025]
+ label: "AUTH Mode",
+ type: {:dropdown, :atom},
+ description: "SMTP AUTH enforcement mode",
+ suggestions: [:if_available, :always, :never]
},
%{
group: {:subgroup, Swoosh.Adapters.SMTP},
key: :retries,
type: :integer,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting",
- suggestions: [5]
- },
- %{
- group: {:subgroup, Swoosh.Adapters.SMTP},
- key: :no_mx_lookups,
- label: "No MX lookups",
- type: :boolean,
- description: "`Swoosh.Adapters.SMTP` adapter specific setting"
+ description: "SMTP temporary (4xx) error retries",
+ suggestions: [1]
},
%{
group: {:subgroup, Swoosh.Adapters.Sendgrid},
key: :api_key,
- label: "API key",
+ label: "SendGrid API Key",
type: :string,
- description: "`Swoosh.Adapters.Sendgrid` adapter specific setting",
- suggestions: ["my-api-key"]
+ suggestions: ["YOUR_API_KEY"]
},
%{
group: {:subgroup, Swoosh.Adapters.Sendmail},
key: :cmd_path,
type: :string,
- description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
suggestions: ["/usr/bin/sendmail"]
},
%{
group: {:subgroup, Swoosh.Adapters.Sendmail},
key: :cmd_args,
type: :string,
- description: "`Swoosh.Adapters.Sendmail` adapter specific setting",
suggestions: ["-N delay,failure,success"]
},
%{
group: {:subgroup, Swoosh.Adapters.Sendmail},
key: :qmail,
- type: :boolean,
- description: "`Swoosh.Adapters.Sendmail` adapter specific setting"
+ label: "Qmail compat mode",
+ type: :boolean
},
%{
group: {:subgroup, Swoosh.Adapters.Mandrill},
key: :api_key,
- label: "API key",
+ label: "Mandrill API Key",
type: :string,
- description: "`Swoosh.Adapters.Mandrill` adapter specific setting",
- suggestions: ["my-api-key"]
+ suggestions: ["YOUR_API_KEY"]
},
%{
group: {:subgroup, Swoosh.Adapters.Mailgun},
key: :api_key,
- label: "API key",
+ label: "Mailgun API Key",
type: :string,
- description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
- suggestions: ["my-api-key"]
+ suggestions: ["YOUR_API_KEY"]
},
%{
group: {:subgroup, Swoosh.Adapters.Mailgun},
key: :domain,
type: :string,
- description: "`Swoosh.Adapters.Mailgun` adapter specific setting",
- suggestions: ["pleroma.com"]
+ suggestions: ["YOUR_DOMAIN_NAME"]
},
%{
group: {:subgroup, Swoosh.Adapters.Mailjet},
key: :api_key,
- label: "API key",
+ label: "MailJet Public API Key",
type: :string,
- description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
- suggestions: ["my-api-key"]
+ suggestions: ["MJ_APIKEY_PUBLIC"]
},
%{
group: {:subgroup, Swoosh.Adapters.Mailjet},
key: :secret,
+ label: "MailJet Private API Key",
type: :string,
- description: "`Swoosh.Adapters.Mailjet` adapter specific setting",
- suggestions: ["my-secret-key"]
+ suggestions: ["MJ_APIKEY_PRIVATE"]
},
%{
group: {:subgroup, Swoosh.Adapters.Postmark},
key: :api_key,
- label: "API key",
+ label: "Postmark API Key",
type: :string,
- description: "`Swoosh.Adapters.Postmark` adapter specific setting",
- suggestions: ["my-api-key"]
+ suggestions: ["X-Postmark-Server-Token"]
},
%{
group: {:subgroup, Swoosh.Adapters.SparkPost},
key: :api_key,
- label: "API key",
+ label: "SparkPost API key",
type: :string,
- description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
- suggestions: ["my-api-key"]
+ suggestions: ["YOUR_API_KEY"]
},
%{
group: {:subgroup, Swoosh.Adapters.SparkPost},
key: :endpoint,
type: :string,
- description: "`Swoosh.Adapters.SparkPost` adapter specific setting",
suggestions: ["https://api.sparkpost.com/api/v1"]
},
%{
group: {:subgroup, Swoosh.Adapters.AmazonSES},
- key: :region,
+ key: :access_key,
+ label: "AWS Access Key",
type: :string,
- description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
- suggestions: ["us-east-1", "us-east-2"]
+ suggestions: ["AWS_ACCESS_KEY"]
},
%{
group: {:subgroup, Swoosh.Adapters.AmazonSES},
- key: :access_key,
+ key: :secret,
+ label: "AWS Secret Key",
type: :string,
- description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
- suggestions: ["aws-access-key"]
+ suggestions: ["AWS_SECRET_KEY"]
},
%{
group: {:subgroup, Swoosh.Adapters.AmazonSES},
- key: :secret,
+ key: :region,
+ label: "AWS Region",
type: :string,
- description: "`Swoosh.Adapters.AmazonSES` adapter specific setting",
- suggestions: ["aws-secret-key"]
+ suggestions: ["us-east-1", "us-east-2"]
},
%{
group: {:subgroup, Swoosh.Adapters.Dyn},
key: :api_key,
- label: "API key",
+ label: "Dyn API Key",
type: :string,
- description: "`Swoosh.Adapters.Dyn` adapter specific setting",
- suggestions: ["my-api-key"]
+ suggestions: ["apikey"]
},
%{
group: {:subgroup, Swoosh.Adapters.SocketLabs},
- key: :server_id,
+ key: :api_key,
+ label: "SocketLabs API Key",
type: :string,
- description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
+ suggestions: ["INJECTION_API_KEY"]
},
%{
group: {:subgroup, Swoosh.Adapters.SocketLabs},
- key: :api_key,
- label: "API key",
+ key: :server_id,
+ label: "Server ID",
type: :string,
- description: "`Swoosh.Adapters.SocketLabs` adapter specific setting"
+ suggestions: ["SERVER_ID"]
},
%{
group: {:subgroup, Swoosh.Adapters.Gmail},
key: :access_token,
+ label: "GMail API Access Token",
type: :string,
- description: "`Swoosh.Adapters.Gmail` adapter specific setting"
- }
- ]
- },
- %{
- group: :swoosh,
- type: :group,
- description: "`Swoosh.Adapters.Local` adapter specific settings",
- children: [
- %{
- group: {:subgroup, Swoosh.Adapters.Local},
- key: :serve_mailbox,
- type: :boolean,
- description: "Run the preview server together as part of your app"
- },
- %{
- group: {:subgroup, Swoosh.Adapters.Local},
- key: :preview_port,
- type: :integer,
- description: "The preview server port",
- suggestions: [4001]
+ suggestions: ["GMAIL_API_ACCESS_TOKEN"]
}
]
},
}
]
},
+ %{
+ group: :pleroma,
+ key: :features,
+ type: :group,
+ description: "Customizable features",
+ children: [
+ %{
+ key: :improved_hashtag_timeline,
+ type: {:dropdown, :atom},
+ description:
+ "Setting to force toggle / force disable improved hashtags timeline. `:enabled` forces hashtags to be fetched from `hashtags` table for hashtags timeline. `:disabled` forces object-embedded hashtags to be used (slower). Keep it `:auto` for automatic behaviour (it is auto-set to `:enabled` [unless overridden] when HashtagsTableMigrator completes).",
+ suggestions: [:auto, :enabled, :disabled]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :populate_hashtags_table,
+ type: :group,
+ description: "`populate_hashtags_table` background migration settings",
+ children: [
+ %{
+ key: :fault_rate_allowance,
+ type: :float,
+ description:
+ "Max accepted rate of objects that failed in the migration. Any value from 0.0 which tolerates no errors to 1.0 which will enable the feature even if hashtags transfer failed for all records.",
+ suggestions: [0.01]
+ },
+ %{
+ key: :sleep_interval_ms,
+ type: :integer,
+ description:
+ "Sleep interval between each chunk of processed records in order to decrease the load on the system (defaults to 0 and should be keep default on most instances)."
+ }
+ ]
+ },
%{
group: :pleroma,
key: :instance,
"Pleroma"
]
},
+ %{
+ key: :languages,
+ type: {:list, :string},
+ description: "Languages the instance uses",
+ suggestions: [
+ "en",
+ "ja",
+ "fr"
+ ]
+ },
%{
key: :email,
label: "Admin Email Address",
5_000
]
},
- %{
- key: :chat_limit,
- type: :integer,
- description: "Character limit of the instance chat messages",
- suggestions: [
- 5_000
- ]
- },
%{
key: :remote_limit,
type: :integer,
%{
key: :allow_relay,
type: :boolean,
- description: "Enable Pleroma's Relay, which makes it possible to follow a whole instance"
+ description:
+ "Permits remote instances to subscribe to all public posts of your instance. (Important!) This may increase the visibility of your instance."
},
%{
key: :public,
},
%{
key: :quarantined_instances,
- type: {:list, :string},
+ type: {:list, :tuple},
+ key_placeholder: "instance",
+ value_placeholder: "reason",
description:
- "List of ActivityPub instances where private (DMs, followers-only) activities will not be sent",
+ "(Deprecated, will be removed in next release) List of ActivityPub instances where activities will not be sent, and the reason for doing so",
suggestions: [
- "quarantined.com",
- "*.quarantined.com"
+ {"quarantined.com", "Reason"},
+ {"*.quarantined.com", "Reason"}
]
},
%{
key: :autofollowed_nicknames,
type: {:list, :string},
description:
- "Set to nicknames of (local) users that every new user should automatically follow",
- suggestions: [
- "lain",
- "kaniini",
- "lanodan",
- "rinpatch"
- ]
+ "Set to nicknames of (local) users that every new user should automatically follow"
+ },
+ %{
+ key: :autofollowing_nicknames,
+ type: {:list, :string},
+ description:
+ "Set to nicknames of (local) users that automatically follows every newly registered user"
},
%{
key: :attachment_links,
key: :show_reactions,
type: :boolean,
description: "Let favourites and emoji reactions be viewed through the API."
+ },
+ %{
+ key: :profile_directory,
+ type: :boolean,
+ description: "Enable profile directory."
+ },
+ %{
+ key: :privileged_staff,
+ type: :boolean,
+ description:
+ "Let moderators access sensitive data (e.g. updating user credentials, get password reset token, delete users, index and read private statuses)"
+ },
+ %{
+ key: :local_bubble,
+ type: {:list, :string},
+ description:
+ "List of instances that make up your local bubble (closely-related instances). Used to populate the 'bubble' timeline (domain only)."
}
]
},
}
]
},
- %{
- key: :chat_message,
- type: :keyword,
- descpiption: "Chat message settings",
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enables sending a chat message to newly registered users"
- },
- %{
- key: :message,
- type: :string,
- description:
- "A message that will be sent to newly registered users as a chat message",
- suggestions: [
- "Hello, welcome on board!"
- ]
- },
- %{
- key: :sender_nickname,
- type: :string,
- description: "The nickname of the local user that sends a welcome chat message",
- suggestions: [
- "lain"
- ]
- }
- ]
- },
%{
key: :email,
type: :keyword,
alwaysShowSubjectInput: true,
background: "/static/aurora_borealis.jpg",
collapseMessageWithSubject: false,
- disableChat: false,
greentext: false,
hideFilteredStatuses: false,
hideMutedPosts: false,
hidePostStats: false,
- hideSitename: false,
hideUserStats: false,
loginMethod: "password",
- logo: "/static/logo.png",
+ logo: "/static/logo.svg",
logoMargin: ".1em",
logoMask: true,
minimalScopesMode: false,
description:
"When a message has a subject (aka Content Warning), collapse it by default"
},
- %{
- key: :disableChat,
- label: "PleromaFE Chat",
- type: :boolean,
- description: "Disables PleromaFE Chat component"
- },
%{
key: :greentext,
label: "Greentext",
type: :boolean,
description: "Hide notices statistics (repeats, favorites, ...)"
},
- %{
- key: :hideSitename,
- label: "Hide Sitename",
- type: :boolean,
- description: "Hides instance name from PleromaFE banner"
- },
%{
key: :hideUserStats,
label: "Hide user stats",
key: :logo,
type: {:string, :image},
description: "URL of the logo, defaults to Pleroma's logo",
- suggestions: ["/static/logo.png"]
+ suggestions: ["/static/logo.svg"]
},
%{
key: :logoMargin,
type: :string,
description: "Which theme to use. Available themes are defined in styles.json",
suggestions: ["pleroma-dark"]
+ },
+ %{
+ key: :showPanelNavShortcuts,
+ label: "Show timeline panel nav shortcuts",
+ type: :boolean,
+ description: "Whether to put timeline nav tabs on the top of the panel"
+ },
+ %{
+ key: :showNavShortcuts,
+ label: "Show navbar shortcuts",
+ type: :boolean,
+ description: "Whether to put extra navigation options on the navbar"
+ },
+ %{
+ key: :showWiderShortcuts,
+ label: "Increase navbar shortcut spacing",
+ type: :boolean,
+ description: "Whether to add extra space between navbar icons"
+ },
+ %{
+ key: :hideSiteFavicon,
+ label: "Hide site favicon",
+ type: :boolean,
+ description: "Whether to hide the instance favicon from the navbar"
+ },
+ %{
+ key: :hideSiteName,
+ label: "Hide site name",
+ type: :boolean,
+ description: "Whether to hide the site name from the navbar"
+ },
+ %{
+ key: :renderMisskeyMarkdown,
+ label: "Render misskey markdown",
+ type: :boolean,
+ description: "Whether to render Misskey-flavoured markdown"
}
]
},
%{
key: :theme_color,
type: :string,
- description: "Describe the theme color of the app",
+ description: "Describe the theme color of the app - this is only used for mastodon-fe",
suggestions: ["#282c37", "mediumpurple"]
},
%{
key: :background_color,
type: :string,
- description: "Describe the background color of the app",
+ description:
+ "Describe the background color of the app - this is only used for mastodon-fe",
suggestions: ["#191b22", "aliceblue"]
}
]
},
%{
group: :pleroma,
- key: :mrf,
- tab: :mrf,
- label: "MRF",
+ key: :media_proxy,
type: :group,
- description: "General MRF settings",
+ description: "Media proxy",
children: [
%{
- key: :policies,
- type: [:module, {:list, :module}],
- description:
- "A list of MRF policies enabled. Module names are shortened (removed leading `Pleroma.Web.ActivityPub.MRF.` part), but on adding custom module you need to use full name.",
- suggestions: {:list_behaviour_implementations, Pleroma.Web.ActivityPub.MRF}
+ key: :enabled,
+ type: :boolean,
+ description: "Enables proxying of remote media via the instance's proxy"
},
%{
- key: :transparency,
- label: "MRF transparency",
- type: :boolean,
+ key: :base_url,
+ label: "Base URL",
+ type: :string,
description:
- "Make the content of your Message Rewrite Facility settings public (via nodeinfo)"
+ "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
+ suggestions: ["https://example.com"]
},
%{
- key: :transparency_exclusions,
- label: "MRF transparency exclusions",
- type: {:list, :string},
- description:
- "Exclude specific instance names from MRF transparency. The use of the exclusions feature will be disclosed in nodeinfo as a boolean value.",
+ key: :invalidation,
+ type: :keyword,
+ descpiption: "",
suggestions: [
- "exclusion.com"
- ]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_simple,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.SimplePolicy",
- label: "MRF Simple",
- type: :group,
- description: "Simple ingress policies",
- children: [
- %{
- key: :media_removal,
- type: {:list, :string},
- description: "List of instances to strip media attachments from",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :media_nsfw,
- label: "Media NSFW",
- type: {:list, :string},
- description: "List of instances to tag all media as NSFW (sensitive) from",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :federated_timeline_removal,
- type: {:list, :string},
- description:
- "List of instances to remove from the Federated (aka The Whole Known Network) Timeline",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :reject,
- type: {:list, :string},
- description: "List of instances to reject activities from (except deletes)",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :accept,
- type: {:list, :string},
- description: "List of instances to only accept activities from (except deletes)",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :followers_only,
- type: {:list, :string},
- description: "Force posts from the given instances to be visible by followers only",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :report_removal,
- type: {:list, :string},
- description: "List of instances to reject reports from",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :avatar_removal,
- type: {:list, :string},
- description: "List of instances to strip avatars from",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :banner_removal,
- type: {:list, :string},
- description: "List of instances to strip banners from",
- suggestions: ["example.com", "*.example.com"]
- },
- %{
- key: :reject_deletes,
- type: {:list, :string},
- description: "List of instances to reject deletions from",
- suggestions: ["example.com", "*.example.com"]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_activity_expiration,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.ActivityExpirationPolicy",
- label: "MRF Activity Expiration Policy",
- type: :group,
- description: "Adds automatic expiration to all local activities",
- children: [
- %{
- key: :days,
- type: :integer,
- description: "Default global expiration time for all local activities (in days)",
- suggestions: [90, 365]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_subchain,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.SubchainPolicy",
- label: "MRF Subchain",
- type: :group,
- description:
- "This policy processes messages through an alternate pipeline when a given message matches certain criteria." <>
- " All criteria are configured as a map of regular expressions to lists of policy modules.",
- children: [
- %{
- key: :match_actor,
- type: {:map, {:list, :string}},
- description: "Matches a series of regular expressions against the actor field",
- suggestions: [
- %{
- ~r/https:\/\/example.com/s => [Pleroma.Web.ActivityPub.MRF.DropPolicy]
- }
- ]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_rejectnonpublic,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.RejectNonPublic",
- description: "RejectNonPublic drops posts with non-public visibility settings.",
- label: "MRF Reject Non Public",
- type: :group,
- children: [
- %{
- key: :allow_followersonly,
- label: "Allow followers-only",
- type: :boolean,
- description: "Whether to allow followers-only posts"
- },
- %{
- key: :allow_direct,
- type: :boolean,
- description: "Whether to allow direct messages"
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_hellthread,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.HellthreadPolicy",
- label: "MRF Hellthread",
- type: :group,
- description: "Block messages with excessive user mentions",
- children: [
- %{
- key: :delist_threshold,
- type: :integer,
- description:
- "Number of mentioned users after which the message gets removed from timelines and" <>
- "disables notifications. Set to 0 to disable.",
- suggestions: [10]
- },
- %{
- key: :reject_threshold,
- type: :integer,
- description:
- "Number of mentioned users after which the messaged gets rejected. Set to 0 to disable.",
- suggestions: [20]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_keyword,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.KeywordPolicy",
- label: "MRF Keyword",
- type: :group,
- description: "Reject or Word-Replace messages with a keyword or regex",
- children: [
- %{
- key: :reject,
- type: {:list, :string},
- description:
- "A list of patterns which result in message being rejected. Each pattern can be a string or a regular expression.",
- suggestions: ["foo", ~r/foo/iu]
- },
- %{
- key: :federated_timeline_removal,
- type: {:list, :string},
- description:
- "A list of patterns which result in message being removed from federated timelines (a.k.a unlisted). Each pattern can be a string or a regular expression.",
- suggestions: ["foo", ~r/foo/iu]
- },
- %{
- key: :replace,
- type: {:list, :tuple},
- description:
- "A list of tuples containing {pattern, replacement}. Each pattern can be a string or a regular expression.",
- suggestions: [{"foo", "bar"}, {~r/foo/iu, "bar"}]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_mention,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.MentionPolicy",
- label: "MRF Mention",
- type: :group,
- description: "Block messages which mention a specific user",
- children: [
- %{
- key: :actors,
- type: {:list, :string},
- description: "A list of actors for which any post mentioning them will be dropped",
- suggestions: ["actor1", "actor2"]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :mrf_vocabulary,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.VocabularyPolicy",
- label: "MRF Vocabulary",
- type: :group,
- description: "Filter messages which belong to certain activity vocabularies",
- children: [
- %{
- key: :accept,
- type: {:list, :string},
- description:
- "A list of ActivityStreams terms to accept. If empty, all supported messages are accepted.",
- suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
- },
- %{
- key: :reject,
- type: {:list, :string},
- description:
- "A list of ActivityStreams terms to reject. If empty, no messages are rejected.",
- suggestions: ["Create", "Follow", "Mention", "Announce", "Like"]
- }
- ]
- },
- # %{
- # group: :pleroma,
- # key: :mrf_user_allowlist,
- # tab: :mrf,
- # related_policy: "Pleroma.Web.ActivityPub.MRF.UserAllowListPolicy",
- # type: :map,
- # description:
- # "The keys in this section are the domain names that the policy should apply to." <>
- # " Each key should be assigned a list of users that should be allowed through by their ActivityPub ID",
- # suggestions: [
- # %{"example.org" => ["https://example.org/users/admin"]}
- # ]
- # ]
- # },
- %{
- group: :pleroma,
- key: :media_proxy,
- type: :group,
- description: "Media proxy",
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enables proxying of remote media to the instance's proxy"
- },
- %{
- key: :base_url,
- label: "Base URL",
- type: :string,
- description:
- "The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts.",
- suggestions: ["https://example.com"]
- },
- %{
- key: :invalidation,
- type: :keyword,
- descpiption: "",
- suggestions: [
- enabled: true,
- provider: Pleroma.Web.MediaProxy.Invalidation.Script
- ],
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enables media cache object invalidation."
- },
- %{
- key: :provider,
- type: :module,
- description: "Module which will be used to purge objects from the cache.",
- suggestions: [
- Pleroma.Web.MediaProxy.Invalidation.Script,
- Pleroma.Web.MediaProxy.Invalidation.Http
- ]
- }
+ enabled: true,
+ provider: Pleroma.Web.MediaProxy.Invalidation.Script
+ ],
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Enables media cache object invalidation."
+ },
+ %{
+ key: :provider,
+ type: :module,
+ description: "Module which will be used to purge objects from the cache.",
+ suggestions: [
+ Pleroma.Web.MediaProxy.Invalidation.Script,
+ Pleroma.Web.MediaProxy.Invalidation.Http
+ ]
+ }
]
},
%{
key: :proxy_opts,
- label: "Proxy Options",
+ label: "Advanced MediaProxy Options",
type: :keyword,
- description: "Options for Pleroma.ReverseProxy",
+ description: "Internal Pleroma.ReverseProxy settings",
suggestions: [
redirect_on_failure: false,
max_body_length: 25 * 1_048_576,
- max_read_duration: 30_000,
- http: [
- follow_redirect: true,
- pool: :media
- ]
+ max_read_duration: 30_000
],
children: [
%{
key: :redirect_on_failure,
type: :boolean,
- description:
- "Redirects the client to the real remote URL if there's any HTTP errors. " <>
- "Any error during body processing will not be redirected as the response is chunked."
+ description: """
+ Redirects the client to the origin server upon encountering HTTP errors.\n
+ Note that files larger than Max Body Length will trigger an error. (e.g., Peertube videos)\n\n
+ **WARNING:** This setting will allow larger files to be accessed, but exposes the\n
+ IP addresses of your users to the other servers, bypassing the MediaProxy.
+ """
},
%{
key: :max_body_length,
type: :integer,
description:
- "Limits the content length to be approximately the " <>
- "specified length. It is validated with the `content-length` header and also verified when proxying."
+ "Maximum file size (in bytes) allowed through the Pleroma MediaProxy cache."
},
%{
key: :max_read_duration,
type: :integer,
- description: "Timeout (in milliseconds) of GET request to remote URI."
- },
- %{
- key: :http,
- label: "HTTP",
- type: :keyword,
- description: "HTTP options",
- children: [
- %{
- key: :adapter,
- type: :keyword,
- description: "Adapter specific options",
- children: [
- %{
- key: :ssl_options,
- type: :keyword,
- label: "SSL Options",
- description: "SSL options for HTTP adapter",
- children: [
- %{
- key: :versions,
- type: {:list, :atom},
- description: "List of TLS version to use",
- suggestions: [:tlsv1, ":tlsv1.1", ":tlsv1.2"]
- }
- ]
- }
- ]
- },
- %{
- key: :proxy_url,
- label: "Proxy URL",
- type: [:string, :tuple],
- description: "Proxy URL",
- suggestions: ["127.0.0.1:8123", {:socks5, :localhost, 9050}]
- }
- ]
+ description: "Timeout (in milliseconds) of GET request to the remote URI."
}
]
},
%{
key: :whitelist,
type: {:list, :string},
- description: "List of hosts with scheme to bypass the mediaproxy",
+ description: "List of hosts with scheme to bypass the MediaProxy",
suggestions: ["http://example.com"]
}
]
key: :min_content_length,
type: :integer,
description:
- "Min content length to perform preview, in bytes. If greater than 0, media smaller in size will be served as is, without thumbnailing."
+ "Min content length (in bytes) to perform preview. Media smaller in size will be served without thumbnailing."
}
]
},
group: :pleroma,
key: Pleroma.Web.MediaProxy.Invalidation.Script,
type: :group,
- description: "Script invalidate settings",
+ description: "Invalidation script settings",
children: [
%{
key: :script_path,
type: :string,
- description: "Path to shell script. Which will run purge cache.",
+ description: "Path to executable script which will purge cached items.",
suggestions: ["./installation/nginx-cache-purge.sh.example"]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :gopher,
- type: :group,
- description: "Gopher settings",
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enables the gopher interface"
- },
- %{
- key: :ip,
- label: "IP",
- type: :tuple,
- description: "IP address to bind to",
- suggestions: [{0, 0, 0, 0}]
},
%{
- key: :port,
- type: :integer,
- description: "Port to bind to",
- suggestions: [9999]
- },
- %{
- key: :dstport,
- type: :integer,
- description: "Port advertised in URLs (optional, defaults to port)",
- suggestions: [9999]
+ key: :url_format,
+ label: "URL Format",
+ type: :string,
+ description:
+ "Optional URL format preprocessing. Only required for Apache's htcacheclean.",
+ suggestions: [":htcacheclean"]
}
]
},
type: :boolean,
description: "Whether to federate blocks to other instances"
},
+ %{
+ key: :blockers_visible,
+ type: :boolean,
+ description: "Whether a user can see someone who has blocked them"
+ },
%{
key: :sign_object_fetches,
type: :boolean,
description: "Sign object fetches with HTTP signatures"
},
+ %{
+ key: :authorized_fetch_mode,
+ type: :boolean,
+ description: "Require HTTP signatures on AP fetches"
+ },
%{
key: :note_replies_output_limit,
type: :integer,
type: :integer,
description: "Following handshake timeout",
suggestions: [500]
+ },
+ %{
+ key: :max_collection_objects,
+ type: :integer,
+ description:
+ "The maximum number of items to fetch from a remote collections. Setting this too low can lead to only getting partial collections, but too high and you can end up fetching far too many objects.",
+ suggestions: [50]
}
]
},
group: :pleroma,
key: Oban,
type: :group,
- description: """
- [Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.
-
- Note: if you are running PostgreSQL in [`silent_mode`](https://postgresqlco.nf/en/doc/param/silent_mode?version=9.1),
- it's advised to set [`log_destination`](https://postgresqlco.nf/en/doc/param/log_destination?version=9.1) to `syslog`,
- otherwise `postmaster.log` file may grow because of "you don't own a lock of type ShareLock" warnings
- (see https://github.com/sorentwo/oban/issues/52).
- """,
+ description:
+ "[Oban](https://github.com/sorentwo/oban) asynchronous job processor configuration.",
children: [
%{
key: :log,
}
]
},
+ %{
+ group: :pleroma,
+ key: Pleroma.Web.Metadata.Providers.Theme,
+ type: :group,
+ description: "Specific provider to hand out themes to instances that scrape index.html",
+ children: [
+ %{
+ key: :theme_color,
+ type: :string,
+ description:
+ "The 'accent color' of the instance, used in places like misskey's instance ticker",
+ suggestions: ["#593196"]
+ }
+ ]
+ },
%{
group: :pleroma,
key: :rich_media,
key: :token_expires_in,
type: :integer,
description: "The lifetime in seconds of the access token",
- suggestions: [600]
+ suggestions: [2_592_000]
},
%{
key: :issue_new_refresh_token,
]
},
%{
- group: :esshd,
- label: "ESSHD",
+ group: :mime,
+ label: "Mime Types",
type: :group,
- description:
- "Before enabling this you must add :esshd to mix.exs as one of the extra_applications " <>
- "and generate host keys in your priv dir with ssh-keygen -m PEM -N \"\" -b 2048 -t rsa -f ssh_host_rsa_key",
- children: [
- %{
- key: :enabled,
- type: :boolean,
- description: "Enables SSH"
- },
- %{
- key: :priv_dir,
- type: :string,
- description: "Dir with SSH keys",
- suggestions: ["/some/path/ssh_keys"]
- },
- %{
- key: :handler,
- type: :string,
- description: "Handler module",
- suggestions: ["Pleroma.BBS.Handler"]
- },
- %{
- key: :port,
- type: :integer,
- description: "Port to connect",
- suggestions: [10_022]
- },
- %{
- key: :password_authenticator,
- type: :string,
- description: "Authenticator module",
- suggestions: ["Pleroma.BBS.Authenticator"]
- }
- ]
- },
- %{
- group: :mime,
- label: "Mime Types",
- type: :group,
- description: "Mime Types settings",
+ description: "Mime Types settings",
children: [
%{
key: :types,
}
]
},
- %{
- group: :pleroma,
- key: :chat,
- type: :group,
- description: "Pleroma chat settings",
- children: [
- %{
- key: :enabled,
- type: :boolean
- }
- ]
- },
%{
group: :pleroma,
key: :http,
%{
key: :proxy_url,
label: "Proxy URL",
- type: [:string, :tuple],
- description: "Proxy URL",
- suggestions: ["localhost:9020", {:socks5, :localhost, 3090}]
- },
- %{
- key: :send_user_agent,
- type: :boolean
+ type: :string,
+ description:
+ "Proxy URL - of the format http://host:port. Advise setting in .exs instead of admin-fe due to this being set at boot-time.",
+ suggestions: ["http://localhost:3128"]
},
%{
key: :user_agent,
}
]
},
- %{
- group: :pleroma,
- key: :mrf_normalize_markup,
- tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.NormalizeMarkup",
- label: "MRF Normalize Markup",
- description: "MRF NormalizeMarkup settings. Scrub configured hypertext markup.",
- type: :group,
- children: [
- %{
- key: :scrub_policy,
- type: :module,
- suggestions: [Pleroma.HTML.Scrubber.Default]
- }
- ]
- },
%{
group: :pleroma,
key: Pleroma.User,
},
%{
group: :pleroma,
- key: Pleroma.Plugs.RemoteIp,
+ key: Pleroma.Web.Plugs.RemoteIp,
type: :group,
description: """
- `Pleroma.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
+ `Pleroma.Web.Plugs.RemoteIp` is a shim to call [`RemoteIp`](https://git.pleroma.social/pleroma/remote_ip) but with runtime configuration.
**If your instance is not behind at least one reverse proxy, you should not enable this plug.**
""",
children: [
%{
key: :headers,
type: {:list, :string},
- description:
- "A list of strings naming the `req_headers` to use when deriving the `remote_ip`. Order does not matter. Default: `~w[forwarded x-forwarded-for x-client-ip x-real-ip]`."
+ description: """
+ A list of strings naming the HTTP headers to use when deriving the true client IP. Default: `["x-forwarded-for"]`.
+ """
},
%{
key: :proxies,
type: {:list, :string},
description:
- "A list of strings in [CIDR](https://en.wikipedia.org/wiki/CIDR) notation specifying the IPs of known proxies. Default: `[]`."
+ "A list of upstream proxy IP subnets in CIDR notation from which we will parse the content of `headers`. Defaults to `[]`. IPv4 entries without a bitmask will be assumed to be /32 and IPv6 /128."
},
%{
key: :reserved,
type: {:list, :string},
- description:
- "Defaults to [localhost](https://en.wikipedia.org/wiki/Localhost) and [private network](https://en.wikipedia.org/wiki/Private_network)."
+ description: """
+ A list of reserved IP subnets in CIDR notation which should be ignored if found in `headers`. Defaults to `["127.0.0.0/8", "::1/128", "fc00::/7", "10.0.0.0/8", "172.16.0.0/12", "192.168.0.0/16"]`
+ """
}
]
},
type: :integer,
description:
"Activity pub routes (except question activities). Default: `nil` (no expiration).",
- suggestions: [30_000, nil]
+ suggestions: [nil]
},
%{
key: :activity_pub_question,
},
%{
group: :pleroma,
- key: :mrf_object_age,
+ key: :mrf_follow_bot,
tab: :mrf,
- related_policy: "Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy",
- label: "MRF Object Age",
+ related_policy: "Pleroma.Web.ActivityPub.MRF.FollowBotPolicy",
+ label: "MRF FollowBot Policy",
type: :group,
- description:
- "Rejects or delists posts based on their timestamp deviance from your server's clock.",
+ description: "Automatically follows newly discovered accounts.",
children: [
%{
- key: :threshold,
- type: :integer,
- description: "Required age (in seconds) of a post before actions are taken.",
- suggestions: [172_800]
- },
- %{
- key: :actions,
- type: {:list, :atom},
- description:
- "A list of actions to apply to the post. `:delist` removes the post from public timelines; " <>
- "`:strip_followers` removes followers from the ActivityPub recipient list ensuring they won't be delivered to home timelines; " <>
- "`:reject` rejects the message entirely",
- suggestions: [:delist, :strip_followers, :reject]
+ key: :follower_nickname,
+ type: :string,
+ description: "The name of the bot account to use for following newly discovered users.",
+ suggestions: ["followbot"]
}
]
},
}
]
},
- %{
- group: :pleroma,
- key: :connections_pool,
- type: :group,
- description: "Advanced settings for `Gun` connections pool",
- children: [
- %{
- key: :connection_acquisition_wait,
- type: :integer,
- description:
- "Timeout to acquire a connection from pool. The total max time is this value multiplied by the number of retries. Default: 250ms.",
- suggestions: [250]
- },
- %{
- key: :connection_acquisition_retries,
- type: :integer,
- description:
- "Number of attempts to acquire the connection from the pool if it is overloaded. Default: 5",
- suggestions: [5]
- },
- %{
- key: :max_connections,
- type: :integer,
- description: "Maximum number of connections in the pool. Default: 250 connections.",
- suggestions: [250]
- },
- %{
- key: :connect_timeout,
- type: :integer,
- description: "Timeout while `gun` will wait until connection is up. Default: 5000ms.",
- suggestions: [5000]
- },
- %{
- key: :reclaim_multiplier,
- type: :integer,
- description:
- "Multiplier for the number of idle connection to be reclaimed if the pool is full. For example if the pool maxes out at 250 connections and this setting is set to 0.3, the pool will reclaim at most 75 idle connections if it's overloaded. Default: 0.1",
- suggestions: [0.1]
- }
- ]
- },
- %{
- group: :pleroma,
- key: :pools,
- type: :group,
- description: "Advanced settings for `Gun` workers pools",
- children:
- Enum.map([:federation, :media, :upload, :default], fn pool_name ->
- %{
- key: pool_name,
- type: :keyword,
- description: "Settings for #{pool_name} pool.",
- children: [
- %{
- key: :size,
- type: :integer,
- description: "Maximum number of concurrent requests in the pool.",
- suggestions: [50]
- },
- %{
- key: :max_waiting,
- type: :integer,
- description:
- "Maximum number of requests waiting for other requests to finish. After this number is reached, the pool will start returning errrors when a new request is made",
- suggestions: [10]
- },
- %{
- key: :recv_timeout,
- type: :integer,
- description: "Timeout for the pool while gun will wait for response",
- suggestions: [10_000]
- }
- ]
- }
- end)
- },
- %{
- group: :pleroma,
- key: :hackney_pools,
- type: :group,
- description: "Advanced settings for `Hackney` connections pools",
- children: [
- %{
- key: :federation,
- type: :keyword,
- description: "Settings for federation pool.",
- children: [
- %{
- key: :max_connections,
- type: :integer,
- description: "Number workers in the pool.",
- suggestions: [50]
- },
- %{
- key: :timeout,
- type: :integer,
- description: "Timeout while `hackney` will wait for response.",
- suggestions: [150_000]
- }
- ]
- },
- %{
- key: :media,
- type: :keyword,
- description: "Settings for media pool.",
- children: [
- %{
- key: :max_connections,
- type: :integer,
- description: "Number workers in the pool.",
- suggestions: [50]
- },
- %{
- key: :timeout,
- type: :integer,
- description: "Timeout while `hackney` will wait for response.",
- suggestions: [150_000]
- }
- ]
- },
- %{
- key: :upload,
- type: :keyword,
- description: "Settings for upload pool.",
- children: [
- %{
- key: :max_connections,
- type: :integer,
- description: "Number workers in the pool.",
- suggestions: [25]
- },
- %{
- key: :timeout,
- type: :integer,
- description: "Timeout while `hackney` will wait for response.",
- suggestions: [300_000]
- }
- ]
- }
- ]
- },
%{
group: :pleroma,
key: :restrict_unauthenticated,
type: :string,
description: "S3 host",
suggestions: ["s3.eu-central-1.amazonaws.com"]
+ },
+ %{
+ key: :region,
+ type: :string,
+ description: "S3 region (for AWS)",
+ suggestions: ["us-east-1"]
}
]
},
description: "Admin frontend",
children: installed_frontend_options
},
+ %{
+ key: :mastodon,
+ type: :map,
+ description: "Mastodon frontend",
+ children: installed_frontend_options
+ },
+ %{
+ key: :swagger,
+ type: :map,
+ description: "Swagger API reference frontend",
+ children:
+ installed_frontend_options ++
+ [
+ %{
+ key: "enabled",
+ label: "Enabled",
+ type: :boolean,
+ description: "Whether to have this enabled at all"
+ }
+ ]
+ },
%{
key: :available,
type: :map,
]
}
]
+ },
+ %{
+ group: :pleroma,
+ key: :majic_pool,
+ type: :group,
+ description: "Majic/libmagic configuration",
+ children: [
+ %{
+ key: :size,
+ type: :integer,
+ description: "Number of majic workers to start.",
+ suggestions: [2]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.User.Backup,
+ type: :group,
+ description: "Account Backup",
+ children: [
+ %{
+ key: :purge_after_days,
+ type: :integer,
+ description: "Remove backup achives after N days",
+ suggestions: [30]
+ },
+ %{
+ key: :limit_days,
+ type: :integer,
+ description: "Limit user to export not more often than once per N days",
+ suggestions: [7]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: ConcurrentLimiter,
+ type: :group,
+ description: "Limits configuration for background tasks.",
+ children: [
+ %{
+ key: Pleroma.Web.RichMedia.Helpers,
+ type: :keyword,
+ description: "Concurrent limits configuration for getting RichMedia for activities.",
+ suggestions: [max_running: 5, max_waiting: 5],
+ children: [
+ %{
+ key: :max_running,
+ type: :integer,
+ description: "Max running concurrently jobs.",
+ suggestion: [5]
+ },
+ %{
+ key: :max_waiting,
+ type: :integer,
+ description: "Max waiting jobs.",
+ suggestion: [5]
+ }
+ ]
+ },
+ %{
+ key: Pleroma.Web.ActivityPub.MRF.MediaProxyWarmingPolicy,
+ type: :keyword,
+ description: "Concurrent limits configuration for MediaProxyWarmingPolicy.",
+ suggestions: [max_running: 5, max_waiting: 5],
+ children: [
+ %{
+ key: :max_running,
+ type: :integer,
+ description: "Max running concurrently jobs.",
+ suggestion: [5]
+ },
+ %{
+ key: :max_waiting,
+ type: :integer,
+ description: "Max waiting jobs.",
+ suggestion: [5]
+ }
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Search,
+ type: :group,
+ label: "Search",
+ description: "General search settings.",
+ children: [
+ %{
+ key: :module,
+ type: :module,
+ description: "Selected search module.",
+ suggestions: {:list_behaviour_implementations, Pleroma.Search.SearchBackend}
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Search.Meilisearch,
+ type: :group,
+ description: "Meilisearch settings.",
+ children: [
+ %{
+ key: :url,
+ type: :string,
+ description: "Meilisearch URL.",
+ suggestion: ["http://127.0.0.1:7700/"]
+ },
+ %{
+ key: :private_key,
+ type: :string,
+ description:
+ "Private key for meilisearch authentication, or `nil` to disable private key authentication.",
+ suggestion: [nil]
+ },
+ %{
+ key: :initial_indexing_chunk_size,
+ type: :integer,
+ description:
+ "Amount of posts in a batch when running the initial indexing operation. Should probably not be more than 100000" <>
+ " since there's a limit on maximum insert size",
+ suggestion: [100_000]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: Pleroma.Search.Elasticsearch.Cluster,
+ label: "Elasticsearch",
+ type: :group,
+ description: "Elasticsearch settings.",
+ children: [
+ %{
+ key: :url,
+ type: :string,
+ description: "Elasticsearch URL.",
+ suggestion: ["http://127.0.0.1:9200/"]
+ },
+ %{
+ key: :username,
+ type: :string,
+ description: "Username to connect to ES. Set to nil if your cluster is unauthenticated.",
+ suggestion: ["elastic"]
+ },
+ %{
+ key: :password,
+ type: :string,
+ description: "Password to connect to ES. Set to nil if your cluster is unauthenticated.",
+ suggestion: ["changeme"]
+ },
+ %{
+ key: :api,
+ type: :module,
+ description:
+ "The API module used by Elasticsearch. Should always be Elasticsearch.API.HTTP",
+ suggestion: [Elasticsearch.API.HTTP]
+ },
+ %{
+ key: :json_library,
+ type: :module,
+ description:
+ "The JSON module used to encode/decode when communicating with Elasticsearch",
+ suggestion: [Jason]
+ },
+ %{
+ key: :indexes,
+ type: :map,
+ description: "The indices to set up in Elasticsearch",
+ children: [
+ %{
+ key: :activities,
+ type: :map,
+ description: "Config for the index to use for activities",
+ children: [
+ %{
+ key: :settings,
+ type: :string,
+ description:
+ "Path to the file containing index settings for the activities index. Should contain a mapping.",
+ suggestion: ["priv/es-mappings/activity.json"]
+ },
+ %{
+ key: :store,
+ type: :module,
+ description: "The internal store module",
+ suggestion: [Pleroma.Search.Elasticsearch.Store]
+ },
+ %{
+ key: :sources,
+ type: {:list, :module},
+ description: "The internal types to use for this index",
+ suggestion: [[Pleroma.Activity]]
+ },
+ %{
+ key: :bulk_page_size,
+ type: :integer,
+ description: "Size for bulk put requests, mostly used on building the index",
+ suggestion: [5000]
+ },
+ %{
+ key: :bulk_wait_interval,
+ type: :integer,
+ description: "Time to wait between bulk put requests (in ms)",
+ suggestion: [15_000]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :translator,
+ type: :group,
+ description: "Translation Settings",
+ children: [
+ %{
+ key: :enabled,
+ type: :boolean,
+ description: "Is translation enabled?",
+ suggestion: [true, false]
+ },
+ %{
+ key: :module,
+ type: :module,
+ description: "Translation module.",
+ suggestions: {:list_behaviour_implementations, Pleroma.Akkoma.Translator}
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :deepl,
+ label: "DeepL",
+ type: :group,
+ description: "DeepL Settings.",
+ children: [
+ %{
+ key: :tier,
+ type: {:dropdown, :atom},
+ description: "API Tier",
+ suggestions: [:free, :pro]
+ },
+ %{
+ key: :api_key,
+ type: :string,
+ description: "API key for DeepL",
+ suggestions: [nil]
+ }
+ ]
+ },
+ %{
+ group: :pleroma,
+ key: :libre_translate,
+ type: :group,
+ description: "LibreTranslate Settings.",
+ children: [
+ %{
+ key: :url,
+ type: :string,
+ description: "URL for libretranslate",
+ suggestion: [nil]
+ },
+ %{
+ key: :api_key,
+ type: :string,
+ description: "API key for libretranslate",
+ suggestion: [nil]
+ }
+ ]
}
]