Configuration¶
Coneshare's behavior is controlled by two primary configuration files:
.env: Controls the deployment environment, such as service ports and system resource checks.app.env: Configures the Coneshare application itself, including the site domain and email settings.
Environment Configuration (.env)¶
You can customize the installation script and Docker Compose environment by creating a .env file.
Docker Compose Version
Customizing with a .env file requires Docker Compose version 2.17.0 or higher.
To override the default settings, create /opt/coneshare/.env with your desired values. This will override any defaults set within the coneshare-compose/.env file. Commonly modified parameters include:
# The host port that the service is bound to.
CONESHARE_BIND=8999
# The minimum memory (in MB) required by the installation script.
MIN_RAM_HARD=4000
# The minimum CPU cores required by the installation script.
MIN_CPU_HARD=2
Change Service Port¶
By default, Coneshare binds to port 8999. To change this, set CONESHARE_BIND to your desired port in /opt/coneshare/.env.
Adjust System Resource Checks¶
The installation script checks for at least 2 CPU cores and 4 GB of RAM. If your system has fewer resources, you can lower these checks in /opt/coneshare/.env.
install.sh script to apply the new configuration. Warning
Lowering resource requirements may lead to system instability. For production use, we recommend adhering to the default requirements for optimal performance.
Application Configuration (app.env)¶
The app.env file, located at /opt/coneshare/app.env, is generated during installation and contains settings specific to the Coneshare application.
Site Domain¶
You must configure SITE_DOMAIN to match your server's public-facing IP address or domain name. This is critical for generating correct share links.
Edit /opt/coneshare/app.env and set the variable:
# Example: Using an IP address
SITE_DOMAIN=http://10.8.1.1:8999
# Example: Using a domain name
SITE_DOMAIN=https://coneshare.example.com
Email Sending¶
Features like password resets require a configured email service. To enable this, add your SMTP server credentials to /opt/coneshare/app.env.
EMAIL_BACKEND=django.core.mail.backends.smtp.EmailBackend
EMAIL_HOST=smtp.mail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
[email protected]
EMAIL_HOST_PASSWORD=your-email-password
[email protected]
Below is an example for a Gmail account:
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USE_TLS=True
[email protected]
EMAIL_HOST_PASSWORD=your-app-password
[email protected]
Info
The EMAIL_USE_TLS setting depends on your provider's requirements. Port 587 typically requires TLS. For more details, see the Django Email Settings documentation.
After adding the email configuration, restart the service.