# Environment Variables

All server settings are defined using environment variables

<table><thead><tr><th width="254.33333333333331"></th><th></th><th></th></tr></thead><tbody><tr><td><strong>Environment Variable</strong></td><td><strong>Default Value</strong></td><td><strong>Description</strong></td></tr><tr><td><strong>CRYSTAL_ENV</strong></td><td>Development</td><td></td></tr><tr><td><strong>CRYSTAL_LOG_SOURCES</strong></td><td>"*"</td><td></td></tr><tr><td><strong>CRYSTAL_LOG_LEVEL</strong></td><td>debug</td><td></td></tr><tr><td><strong>CRYSTAL_WORKERS</strong></td><td>4</td><td>the number of CPU cores to use</td></tr><tr><td><strong>PORT</strong></td><td>4000</td><td></td></tr><tr><td><strong>PORT_REUSE</strong></td><td>true</td><td></td></tr><tr><td><strong>HOST</strong></td><td>0.0;0.0</td><td>Binds the server to a particular ip address on the host machine</td></tr><tr><td><strong>DATABASE_URL</strong></td><td>postgres://auth_user:auth_pass@db:5432/authority_db?initial_pool_size=10&#x26;checkout_timeout=3P</td><td>PostgreSQL database connection URL</td></tr><tr><td><strong>SECRET_KEY</strong></td><td>secret_key</td><td>The encryption key to use signed JWTs</td></tr><tr><td><strong>CODE_TTL</strong></td><td>5</td><td>Duration in seconds</td></tr><tr><td><strong>ACCESS_TOKEN_TTL</strong></td><td>60</td><td>Duration in seconds</td></tr><tr><td><strong>TEMPLATES_PATH</strong></td><td>./public/templates</td><td></td></tr><tr><td><strong>SESSION_KEY</strong></td><td>session_id</td><td></td></tr><tr><td><strong>BASE_URL</strong></td><td><a href="http://localhost:4000">http://localhost:4000</a></td><td></td></tr><tr><td><strong>DEVICE_CODE_TTL</strong></td><td>300</td><td>Duration in seconds</td></tr><tr><td><strong>SSL_CERT</strong></td><td>""</td><td></td></tr><tr><td><strong>SSL_KEY</strong></td><td>""</td><td></td></tr><tr><td><strong>SSL_CA</strong></td><td>""</td><td></td></tr><tr><td><strong>SSL_MODE</strong></td><td>""</td><td></td></tr></tbody></table>

