2019-02-13 19:28:35 +00:00
|
|
|
---
|
|
|
|
title: Configuring Plume
|
|
|
|
---
|
|
|
|
|
|
|
|
If you are using PostgreSQL, you have to create a database for Plume.
|
|
|
|
|
|
|
|
```
|
|
|
|
service postgresql start
|
|
|
|
su - postgres
|
|
|
|
createuser -d -P plume
|
|
|
|
createdb -O plume plume
|
|
|
|
```
|
|
|
|
|
|
|
|
Before starting Plume, you'll need to create a configuration file, called `.env`.
|
|
|
|
Here is a sample of what you should put inside.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# The address of the database
|
|
|
|
# (replace USER, PASSWORD, PORT and DATABASE_NAME with your values)
|
|
|
|
#
|
|
|
|
# If you are using SQlite, use the path of the database file (`plume.db` for instance)
|
|
|
|
DATABASE_URL=postgres://USER:PASSWORD@IP:PORT/DATABASE_NAME
|
|
|
|
|
|
|
|
# For PostgreSQL: migrations/postgres
|
|
|
|
# For SQlite: migrations/sqlite
|
|
|
|
MIGRATION_DIRECTORY=migrations/postgres
|
|
|
|
|
|
|
|
# The domain on which your instance will be available
|
|
|
|
BASE_URL=plu.me
|
|
|
|
|
|
|
|
# Secret key used for private cookies and CSRF protection
|
|
|
|
# You can generate one with `openssl rand -base64 32`
|
|
|
|
ROCKET_SECRET_KEY=
|
2019-02-24 19:37:44 +00:00
|
|
|
|
|
|
|
# Mail settings
|
2019-10-23 18:13:54 +00:00
|
|
|
# If you don't want to setup a mail server and/or address for plume
|
|
|
|
# and don't plan to use the "password reset" feature,
|
|
|
|
# you can comment these lines.
|
2019-02-24 19:37:44 +00:00
|
|
|
MAIL_SERVER=smtp.example.org
|
|
|
|
MAIL_USER=example
|
|
|
|
MAIL_PASSWORD=123456
|
|
|
|
MAIL_HELO_NAME=example.org
|
2019-05-30 07:42:08 +00:00
|
|
|
MAIL_ADDRESS=from@example.org
|
2019-02-13 19:28:35 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
For more information about what you can put in your `.env`,
|
|
|
|
see [the documentation about environment variables](/environment).
|
|
|
|
|
|
|
|
Now we need to run migrations. Migrations are scripts used to update
|
2019-04-29 20:34:16 +00:00
|
|
|
the database. To run the migrations, you can do:
|
2019-02-13 19:28:35 +00:00
|
|
|
|
|
|
|
```bash
|
2019-04-29 20:34:16 +00:00
|
|
|
plm migration run
|
2019-02-13 19:28:35 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
Migrations should be run after each update. When in doubt, run them.
|
|
|
|
|
|
|
|
After that, you'll need to setup your instance, and the admin's account.
|
|
|
|
|
|
|
|
```
|
|
|
|
plm instance new
|
|
|
|
plm users new --admin
|
|
|
|
```
|
|
|
|
|
|
|
|
You will also need to initialise search index
|
|
|
|
|
|
|
|
```
|
|
|
|
plm search init
|
|
|
|
```
|
|
|
|
|
|
|
|
For more information about these commands, and the arguments you can give them,
|
2019-02-13 19:32:23 +00:00
|
|
|
check out [their documentation](/CLI).
|
2019-02-13 19:28:35 +00:00
|
|
|
|
|
|
|
Now that Plume is configured, if you are in a production environment you probably
|
|
|
|
want to configure your init system to make it easier to manage.
|
|
|
|
|
2019-02-24 19:37:44 +00:00
|
|
|
<a class="action" href="/installation/init">Configure init system</a>
|