MrDoc Deployment Guide
Simple Run
Deployment guide
Deploy MrDoc with Docker (recommended)
Docker image deployment
Deploy with Docker Compose
Manage Docker containers
Deploy MrDoc on Linux
Deploy MrDoc with Nginx + uWSGI
One-click deployment script (no longer maintained)
Baota Panel "Python Project Manager 1.9" deployment
Official Docker image deployment
Deploy MrDoc on Windows
Deploy with Waitress
Windows deployment panel
NAS deployment
Deploying on Zspace NAS
Feiniu FnOS deployment
Update upgrade notes - Open Source Edition
Update upgrade notes - Pro edition
System dependency library description
Migrating native deployment to Docker deployment
Configuration guide
Custom database configuration
Configure PDF generation for collections
Full-text search configuration
Using MySQL database with Docker
Configuring MySQL database to support emoji
Host static file resources with Nginx
Enable SSL with Nginx / Set up HTTPS
Configure reverse proxy/bind domain with Nginx
Nginx handling local video playback
Custom uWSGI configuration
Configuration file description
Data security
Site data backup/site migration
Professional data export and import
Open source data export and import
Data migration from open source to professional edition
Frequently asked questions
What to do if SQLite3 version error occurs?
What if the admin forgets the password?
Error: SyntaxError: invalid syntax
MySQLdb._exceptions.OperationalError: (1366, "Incorrect string value:")
Baota Panel "Python Project Manager" virtual environment usage issues.
View logs/log storage location
403 errors on POST/PUT requests for login, publish, upload, and edit under Nginx/HTTPS
What if I can't access the backend after switching the default login method?
Troubleshooting
Tip sponsorship records
MrDoc deployment server configuration recommendations
Powered by MrDoc Pro
-
+
home
Custom database configuration
# Custom Database Configuration MrDoc uses the `SQLite` database as the default data storage database. If you use the `SQLite` database, you do not need to configure the database separately. For use cases with a small amount of data and no multi-threaded concurrent writes, the default `SQLite` database is sufficient. If your usage environment involves ==concurrent writes==, it is recommended to configure `MySQL`, `PostgreSQL`, or other databases. This documentation site (https://doc.mrodc.pro) uses the default `SQLite` as its backend database. ## Using Other Databases ### Install Database Dependencies >i **Information** > > The official Docker image already includes MySQL and PostgreSQL database dependencies. Docker deployment does not require additional installation. If you need to configure other databases, please first refer to the description of supported databases in the official `Django` documentation: [https://docs.djangoproject.com/zh-hans/4.2/ref/databases/](https://docs.djangoproject.com/zh-hans/4.2/ref/databases/) - For PostgreSQL database, please install `psycopg`, PostgreSQL >= 12 - For MySQL database, please install `mysqlclient`, MySQL >= 8.0 Install the `Python` binding library for the corresponding database. ### Configure the Database Then open the `config.ini` file in the `config` directory of the MrDoc project and fill in the corresponding database information: ``` # engine, specifies the database type, accepts sqlite, mysql, oracle, postgresql engine = sqlite # name indicates the name of the database # name = db_name # user indicates the database username # user = db_user # password indicates the database user password # password = db_pwd # host indicates the database host address # host = db_host # port indicates the database port # port = db_port ``` >d Please note: Be sure to use the backend database connector officially recommended by Django, otherwise unknown errors may occur! > The following operations must be performed before the project runs, otherwise there may be a risk of data loss! ### Initialize the Database >i **Information** > > The official Docker image already includes the database initialization command. Docker deployment does not require additional execution; simply restart the container. Then execute the two database initialization commands: ``` python manage.py makemigrations ``` and: ``` python manage.py migrate ``` ## MySQL Example ### Install mysqlclient ``` pip install mysqlclient ``` ### Configure Database Connection Information Open the configuration file /MrDoc/config/config.ini and modify the relevant information under the `[database]` section to: ``` [database] engine = mysql name = database name user = database username password = database user password host = database connection address port = database connection port ``` ### Initialize the Database Execute the command: ``` python manage.py makemigrations ``` and the command: ``` python manage.py migrate ```
mrdoc
Sept. 29, 2026, 6:34 p.m.
Forward
Favorites
Last
Next
Scan the QR Code
Copy link
Scan the QR code to share.
Copy link
share
link
type
password
Update password
Validity period
Markdown file
Word document
PDF document (print)