This repository contains a complete Docker-based ERPNext installation with fresh MariaDB and Redis setup.
- Fresh Installation: Completely new MariaDB database and Redis cache
- Docker-based: Easy deployment and management
- Optimized Configuration: MariaDB tuned for ERPNext performance
- Backup/Restore: Built-in database backup and restore functionality
- Development Mode: Pre-configured for development with auto-reload
If you have existing ERPNext data, restore from a backup first:
-
List available backups:
make list-backups
-
Restore database from backup:
make restore-db BACKUP_FILE=backups/erpnext_db_YYYYMMDD_HHMMSS.sql
-
Start ERPNext with static assets:
make run-with-static
-
Login to ERPNext:
- Email:
[email protected] - Password: [your usual password]
- Email:
-
Access ERPNext modules:
- Suppliers: http://172.18.0.4:8001/app/supplier
- Customers: http://172.18.0.4:8001/app/customer
- Purchase Invoices: http://172.18.0.4:8001/app/purchase-invoice
- Main Dashboard: http://172.18.0.4:8001/app
Note: If you encounter login issues after restoring, reset your password:
docker exec -it erpnext-app bench --site erpnext.localhost set-password [email protected] your_new_password
For a brand new ERPNext instance:
-
Install ERPNext:
make install
-
Access ERPNext:
- URL: http://localhost:8000
- Username: Administrator
- Password: admin
| Command | Description |
|---|---|
make install |
Install ERPNext with fresh MariaDB and Redis |
make run-with-static |
Run ERPNext with static files support (development mode) |
make list-backups |
List all available database backups |
make restore-db |
Restore database from backup (requires BACKUP_FILE parameter) |
make backup |
Create comprehensive backup (site + database) |
make backup-db |
Create database backup only |
make stop |
Stop all ERPNext services |
make clean |
Remove all containers, volumes, and networks |
make reset-db |
Reset MariaDB database (removes all data) |
make logs |
Show logs from all services |
make shell |
Open shell in ERPNext container |
make status |
Show status of all services |
make restart |
Quick restart of all services |
make update |
Update ERPNext to latest version |
Copy config.env to .env and modify as needed:
cp config.env .envKey configuration options:
MYSQL_ROOT_PASSWORD: MariaDB root passwordMYSQL_PASSWORD: ERPNext database passwordADMIN_PASSWORD: ERPNext admin passwordSITE_NAME: ERPNext site name
The MariaDB configuration is optimized for ERPNext in config/mariadb.cnf:
- InnoDB buffer pool: 1GB
- UTF8MB4 character set
- Optimized for ERPNext workloads
- ERPNext: Main application (port 8000)
- MariaDB: Database server (port 3306)
- Redis: Cache and queue server (port 6379)
If you encounter issues, reset everything:
make clean
make installReset only the database:
make reset-db
make installCheck service logs:
make logsOpen shell in ERPNext container:
make shellComprehensive backup (recommended):
make backupDatabase only:
make backup-dbmake list-backups-
List available backups:
make list-backups
-
Restore specific backup:
make restore-db BACKUP_FILE=backups/erpnext_db_20250920_175433.sql
-
Reset passwords after restore (if needed):
# Reset Administrator password docker exec -it erpnext-app bench --site erpnext.localhost set-admin-password newpassword123 # Reset specific user password docker exec -it erpnext-app bench --site erpnext.localhost set-password [email protected] newpassword123
Important: Restoring a database will overwrite all current data and reset all user passwords to what they were at the time of the backup.
The installation is configured for development with:
- Developer mode enabled
- Auto-update disabled
- Debug logging enabled
For production deployment:
- Change default passwords in
.env - Use proper SSL certificates
- Configure proper backup schedules
- Set up monitoring
- Use external database and Redis if needed
For ERPNext documentation, visit: https://docs.erpnext.com/