Pleroma requires some adjustments from the defaults for running the instance locally. The following should help you to get started.
git remote add pleroma 'https://git.pleroma.social/pleroma/pleroma'
localhost
prod.secret.exs
, create dev.secret.exs
MIX_ENV=prod
. We're using dev and that's the default MIX_ENVconfig :pleroma, Pleroma.Web.Endpoint
to http (see examples below)mix phx.server
. Once it's build and started, you can access the instance on http://<host>:<port>
(e.g.http://localhost:4000 ) and should be able to do everything locally you normaly can.Example config to change the scheme to http. Change the port if you want to run on another port.
config :pleroma, Pleroma.Web.Endpoint,
url: [host: "localhost", scheme: "http", port: 4000],
Example config to disable captcha. This makes it a bit easier to create test-users.
config :pleroma, Pleroma.Captcha,
enabled: false
Example config to change the log level to info
config :logger, :console,
# :debug :info :warning :error
level: :info
test.secret.exs
file with the content as shown belowconfig/setup_db.psql
as a template. Copy the file if you want and change the database name, user and password to the values for the test-database (e.g. ‘pleroma_local_test’ for database and user). Then run this file like you did during installation.sudo -Hu postgres psql -c "ALTER USER pleroma_local_test WITH CREATEDB;"
mix test
. The tests should succeed.Example content for the test.secret.exs
file. Feel free to use another user, database name or password, just make sure the database is dedicated for the testing environment.
# Pleroma test configuration
# NOTE: This file should not be committed to a repo or otherwise made public
# without removing sensitive information.
import Config
config :pleroma, Pleroma.Repo,
username: "pleroma_local_test",
password: "mysuperduperpassword",
database: "pleroma_local_test",
hostname: "localhost"
Update Pleroma as explained in the docs. Just make sure you pull from upstream and not from your own fork.
If you develop on a separate branch, it's possible you did migrations that aren't merged into another branch you're working on. If you have multiple things you're working on, it's probably best to set up multiple pleroma's each with their own database. If you finished with a branch and want to switch back to develop to start a new branch from there, you can drop the database and recreate the database (e.g. by using config/setup_db.psql
). The commands to drop and recreate the database can be found in the docs.