## Installation
Choose your preferred method to install Many Notes:
- Docker with volumes, for a simpler installation (read below)
- Docker with bind mounts, for easy access to shared paths from the host ([read here](./docs/installation/docker-bind-mounts.md))
- Docker with a different database, if you prefer not to use SQLite ([read here](./docs/installation/docker-different-database.md))
### Docker with volumes
**Read the [upgrading guide](./UPGRADING.md) if you are upgrading from a previous version.**
Create a `compose.yaml` file with:
```yaml
services:
php:
image: brufdev/many-notes:latest
restart: unless-stopped
environment:
- APP_URL=http://localhost # address used to access the application
volumes:
- database:/var/www/html/database/sqlite
- logs:/var/www/html/storage/logs
- private:/var/www/html/storage/app/private
- typesense:/var/www/html/typesense
ports:
- 80:8080
volumes:
database:
logs:
private:
typesense:
```
Make sure to change the address used to access the application. Feel free to change anything else if you know what you're doing, and read the customization section below before continue. Then run:
```shell
docker compose up -d
```
## Customization
You can customize Many Notes by adding environment variables to the `compose.yaml` file.
### Custom URL (default: http://localhost)
If you change the default port from 80 or use a reverse proxy with a custom URL, make sure to configure the application URL accordingly. For example, if you change the port to 8080, add:
```yaml
environment:
- APP_URL=http://localhost:8080
```
### Custom timezone (default: UTC)
Check all available timezones [here](https://www.php.net/manual/en/timezones.php). For example, if you want to set the timezone to Amsterdam, add:
```yaml
environment:
- APP_TIMEZONE=Europe/Amsterdam
```
### Custom upload size limit (default: 500M)
Increase the upload size limit to allow for the import of larger files. For example, if you want to increase the limit to 1 GB, add:
```yaml
environment:
- PHP_POST_MAX_SIZE=1G
- PHP_UPLOAD_MAX_FILE_SIZE=1G
```
### Enable OAuth providers
Many Notes supports a convenient way to authenticate with OAuth providers. Typically, these credentials may be retrieved by creating a "developer application" within the dashboard of the service you wish to use. Many Notes currently supports authentication via Authelia, Authentik, Azure, Bitbucket, Facebook, GitHub, GitLab, Google, Keycloak, LinkedIn, Pocket ID, Slack, Twitter, and Zitadel. You can enable multiple providers simultaneously by adding the corresponding environment variables.
For example, to enable GitHub OAuth, add:
```yaml
environment:
- GITHUB_CLIENT_ID=CLIENT_ID # change id
- GITHUB_CLIENT_SECRET=CLIENT_SECRET # change secret
- GITHUB_REDIRECT_URI=http://localhost/oauth/github/callback # change domain and provider
```
Some providers require additional environment variables. Read the [OAuth documentation](./docs/customization/oauth.md) for more information.
### Local authentication (default: true)
Disable local authentication by configuring an OAuth provider and specifying a URL to redirect after logout. For example, to use GitHub OAuth as the only authentication method, add:
```yaml
environment:
# enabling github provider:
- GITHUB_CLIENT_ID=CLIENT_ID # change id
- GITHUB_CLIENT_SECRET=CLIENT_SECRET # change secret
- GITHUB_REDIRECT_URI=http://localhost/oauth/github/callback # change domain and provider
# disabling local authentication:
- GITHUB_POST_LOGOUT_REDIRECT_URI=https://github.com/logout # change URL
- SETTINGS_LOCAL_AUTH_ENABLED=false
```
### Custom email service
Configure an email service to send registration and password reset emails by adding:
```yaml
environment:
- MAIL_MAILER=smtp
- MAIL_HOST=127.0.0.1
- MAIL_PORT=2525
- MAIL_USERNAME=null
- MAIL_PASSWORD=null
- MAIL_ENCRYPTION=null
- MAIL_FROM_ADDRESS=hello@example.com
- MAIL_FROM_NAME="Many Notes"
```
## Frequently Asked Questions
Read the [FAQs](./docs/support/faqs.md) to find the answers to the most common questions.
## Contributing
If you're interested in contributing to Many Notes, please read the [contributing guide](./CONTRIBUTING.md) before submitting a pull request.
## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for the full license text.