PENPOT_
prefix.
Variables are initialized in the docker-compose.yaml
file, as explained in the
Self-hosting guide with [Elestio][1] or [Docker][2].
Additionally, if you are using the developer environment, you may override their values in
the startup scripts, as explained in the [Developer Guide][3].
**NOTE**: All the examples that have values represent the **default** values, and the
examples that do not have values are optional, and inactive by default.
## Common ##
This section will list all common configuration between backend and frontend.
There are two types of configuration: options (properties that require some value) and
flags (that just enables or disables something). All flags are set in a single
PENPOT_FLAGS
environment variable. The envvar is a list of strings using this
format: -\
. For example:
```bash
PENPOT_FLAGS: enable-smtp disable-registration disable-email-verification
```
### Registration ###
Penpot comes with an option to completely disable the registration process;
for this, use the following variable:
```bash
PENPOT_FLAGS: [...] disable-registration
```
You may also want to restrict the registrations to a closed list of domains:
```bash
# comma separated list of domains (backend only)
PENPOT_REGISTRATION_DOMAIN_WHITELIST:
# OR (backend only)
PENPOT_EMAIL_DOMAIN_WHITELIST: path/to/whitelist.txt
```
**NOTE**: Since version 2.1, email whitelisting should be explicitly
enabled with enable-email-whitelist
flag. For backward compatibility, we
autoenable it when PENPOT_REGISTRATION_DOMAIN_WHITELIST
is set with
not-empty content.
### Demo users ###
Penpot comes with facilities for fast creation of demo users without the need of a
registration process. The demo users by default have an expiration time of 7 days, and
once expired they are completely deleted with all the generated content. Very useful for
testing or demonstration purposes.
You can enable demo users using the following variable:
```bash
PENPOT_FLAGS: [...] enable-demo-users
```
### Authentication Providers
To configure the authentication with third-party auth providers you will need to
configure Penpot and set the correct callback of your Penpot instance in the auth-provider
configuration.
The callback has the following format:
```html
https://smpt
flag is disabled, the email will be
printed to the console, which means that the emails will be shown in the stdout.
Note that if you plan to invite members to a team, it is recommended that you enable SMTP
as they will need to login to their account after recieving the invite link sent an in email.
It is currently not possible to just add someone to a team without them accepting an
invatation email.
If you have an SMTP service, uncomment the appropriate settings section in
docker-compose.yml
and configure those
environment variables.
Setting up the default FROM and REPLY-TO:
```bash
# Backend
PENPOT_SMTP_DEFAULT_REPLY_TO: Penpot fs
and s3
(for AWS S3).
#### FS Backend (default) ####
This is the default backend when you use the official docker images and the default
configuration looks like this:
```bash
# Backend
PENPOT_ASSETS_STORAGE_BACKEND: assets-fs
PENPOT_STORAGE_ASSETS_FS_DIRECTORY: /opt/data/assets
```
The main downside of this backend is the hard dependency on nginx approach to serve files
managed by an application (not a simple directory serving static files). But you should
not worry about this unless you want to install it outside the docker container and
configure the nginx yourself.
In case you want understand how it internally works, you can take a look on the [nginx
configuration file][4] used in the docker images.
#### AWS S3 Backend ####
This backend uses AWS S3 bucket for store the user uploaded assets. For use it you should
have an appropriate account on AWS cloud and have the credentials, region and the bucket.
This is how configuration looks for S3 backend:
```bash
# AWS Credentials
AWS_ACCESS_KEY_ID: PENPOT_PUBLIC_URI
environment
variable in case you go to serve Penpot to the users; it should point to public URI
where users will access the application:
```bash
PENPOT_PUBLIC_URI: http://localhost:9001
```
If you plan to serve Penpot under different domain than `localhost` without HTTPS, you need to disable the `secure` flag on cookies, with the `disable-secure-session-cookies` flag. This is a configuration NOT recommended for production environments.
Check all the [flags](#other-flags) to fully customize your instance. ## Frontend ## In comparison with backend, frontend only has a small number of runtime configuration options, and they are located in the\/js/config.js
file.
If you are using the official docker images, the best approach to set any configuration is
using environment variables, and the image automatically generates the config.js
from
them.
**NOTE**: many frontend related configuration variables are explained in the
[Common](#common) section, this section explains **frontend only** options.
But in case you have a custom setup you probably need setup the following environment
variables on the frontend container:
To connect the frontend to the exporter and backend, you need to fill out these environment variables.
```bash
# Frontend
PENPOT_BACKEND_URI: http://your-penpot-backend:6060
PENPOT_EXPORTER_URI: http://your-penpot-exporter:6061
```
These variables are used for generate correct nginx.conf file on container startup.
### Demo warning ###
If you want to show a warning in the register and login page saying that this is a
demonstration purpose instance (no backups, periodical data wipe, ...), set the following
variable:
```bash
PENPOT_FLAGS: [...] enable-demo-warning
```
## Other flags
- enable-cors
: Enables the default cors cofiguration that allows all domains
(this configuration is designed only for dev purposes right now)
- enable-backend-api-doc
: Enables the /api/doc
endpoint that lists all rpc methods available on backend
- disable-email-verification
: Deactivates the email verification process
(only recommended for local or internal setups)
- disable-secure-session-cookies
: By default, Penpot uses the
secure
flag on cookies, this flag disables it;
it is useful if you plan to serve Penpot under different
domain than localhost
without HTTPS
- disable-login-with-password
: allows disable password based login form
- disable-registration
: disables registration (still enabled for invitations only).
- enable-prepl-server
: enables PREPL server, used by manage.py and other additional
tools for communicate internally with Penpot backend
__Since version 1.13.0__
- enable-log-invitation-tokens
: for cases where you don't have email configured, this
will log to console the invitation tokens
- enable-log-emails
: if you want to log in console send emails. This only works if smtp
is not configured
__Since version 2.0.0__
- disable-onboarding-team
: for disable onboarding team creation modal
- disable-onboarding-newsletter
: for disable onboarding newsletter modal
- disable-onboarding-questions
: for disable onboarding survey
- disable-onboarding
: for disable onboarding modal
- disable-dashboard-templates-section
: for hide the templates section from dashboard
- enable-webhooks
: for enable webhooks
- enable-access-tokens
: for enable access tokens
- disable-google-fonts-provider
: disables the google fonts provider (frontend)
[1]: /technical-guide/getting-started#configure-penpot-with-elestio
[2]: /technical-guide/getting-started#configure-penpot-with-docker
[3]: /technical-guide/developer/common#dev-environment
[4]: https://github.com/penpot/penpot/blob/main/docker/images/files/nginx.conf