* Run `mix deps.get` to install elixir dependencies.
- * Run `mix generate_config`. This will ask you a few questions about your instance and generate a configuration file in `config/generated_config.exs`. Check that and copy it to either `config/dev.secret.exs` or `config/prod.secret.exs`. It will also create a `config/setup_db.psql`; you may want to double-check this file in case you wanted a different username, or database name than the default. Then you need to run the script as PostgreSQL superuser (i.e. `sudo su postgres -c "psql -f config/setup_db.psql"`). It will create a pleroma db user, database and will setup needed extensions that need to be set up. Postgresql super-user privileges are only needed for this step.
+ * Run `mix pleroma.gen.instance`. This will ask you questions about your instance and generate a configuration file in `config/generated_config.exs`. Check that and copy it to either `config/dev.secret.exs` or `config/prod.secret.exs`. It will also create a `config/setup_db.psql`, which you should run as the PostgreSQL superuser (i.e., `sudo -u postgres psql -f config/setup_db.psql`). It will create the database, user, and password you gave `mix pleroma.gen.instance` earlier, as well as set up the necessary extensions in the database. PostgreSQL superuser privileges are only needed for this step.
- * For these next steps, the default will be to run pleroma using the dev configuration file, `config/dev.secret.exs`. To run them using the prod config file, prefix each command at the shell with `MIX_ENV=prod`. For example: `MIX_ENV=prod mix phx.server`. You can also simply run `export MIX_ENV=prod` which will set this variable for the rest of the shell session.
+ * For these next steps, the default will be to run pleroma using the dev configuration file, `config/dev.secret.exs`. To run them using the prod config file, prefix each command at the shell with `MIX_ENV=prod`. For example: `MIX_ENV=prod mix phx.server`. Documentation for the config can be found at [``config/config.md``](config/config.md)
* Run `mix ecto.migrate` to run the database migrations. You will have to do this again after certain updates.
* You can check if your instance is configured correctly by running it with `mix phx.server` and checking the instance info endpoint at `/api/v1/instance`. If it shows your uri, name and email correctly, you are configured correctly. If it shows something like `localhost:4000`, your configuration is probably wrong, unless you are running a local development setup.
- * The common and convenient way for adding HTTPS is by using Nginx as a reverse proxy. You can look at example Nginx configuration in `installation/pleroma.nginx`. If you need TLS/SSL certificates for HTTPS, you can look get some for free with letsencrypt: https://letsencrypt.org/
- The simplest way to obtain and install a certificate is to use [Certbot.](https://certbot.eff.org) Depending on your specific setup, certbot may be able to get a certificate and configure your web server automatically.
+ * The common and convenient way for adding HTTPS is by using Nginx as a reverse proxy. You can look at example Nginx configuration in `installation/pleroma.nginx`. If you need TLS/SSL certificates for HTTPS, you can look get some for free with letsencrypt: <https://letsencrypt.org/>. The simplest way to obtain and install a certificate is to use [Certbot.](https://certbot.eff.org) Depending on your specific setup, certbot may be able to get a certificate and configure your web server automatically.
- * [Not tested with system reboot yet!] You'll also want to set up Pleroma to be run as a systemd service. Example .service file can be found in `installation/pleroma.service` you can put it in `/etc/systemd/system/`.
-
## Running
* By default, it listens on port 4000 (TCP), so you can access it on http://localhost:4000/ (if you are on the same machine). In case of an error it will restart automatically.
redirect_on_failure: true
#base_url: "https://cache.pleroma.social"
-# Configure your database
config :pleroma, Pleroma.Repo,
adapter: Ecto.Adapters.Postgres,
- username: "pleroma",
+ username: "<%= dbuser %>",
password: "<%= dbpass %>",
- database: "pleroma_dev",
- hostname: "localhost",
+ database: "<%= dbname %>",
+ hostname: "<%= dbhost %>",
pool_size: 10
+
+ # Enable Strict-Transport-Security once SSL is working:
+ # config :pleroma, :http_security,
+ # sts: true
+
+ # Configure S3 support if desired.
+ # The public S3 endpoint is different depending on region and provider,
+ # consult your S3 provider's documentation for details on what to use.
+ #
+ # config :pleroma, Pleroma.Uploaders.S3,
+ # bucket: "some-bucket",
+ # public_endpoint: "https://s3.amazonaws.com"
+ #
+ # Configure S3 credentials:
+ # config :ex_aws, :s3,
+ # access_key_id: "xxxxxxxxxxxxx",
+ # secret_access_key: "yyyyyyyyyyyy",
+ # region: "us-east-1",
+ # scheme: "https://"
+ #
+ # For using third-party S3 clones like wasabi, also do:
+ # config :ex_aws, :s3,
+ # host: "s3.wasabisys.com"
+
+
+ # Configure Openstack Swift support if desired.
+ #
+ # Many openstack deployments are different, so config is left very open with
+ # no assumptions made on which provider you're using. This should allow very
+ # wide support without needing separate handlers for OVH, Rackspace, etc.
+ #
+ # config :pleroma, Pleroma.Uploaders.Swift,
+ # container: "some-container",
+ # username: "api-username-yyyy",
+ # password: "api-key-xxxx",
+ # tenant_id: "<openstack-project/tenant-id>",
+ # auth_url: "https://keystone-endpoint.provider.com",
+ # storage_url: "https://swift-endpoint.prodider.com/v1/AUTH_<tenant>/<container>",
+ # object_url: "https://cdn-endpoint.provider.com/<container>"
+ #
+