<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ibrahim Ahmed on Medium]]></title>
        <description><![CDATA[Stories by Ibrahim Ahmed on Medium]]></description>
        <link>https://medium.com/@ibrahim.ah888?source=rss-6766d4dc3155------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RihNb4HoAeVnPw6MFlnYcg.jpeg</url>
            <title>Stories by Ibrahim Ahmed on Medium</title>
            <link>https://medium.com/@ibrahim.ah888?source=rss-6766d4dc3155------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 23:41:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ibrahim.ah888/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Step-by-Step Workshop: Best Practices for Upgrading ERPNext from v15 to v16-beta]]></title>
            <link>https://medium.com/@ibrahim.ah888/step-by-step-workshop-best-practices-for-upgrading-erpnext-from-v15-to-v16-beta-b9b34e0efd3e?source=rss-6766d4dc3155------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9b34e0efd3e</guid>
            <category><![CDATA[upgrade]]></category>
            <category><![CDATA[migration]]></category>
            <category><![CDATA[frappe-framework]]></category>
            <category><![CDATA[ubuntu-server]]></category>
            <category><![CDATA[erpnext]]></category>
            <dc:creator><![CDATA[Ibrahim Ahmed]]></dc:creator>
            <pubDate>Sat, 22 Nov 2025 11:07:05 GMT</pubDate>
            <atom:updated>2025-11-22T11:07:05.889Z</atom:updated>
            <content:encoded><![CDATA[<p>A Practical Guide for Safe and Successful ERPNext Migration</p><figure><img alt="Step-by-Step Workshop: Best Practices for Upgrading ERPNext from v15 to v16-beta, A Practical Guide for Safe and Successful ERPNext Migration" src="https://cdn-images-1.medium.com/max/1024/1*3NcduN0vIfs9O19GJ7hvMQ.png" /></figure><h3>Introduction</h3><p>Upgrading ERPNext is a critical task that requires careful planning and execution. Unlike simple software updates, migrating an ERP system involves your business data, customizations, and workflows. A wrong move can result in downtime, data loss, or broken functionality.</p><p>After managing numerous ERPNext upgrades across healthcare, manufacturing, and retail sectors, I’ve developed a proven migration strategy that minimizes risk while ensuring a smooth transition.</p><p>In this comprehensive workshop, you’ll learn the <strong>best practice approach</strong>: setting up a fresh v16-beta installation on a new server, testing your custom apps, and performing a controlled migration from your production v15 system.</p><p><strong>Why migrate to a new server instead of upgrading in-place?</strong></p><ul><li><strong>Zero downtime</strong>, Your v15 production system stays online</li><li><strong>Risk-free testing, </strong>Test everything before switching</li><li><strong>Easy rollback, </strong>Keep v15 as fallback if needed</li><li><strong>Clean environment, </strong>No leftover files or configurations</li><li><strong>Parallel operation, </strong>Run both systems during transition</li></ul><h3>What You’ll Learn</h3><p>By the end of this workshop, you’ll be able to:</p><ul><li>Set up a production-ready ERPNext v16-beta environment</li><li>Migrate custom applications with compatibility fixes</li><li>Perform secure full-system backups and transfers</li><li>Execute database migration and handle common issues</li><li>Troubleshoot upgrade problems effectively</li><li>Validate data integrity post-migration</li></ul><h3>Prerequisites</h3><p>Before starting this workshop, ensure you have:</p><h3>Server Requirements:</h3><ul><li>New VPS/server for v16-beta (4GB+ RAM, 40GB+ storage)</li><li>Existing v15 production server (accessible)</li><li>Ubuntu 22.04 LTS on the new server</li><li>Root/sudo access to both servers</li></ul><h3>Access Requirements:</h3><ul><li>SSH access to both servers</li><li>Administrator access to v15 ERPNext</li><li>List of all custom apps installed</li><li>Source code/repositories for custom apps</li></ul><h3>Knowledge Prerequisites:</h3><ul><li>Basic Linux command line skills</li><li>Understanding of ERPNext/Frappe architecture</li><li>Familiarity with bench commands</li><li>Basic troubleshooting abilities</li></ul><h3>Important Safety Notes</h3><p>Before proceeding, understand these critical points:</p><ul><li><strong>ERPNext v16-beta is in BETA, </strong><em>Not recommended for production use yet</em></li><li><strong>Always backup, </strong>Multiple backups, multiple locations</li><li><strong>Test everything, </strong>Don’t rush to production</li><li><strong>Keep v15 running, </strong>Until v16 is fully validated</li><li><strong>Custom apps may break, </strong>API changes require code updates</li><li><strong>Database migrations are irreversible, </strong>Can’t easily rollback</li></ul><blockquote><strong>Golden Rule:</strong> Never perform this upgrade <strong>directly </strong>on your <strong>production </strong>server. Always use a <strong>separate </strong>new server as demonstrated in this workshop.</blockquote><h3>Workshop Overview</h3><p>This workshop follows a systematic approach across 5 main phases:</p><p><strong>Phase 1:</strong> Fresh v16-beta Installation (New Server)<br><strong>Phase 2:</strong> Custom Apps Migration &amp; Compatibility<br><strong>Phase 3:</strong> Full Backup from v15 Server<br><strong>Phase 4:</strong> Restore &amp; Configuration on v16-beta<br><strong>Phase 5:</strong> Migration, Testing &amp; Troubleshooting</p><p>Let’s begin! 🚀</p><h3>Phase 1: Installing ERPNext v16-beta on New Server</h3><h3>Why Start Fresh?</h3><p>Installing v16-beta on a new server provides:</p><ul><li>Clean environment free from v15 residue</li><li>Ability to test without affecting production</li><li>Easy rollback by keeping v15 untouched</li><li>Parallel operation during migration period</li></ul><h3>Step 1.1: Complete v16-beta Installation</h3><p>Rather than repeating the entire installation process here, I’ve created a comprehensive guide that covers every detail:</p><p><strong>👉 Follow this guide:</strong> <a href="https://medium.com/@ibrahim.ah888/step-by-step-guide-to-installing-erpnext-16-beta-on-ubuntu-22-04-lts-484e62f0d480">Step-by-Step Guide to Installing ERPNext 16-beta on Ubuntu 22.04 LTS</a></p><p>This guide covers:</p><ul><li>Ubuntu 22.04 server preparation</li><li>All dependencies (Python, MariaDB, Redis, Node.js)</li><li>Frappe Framework installation</li><li>ERPNext v16-beta installation</li><li>Production setup with SSL</li><li>Security configuration</li></ul><h3>Step 1.2: Verify Installation</h3><p>After completing the installation guide, verify everything works:</p><pre># SSH into your new v16-beta server<br>ssh frappe@your-new-server-ip</pre><pre># Navigate to bench directory<br>cd /home/frappe/frappe-bench<br><br># Check versions<br>bench version<br><br># Expected output:<br># Frappe Framework: 16.x.x-beta (develop)<br># ERPNext: 16.x.x-beta (develop)<br><br># Check if site is running<br>bench list-sites<br><br># Test site access<br>bench start</pre><p>Open your browser and navigate to http://your-server-ip:8000. You should see the ERPNext login screen.</p><blockquote><strong>Checkpoint:</strong> You now have a working ERPNext v16-beta installation with no data.</blockquote><h3>Phase 2: Installing &amp; Adapting Custom Apps</h3><h3>Why Custom Apps Need Attention</h3><p>ERPNext v16-beta introduces several breaking changes in the Frappe Framework API. Custom apps built for v15 may not work immediately and require code modifications.</p><h3>Step 2.1: Identify All Custom Apps on v15</h3><p>On your <strong>OLD v15 server</strong>, list all installed apps:</p><pre># SSH to v15 server<br>ssh frappe@your-v15-server-ip</pre><pre>cd /home/frappe/frappe-bench<br><br># List all apps<br>bench list-apps<br><br># Example output:<br># frappe<br># erpnext<br># hrms<br># my_custom_app<br># company_customization<br># custom_reports</pre><p><strong>Document these apps, </strong>You’ll need to install them on v16-beta.</p><h3>Step 2.2: Check Custom App Repositories</h3><p>For each custom app, note down:</p><ul><li>Repository URL (GitHub, GitLab, Bitbucket)</li><li>Branch name (usually main, master, or version-15)</li><li>Any dependencies or special requirements</li></ul><pre># Check app repository info<br>cd apps/my_custom_app<br>git remote -v<br>git branch</pre><blockquote>Note the output for later</blockquote><h3>Step 2.3: Install Custom Apps on v16-beta Server</h3><p>Now on your <strong>NEW v16-beta server</strong>:</p><pre># SSH to v16-beta server<br>ssh frappe@your-new-v16-server-ip</pre><pre>cd /home/frappe/frappe-bench<br><br># Install each custom app<br># Replace with your actual repository URL<br>bench get-app https://github.com/your-company/my_custom_app.git<br><br># If you need a specific branch:<br>bench get-app --branch main https://github.com/your-company/my_custom_app.git<br><br># Repeat for all custom apps<br>bench get-app https://github.com/your-company/company_customization.git<br>bench get-app https://github.com/your-company/custom_reports.git</pre><blockquote><strong>Important:</strong> Don’t install the apps on your site yet. Just download them to the bench.</blockquote><h3>Step 2.4: Check for Compatibility Issues</h3><p>Some custom apps may have compatibility issues with v16-beta. Common problems include:</p><p><strong>Breaking Changes in v16:</strong></p><ul><li>API method signatures changed</li><li>Deprecated functions removed</li><li>DocType structure modifications</li><li>Permission system updates</li><li>Client script changes</li></ul><p><strong>How to check for issues:</strong></p><pre># Try to build the bench with custom apps<br>cd /home/frappe/frappe-bench<br>bench build</pre><blockquote>If errors appear, note them down</blockquote><h3>Step 2.5: Update Custom Apps for v16 Compatibility</h3><p><strong>For detailed v16 migration guide:</strong> 👉 Check: <a href="https://github.com/frappe/erpnext/wiki/Migration-Guide-To-ERPNext-Version-16">ERPNext v16 Migration Guide</a></p><p>If your custom apps show errors, you need to update the code:</p><p><strong>Common fixes needed:</strong></p><ul><li><strong>Update frappe.whitelist decorators:</strong></li></ul><pre># whitelist decorators<br>@frappe.whitelist()<br>def my_function():<br>    pass<br><br># May need explicit allow_guest<br>@frappe.whitelist(allow_guest=True)  # If guest access needed<br>def my_function():<br>    pass</pre><ul><li><strong>Update get_doc calls:</strong></li></ul><pre># frappe get_doc<br>doc = frappe.get_doc(&quot;DocType&quot;, &quot;name&quot;)<br></pre><ul><li><strong>Update client scripts:</strong></li></ul><pre>frappe.call({<br>    method: &quot;my_app.api.my_function&quot;,<br>    callback: function(r) {<br>        // handle response<br>    }<br>});</pre><h3>Step 2.6: Test Custom Apps Individually</h3><p>Before proceeding, test each custom app:</p><pre># Create a test site<br>bench new-site test-site.local</pre><pre># Install ERPNext on test site<br>bench --site test-site.local install-app erpnext<br><br># Install your custom app<br>bench --site test-site.local install-app my_custom_app<br><br># Check for errors<br>bench --site test-site.local console<br><br># In the console, test basic functions:<br>&gt;&gt;&gt; import my_custom_app<br><br>&gt;&gt;&gt; # Test some functions<br>&gt;&gt;&gt; exit()</pre><p>If errors occur, fix them in your custom app code before proceeding.</p><blockquote><strong>✅ Checkpoint:</strong> All custom apps are downloaded and compatible with v16-beta.</blockquote><h3>Phase 3: Creating Full Backup from v15 Server</h3><p>Now we’ll create a complete backup of your production v15 system.</p><h3>What We’re Backing Up</h3><p>A complete ERPNext backup includes:</p><ul><li><strong>Database</strong> —&gt; All your business data</li><li><strong>Public files</strong> —&gt; Uploaded documents, images (publicly accessible)</li><li><strong>Private files</strong> —&gt; Private attachments, backups</li><li><strong>Site configuration</strong> —&gt; Database credentials, settings</li></ul><h3>Step 3.1: Access Your v15 Server</h3><pre># SSH to your v15 production server<br>ssh frappe@your-v15-server-ip</pre><pre>cd /home/frappe/frappe-bench<br><br># Verify your site name<br>bench list-sites<br><br># Let&#39;s say your site is: production.yourcompany.com</pre><h3>Step 3.2: Create Full Backup (Database &amp; Files)</h3><pre># Create full backup database with files <br>bench --site production.yourcompany.com backup --with-files</pre><pre># Bench will create backups in:<br># ~/frappe-bench/sites/production.yourcompany.com/private/backups/<br><br># List backup files<br>ls -lh ~/frappe-bench/sites/production.yourcompany.com/private/backups/<br><br># You&#39;ll see files like:<br># 20241119_123045-production_yourcompany_com-database.sql.gz<br># 20241119_123045-production_yourcompany_com-files.tar<br># 20241119_123045-production_yourcompany_com-private-files.tar<br># 20241119_123045-production_yourcompany_com-site_config.json</pre><blockquote><strong>Note:</strong> Database backup is compressed (.sql.gz), file backups are tar archives.</blockquote><h3>Step 3.3: Verify Backup Files</h3><p>Always verify your backups are complete:</p><pre># Check database backup<br>cd ~/frappe-bench/sites/production.yourcompany.com/private/backups/</pre><pre># List files with sizes<br>ls -lh<br><br># Database backup should be several MBs to GBs (depending on data)<br># Files backup should include all uploaded content<br># Private files backup should include all private attachments<br><br># Check if files are not corrupted<br>gzip -t 20241119_123045-production_yourcompany_com-database.sql.gz<br><br># If no output, the file is good<br>tar -tzf 20241119_123045-production_yourcompany_com-files.tar &gt; /dev/null<br><br># If no errors, the file is good</pre><h3>Step 3.4: Create Backup Directory and Compress Everything</h3><p>Now let’s organize and compress all backups into a single file:</p><pre># Create a backup directory<br>mkdir -p /home/frappe/migration-backups</pre><pre># Copy all backup files<br>cp ~/frappe-bench/sites/production.yourcompany.com/private/backups/* \<br>   /home/frappe/migration-backups/<br><br># Navigate to backup directory<br>cd /home/frappe/migration-backups/<br><br># List files to verify<br>ls -lh<br><br># You should see:<br># - database.sql.gz<br># - files.tar<br># - private-files.tar<br># - site_config.json<br><br># Create a single compressed file with timestamp<br>DATE=$(date +%Y%m%d_%H%M%S)<br>zip -r v15-migration-backup-${DATE}.zip *<br><br># Or use tar if you prefer<br>tar -czf v15-migration-backup-${DATE}.tar.gz *<br><br># Verify compressed file<br>ls -lh v15-migration-backup-*.zip</pre><blockquote><strong>Example:</strong> Your final backup file might be named v15-migration-backup-20241119_143000.zip</blockquote><h3>Step 3.5: Create Additional Safety Backup</h3><p><strong>Always have multiple backups:</strong></p><p>bash</p><pre># Create a second copy in different location<br>cp v15-migration-backup-*.zip /tmp/</pre><pre># Or upload to cloud storage (recommended)<br><br># Using AWS S3:<br># aws s3 cp v15-migration-backup-*.zip s3://your-backup-bucket/<br><br># Using rsync to another server:<br># rsync -avz v15-migration-backup-*.zip backup-server:/backups/</pre><blockquote><strong>✅ Checkpoint:</strong> You have a complete, verified backup of your v15 system in a single compressed file.</blockquote><h3>Phase 4: Transferring &amp; Restoring to v16-beta Server</h3><h3>Step 4.1: Transfer Backup to v16-beta Server</h3><p>Now we’ll move the backup from v15 to v16-beta server.</p><p><strong>Method 1: Direct Transfer (If both servers can communicate)</strong></p><pre># On v15 server<br>cd /home/frappe/migration-backups/<br><br># Transfer to v16 server<br>scp v15-migration-backup-*.zip frappe@your-v16-server-ip:/home/frappe/backups/<br><br># Enter password when prompted or authorize via public ssh key</pre><p><strong>Method 2: Via Your Local Computer</strong></p><pre># On your local computer<br># Download from v15 server<br>scp frappe@your-v15-server-ip:/home/frappe/migration-backups/v15-migration-backup-*.zip ~/Downloads/<br><br># Upload to v16 server<br>scp ~/Downloads/v15-migration-backup-*.zip frappe@your-v16-server-ip:/home/frappe/backups/</pre><p><strong>Method 3: Via Cloud Storage</strong></p><pre># On v15 server - upload to cloud<br># Using AWS S3:<br>aws s3 cp v15-migration-backup-*.zip s3://your-bucket/<br><br># On v16 server - download from cloud<br>ssh frappe@your-v16-server-ip<br><br>mkdir -p /home/frappe/backups<br><br>cd /home/frappe/backups<br>aws s3 cp s3://your-bucket/v15-migration-backup-*.zip .</pre><h3>Step 4.2: Extract/Restore Backup on v16-beta Server</h3><pre># SSH to v16-beta server<br>ssh frappe@your-v16-server-ip<br><br># Navigate to backups directory<br>cd /home/frappe/backups<br><br># Verify the backup file exists<br>ls -lh v15-migration-backup-*.zip<br><br># Extract the backup<br>unzip v15-migration-backup-*.zip<br><br># Or if you used tar:<br># tar -xzf v15-migration-backup-*.tar.gz<br><br># Verify extracted files<br>ls -lh<br><br># You should now see:<br># - *-database.sql.gz<br># - *-files.tar<br># - *-private-files.tar<br># - site_config.json</pre><h3>Step 4.3: Create New Site on v16-beta</h3><p>Before restoring, create a new site:</p><pre>cd /home/frappe/frappe-bench<br><br># Create new site with same name as v15 (or different)<br>bench new-site production.yourcompany.com<br><br># You&#39;ll be prompted for:<br># - MySQL root password<br># - Administrator password (set a new one, you can change later)<br><br># Install ERPNext on the new site (we can escape this point)<br>bench --site production.yourcompany.com install-app erpnext</pre><h3>Step 4.4: Install Custom Apps on New Site</h3><pre># Install all your custom apps (we can escape this point)<br>bench --site production.yourcompany.com install-app my_custom_app<br>bench --site production.yourcompany.com install-app company_customization<br>bench --site production.yourcompany.com install-app custom_reports<br><br># Continue for all custom apps</pre><blockquote><strong>⚠️ Important:</strong> Install apps in the same order they were installed in v15.</blockquote><h3>Step 4.5: Full Restore The Backup</h3><p>Now restore your v15 database and files to the new v16-beta site:</p><pre>cd /home/frappe/frappe-bench<br><br># Restore database<br>bench --site production.yourcompany.com \<br>    restore /home/frappe/backups/*-database.sql.gz <br>--with-public-files /home/frappe/backups/*-files.tar<br>--with-private-files /home/frappe/backups/*-private-files.tar<br><br># Bench will:<br># - Drop existing database<br># - Create new database<br># - Restore data from backup<br># - This may take several minutes to hours depending on size</pre><h3>Step 4.6: Update Site Configuration</h3><p>The restored database still has v15 configuration. Let’s update it:</p><pre># Edit site_config.json<br>vim ~/frappe-bench/sites/production.yourcompany.com/site_config.json</pre><p><strong>Key settings to verify/update:</strong></p><pre>{<br>  &quot;db_name&quot;: &quot;your_db_name&quot;,<br>  &quot;db_password&quot;: &quot;your_db_password&quot;,<br>  &quot;encryption_key&quot;: &quot;keep_this_same_as_v15&quot;, // &lt;&lt;-Important-&gt;&gt;<br>  &quot;host_name&quot;: &quot;https://production.yourcompany.com&quot;,<br>  <br>  // Ensure these are correct:<br>  &quot;redis_cache&quot;: &quot;redis://localhost:13000&quot;,<br>  &quot;redis_queue&quot;: &quot;redis://localhost:11000&quot;,<br>  &quot;redis_socketio&quot;: &quot;redis://localhost:12000&quot;,<br>  <br>  // Optional but recommended:<br>  &quot;developer_mode&quot;: 0,<br>  &quot;maintenance_mode&quot;: 0,<br>  &quot;scheduler_enabled&quot;: 1<br>}</pre><blockquote><strong>⚠️ Critical:</strong> Keep the same encryption_key from v15, otherwise encrypted fields won&#39;t decrypt!</blockquote><h3>Step 4.7: Fix Permissions</h3><pre># Fix file permissions<br>cd ~/frappe-bench<br>sudo chown -R frappe:frappe sites/production.yourcompany.com<br>chmod -R 755 sites/production.yourcompany.com</pre><blockquote><strong>✅ Checkpoint:</strong> Your v15 data is now restored on v16-beta server, ready for migration.</blockquote><h3>Phase 5: Database Migration &amp; Troubleshooting</h3><p>This is the most critical phase. The database migration updates your data structure from v15 to v16-beta.</p><h3>Step 5.1: Pre-Migration Checks</h3><p>Before migrating, verify everything is in place:</p><pre>cd ~/frappe-bench<br><br># Check site status<br>bench --site production.yourcompany.com doctor<br><br># List installed apps<br>bench --site production.yourcompany.com list-apps<br><br># Verify all custom apps are installed</pre><h3>Step 5.2: Run Migration</h3><blockquote><strong>⚠️ This step is irreversible. Ensure you have backups!</strong></blockquote><pre># Enable maintenance mode (optional but recommended)<br>bench --site production.yourcompany.com set-maintenance-mode on<br><br># Run the migration<br>bench --site production.yourcompany.com migrate<br><br># This will:<br># - Run all pending patches<br># - Update database schema<br># - Migrate data to new structure<br># - This can take 10 minutes to several hours</pre><h3>Step 5.3: Common Migration Issues &amp; Solutions</h3><h4>Issue 1: Custom App Not Installed Error</h4><p><strong>Error:</strong></p><pre>App &#39;my_old_app&#39; is installed on site but not available in bench<br><br>or module not found error</pre><p><strong>Solution:</strong></p><pre># Remove the app from installed apps list<br>bench --site production.yourcompany.com remove-from-installed-apps my_old_app<br><br># Then run migrate again<br>bench --site production.yourcompany.com migrate</pre><h4>Issue 2: Patch Execution Failed</h4><p><strong>Error:</strong></p><pre>Patch frappe.patches.v15_0.some_patch failed</pre><p><strong>Solution:</strong></p><pre># Skip the failed patch (use with caution)<br>bench --site production.yourcompany.com migrate --skip-failing<br><br># Or check the error details:<br>bench --site production.yourcompany.com console<br><br>&gt;&gt;&gt; frappe.db.sql(&quot;SELECT * FROM tabPatch Log WHERE name LIKE &#39;%some_patch%&#39;&quot;)</pre><h4>Issue 3: Missing Custom Fields</h4><p><strong>Error:</strong></p><pre>Custom Field &#39;custom_field_name&#39; does not exist</pre><p><strong>Solution:</strong></p><pre># This usually means the custom field was defined in a custom app<br># Ensure the custom app is installed before migration:<br>bench --site production.yourcompany.com install-app my_custom_app<br><br># Then migrate again<br>bench --site production.yourcompany.com migrate</pre><h4>Issue 4: Version Mismatch</h4><p><strong>Error:</strong></p><pre>Cannot migrate from version 13 to 16</pre><p><strong>Solution:</strong> If you’re migrating from v13 or v14, you must migrate incrementally:</p><pre># You CANNOT jump directly from v13/v14 to v16<br># Required migration path:<br># v13 → v14 → v15 → v16<br><br># Solution: First migrate to v15, then to v16</pre><h4>Issue 5: Database Deadlock</h4><p><strong>Error:</strong></p><pre>Deadlock found when trying to get lock</pre><p><strong>Solution:</strong></p><pre># Restart MariaDB<br>sudo systemctl restart mariadb<br><br># Clear any locks<br>bench --site production.yourcompany.com clear-cache<br><br># Run migrate again<br>bench --site production.yourcompany.com migrate</pre><h3>Step 5.4: Post-Migration Tasks</h3><p>After successful migration:</p><pre># Clear cache<br>bench --site production.yourcompany.com clear-cache<br><br># Clear website cache<br>bench --site production.yourcompany.com clear-website-cache<br><br># Rebuild search index<br>bench --site production.yourcompany.com build-search-index<br><br># Build assets<br>bench build --app frappe --app erpnext<br><br># Build custom app assets<br>bench build --app my_custom_app</pre><h3>Step 5.5: Restart All Services</h3><pre># Restart bench<br>bench restart<br><br># If using production setup:<br>sudo supervisorctl restart all<br>sudo systemctl restart nginx</pre><h3>Step 5.6: Disable Maintenance Mode</h3><p>bash</p><pre># Turn off maintenance mode<br>bench --site production.yourcompany.com set-maintenance-mode off<br><br># Enable scheduler<br>bench --site production.yourcompany.com enable-scheduler</pre><blockquote><strong>✅ Checkpoint:</strong> Migration is complete! Time to test everything.</blockquote><h3>Phase 6: Testing &amp; Validation</h3><p>Never skip testing. This is where you verify everything works correctly.</p><h3>Step 6.1: Basic Functionality Tests</h3><p><strong>Test 1: Login</strong></p><p>bash</p><pre># Start bench (if not running)<br>bench start<br><br># Or if production setup, just access via domain</pre><ul><li>Open browser: <a href="http://your-v16-server-ip:8000/">http://your-v16-server-ip:8000</a></li><li>Login with Administrator credentials</li><li>Verify login successful</li></ul><p><strong>Test 2: Dashboard &amp; Navigation</strong></p><ul><li>Check if dashboard loads</li><li>Navigate through different modules</li><li>Verify no JavaScript errors (check browser console F12)</li></ul><p><strong>Test 3: Data Integrity</strong></p><pre>✓ Check Customer list - verify all customers present<br>✓ Check Item list - verify products/services<br>✓ Check Quotations/Sales Orders - recent records<br>✓ Check Purchase Orders - recent records<br>✓ Check Stock Ledger - quantities correct<br>✓ Check General Ledger - account balances correct</pre><h3>Step 6.2: Custom App Functionality</h3><p>Test each custom app thoroughly:</p><pre>✓ Access custom DocTypes<br>✓ Test custom reports<br>✓ Verify custom workflows<br>✓ Check custom scripts<br>✓ Test custom APIs<br>✓ Verify custom print formats</pre><h3>Step 6.3: File Attachments</h3><pre>✓ Open documents with attachments<br>✓ Verify files download correctly<br>✓ Try uploading new files<br>✓ Check image display in forms</pre><h3>Step 6.4: Performance Check</h3><pre># Check site performance<br>bench --site production.yourcompany.com doctor<br><br># Monitor logs<br>tail -f ~/frappe-bench/logs/web.log<br>tail -f ~/frappe-bench/logs/error.log<br><br># Check database queries<br>bench --site production.yourcompany.com mariadb<br><br># In MySQL:<br>SHOW PROCESSLIST;</pre><h3>Step 6.5: Create Test Transactions</h3><p><strong>Don’t skip this!</strong> Create test transactions:</p><ul><li>New Sales Quotation</li><li>New Sales Order</li><li>New Purchase Order</li><li>New Payment Entry</li><li>New Stock Entry</li><li>New Journal Entry</li></ul><p>Verify calculations, taxes, and workflows work correctly.</p><h3>Step 6.6: User Acceptance Testing</h3><p>Have key users test:</p><ul><li>Their daily workflows</li><li>Reports they use</li><li>Any custom features</li><li>Mobile access (if applicable)</li></ul><p><strong>Document Issues:</strong> Create a list of any issues found for resolution.</p><blockquote><strong>✅ Checkpoint:</strong> All tests passed, system is ready for production consideration.</blockquote><h3>Advanced Troubleshooting</h3><h3>Issue: Slow Performance After Migration</h3><p><strong>Symptoms:</strong></p><ul><li>Pages loading slowly</li><li>Reports timing out</li><li>Database queries taking too long</li></ul><p><strong>Solution:</strong></p><pre># Optimize database tables<br>bench --site production.yourcompany.com mariadb<br><br># In MySQL:<br>OPTIMIZE TABLE `tabSales Order`;<br>OPTIMIZE TABLE `tabSales Invoice`;<br>OPTIMIZE TABLE `tabPurchase Order`;<br>-- Continue for major tables<br><br># Analyze tables<br>ANALYZE TABLE `tabSales Order`;<br><br># Rebuild indexes<br>bench --site production.yourcompany.com migrate --rebuild-index<br><br># Clear all caches<br>bench --site production.yourcompany.com clear-cache<br>bench clear-website-cache</pre><h3>Issue: Custom Reports Not Working</h3><p><strong>Symptoms:</strong></p><ul><li>Custom reports showing errors</li><li>Report Builder queries failing</li></ul><p><strong>Solution:</strong></p><pre># Rebuild report cache<br>bench --site production.yourcompany.com build-search-index<br><br># Check report definition<br>bench --site production.yourcompany.com console<br><br>&gt;&gt;&gt; report = frappe.get_doc(&quot;Report&quot;, &quot;Your Custom Report&quot;)<br>&gt;&gt;&gt; print(report.json)<br>&gt;&gt;&gt; # Check if query is compatible with v16</pre><h3>Issue: Email Sending Failed</h3><p><strong>Symptoms:</strong></p><ul><li>Emails not being sent</li><li>Error in email queue</li></ul><p><strong>Solution:</strong></p><pre># Check email configuration<br>bench --site production.yourcompany.com console<br><br>&gt;&gt;&gt; email_account = frappe.get_doc(&quot;Email Account&quot;, &quot;Your Email Account&quot;)<br>&gt;&gt;&gt; print(email_account.as_dict())<br><br># Test email<br>&gt;&gt;&gt; frappe.sendmail(<br>...     recipients=&quot;test@example.com&quot;,<br>...     subject=&quot;Test Email&quot;,<br>...     message=&quot;Testing email after migration&quot;<br>... )<br><br># Clear email queue<br>bench --site production.yourcompany.com trigger-scheduler-event all</pre><h3>Issue: Print Formats Broken</h3><p><strong>Symptoms:</strong></p><ul><li>PDFs not generating</li><li>Print formats showing errors</li></ul><p><strong>Solution:</strong></p><pre># Rebuild print format cache<br>bench --site production.yourcompany.com clear-cache<br><br># Check wkhtmltopdf<br>wkhtmltopdf --version<br><br># Test PDF generation<br>bench --site production.yourcompany.com console<br><br>&gt;&gt;&gt; from frappe.utils.pdf import get_pdf<br>&gt;&gt;&gt; html = &quot;&lt;h1&gt;Test PDF&lt;/h1&gt;&quot;<br>&gt;&gt;&gt; get_pdf(html)</pre><h3>Production Cutover Checklist</h3><p>When you’re ready to switch from v15 to v16-beta in production:</p><h3>1 Week Before:</h3><ul><li>Complete all testing on v16-beta</li><li>Document all issues and resolutions</li><li>Train key users on any v16 changes</li><li>Prepare rollback plan</li><li>Schedule maintenance window</li><li>Notify all users of upcoming change</li></ul><h3>1 Day Before:</h3><ul><li>Create fresh backup of v15</li><li>Verify v16-beta system is stable</li><li>Test all critical workflows again</li><li>Prepare communication to users</li><li>Set up monitoring alerts</li></ul><h3>Cutover Day:</h3><p><strong>Step 1: Final v15 Backup (Critical!)</strong></p><pre># On v15 server<br>bench --site production.yourcompany.com set-maintenance-mode on<br>bench --site production.yourcompany.com backup<br># Copy backup to safe location</pre><p><strong>Step 2: Sync Latest Data</strong></p><pre># Transfer latest backup to v16 server<br># Restore on v16-beta<br># Run migration</pre><p><strong>Step 3: DNS/Domain Switch</strong></p><pre># Point your domain to new v16-beta server<br># Update DNS A record<br># Or update load balancer</pre><p><strong>Step 4: Monitor Closely</strong></p><pre># Watch logs<br>tail -f ~/frappe-bench/logs/*.log<br><br># Monitor user feedback<br># Have support team ready</pre><p><strong>Step 5: Keep v15 for 1 Week</strong></p><pre># Don&#39;t delete v15 server yet<br># Keep as emergency rollback option<br># Monitor v16 for any critical issues</pre><h3>Rollback Procedure</h3><p>If critical issues occur :) , you can rollback:</p><h3>Quick Rollback (DNS Switch)</h3><pre># Simply point DNS back to v15 server<br># Users will be back on v15 within minutes</pre><h3>Data Sync Rollback</h3><p>If users created data on v16:</p><pre># 1. Set v16 to maintenance mode<br>bench --site production.yourcompany.com set-maintenance-mode on<br><br># 2. Export new data from v16<br>bench --site production.yourcompany.com export-doc &quot;Sales Order&quot; --filters &quot;creation &gt; &#39;2024-11-19&#39;&quot;<br><br># 3. Import to v15<br># 4. Switch DNS back to v15</pre><h3>Best Practices &amp; Recommendations</h3><h3>Do’s ✅</h3><p>✅ <strong>Always use a new server for major upgrades</strong><br> ✅ <strong>Test thoroughly before production cutover</strong><br> ✅ <strong>Keep multiple backup copies</strong><br> ✅ <strong>Document all customizations</strong><br> ✅ <strong>Update custom apps for v16 compatibility</strong><br> ✅ <strong>Run migration during off-peak hours</strong><br> ✅ <strong>Monitor system closely after upgrade</strong><br> ✅ <strong>Keep v15 server for 1–2 weeks as fallback</strong><br> ✅ <strong>Train users on any new features</strong><br> ✅ <strong>Have a rollback plan ready</strong></p><h3>Don’ts ❌</h3><p>❌ <strong>Never upgrade directly on production server</strong><br> ❌ <strong>Don’t skip backup verification</strong><br> ❌ <strong>Don’t rush the testing phase</strong><br> ❌ <strong>Don’t ignore migration errors</strong><br> ❌ <strong>Don’t delete v15 server immediately</strong><br> ❌ <strong>Don’t forget to update custom apps</strong><br> ❌ <strong>Don’t migrate without maintenance window</strong><br> ❌ <strong>Don’t ignore user feedback post-upgrade</strong><br> ❌ <strong>Don’t forget to clear caches</strong><br> ❌ <strong>Don’t skip the testing checklist</strong></p><h3>Your Feedback Matters!</h3><p>This guide is based on real-world experience, but every ERPNext installation is unique. If you encounter issues not covered here, please share them in the comments!</p><p><strong>Questions?</strong> Drop them below and I’ll do my best to help.</p><p><strong>Found this helpful?</strong> Give it a clap and share with your ERPNext community! 👏</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9b34e0efd3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Step-by-Step Guide to Installing ERPNext 16-beta on Ubuntu 22.04 LTS]]></title>
            <link>https://medium.com/@ibrahim.ah888/step-by-step-guide-to-installing-erpnext-16-beta-on-ubuntu-22-04-lts-484e62f0d480?source=rss-6766d4dc3155------2</link>
            <guid isPermaLink="false">https://medium.com/p/484e62f0d480</guid>
            <category><![CDATA[installation-guide]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[self-hosting]]></category>
            <category><![CDATA[frappe-framework]]></category>
            <category><![CDATA[erpnext]]></category>
            <dc:creator><![CDATA[Ibrahim Ahmed]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 09:33:16 GMT</pubDate>
            <atom:updated>2025-11-20T09:33:16.091Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Step-by-Step Guide to Installing ERPNext 16-beta on Ubuntu 22.04 LTS" src="https://cdn-images-1.medium.com/max/1024/1*SvGsdvCCRu-n3YtKNM1Mkg.png" /></figure><h3>Introduction</h3><p>Installing <strong>ERPNext 16-beta </strong>version 16.0.0-beta.1 on <strong>Ubuntu 22.04 LTS</strong> is a game-changing decision for businesses seeking a robust, modern, and open-source ERP solution. ERPNext combines powerful features for accounting, inventory management, manufacturing, HR, and more, all in one integrated platform.</p><p>This comprehensive guide provides a clear, tested path to deploy ERPNext 16-beta on Ubuntu 22.04 LTS, ensuring you have a <strong>production-ready, secure, and optimized</strong> installation.</p><p>Whether you’re a business owner, system administrator, or developer, this guide will walk you through every step, from initial server setup to production deployment with SSL.</p><h3>Prerequisites</h3><p>Before we begin, ensure you have:</p><h3>Software Requirements:</h3><ul><li>Ubuntu 22.04 LTS (64-bit) fresh installation</li><li>User with sudo privileges</li><li>Python 3.10+ (included with Ubuntu 22.04)</li><li>Node.js 20</li></ul><h3>Hardware Requirements:</h3><p>Specification Development / Production Server</p><ul><li><strong>CPU:</strong> 2 cores / 4+ cores</li><li><strong>RAM:</strong> 4 GB / 8–16 GB</li><li><strong>Storage</strong> 20 GB / 50+ GB SSD</li></ul><h3>Access Requirements:</h3><ul><li>Root or sudo privileges</li><li>SSH access (for remote servers)</li><li>Domain name (optional, for production with SSL)</li></ul><h3>Let’s Get Started!</h3><h4>Server Setup</h4><p>Update Your System</p><p>Start with a fully updated system to ensure security and compatibility:</p><pre>sudo apt-get update -y<br>sudo apt-get upgrade -y<br>sudo apt-get install -y git wget curl build-essential software-properties-common</pre><h4>Step 1: Create a Dedicated Frappe User</h4><p>For <strong>security best practices</strong>, ERPNext should run under a dedicated non-root user:</p><pre># Create the frappe user<br>sudo adduser frappe --gecos &quot;Frappe User,,,,&quot; --disabled-password</pre><pre># Set a strong password<br>sudo passwd frappe</pre><pre># Add to sudo group<br>sudo usermod -aG sudo frappe</pre><pre># Switch to frappe user<br>sudo su - frappe<br>cd /home/frappe</pre><h4>Step 2: Install Essential Dependencies</h4><p>Python Development Tools</p><p>Ubuntu 22.04 includes Python 3.10 , It’s perfect for ERPNext 16-beta! Let’s install the necessary packages:</p><pre># Install Python and development libraries<br>sudo apt-get install -y \<br>    python3-dev \<br>    python3-pip \<br>    python3-setuptools \<br>    python3-distutils \<br>    python3.10-venv \<br>    libssl-dev \<br>    libffi-dev \<br>    libxml2-dev \<br>    libxslt1-dev \<br>    zlib1g-dev \<br>    libsasl2-dev \<br>    libldap2-dev \<br>    libjpeg-dev \<br>    libcups2-dev \<br>    libpq-dev \<br>    libtiff5-dev \<br>    libmysqlclient-dev</pre><pre># Verify Python version<br>python3 --version  # Should show Python 3.10.x</pre><h4>PDF Generation Tool</h4><blockquote><em>wkhtmltopdf enables ERPNext to generate beautiful PDF invoices, reports, and documents.</em></blockquote><pre># Install wkhtmltopdf for PDF generation<br>sudo apt-get install -y xvfb libfontconfig wkhtmltopdf</pre><h4>Step 3: Install and Configure MariaDB</h4><p>MariaDB is the powerful database engine that powers ERPNext.</p><h4>Install MariaDB 10.6+</h4><pre># Add MariaDB repository<br>curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash -s -- --mariadb-server-version=10.6</pre><pre># Install MariaDB<br>sudo apt-get update<br>sudo apt-get install -y mariadb-server mariadb-client</pre><pre># Start and enable the service<br>sudo systemctl start mariadb<br>sudo systemctl enable mariadb</pre><pre># Verify installation<br>mysql --version</pre><h4>Secure Your Database</h4><pre>sudo mysql_secure_installation</pre><p><strong>Follow these prompts:</strong></p><blockquote><em>Save your MariaDB root password securely, you’ll need it later every time you want to create new site.</em></blockquote><pre>✅ Switch to unix_socket authentication? → N<br>✅ Change the root password? → Y (set a strong password!)<br>✅ Remove anonymous users? → Y<br>✅ Disallow root login remotely? → Y<br>✅ Remove test database? → Y<br>✅ Reload privilege tables now? → Y</pre><p>Configure MariaDB for ERPNext</p><blockquote><em>These settings optimize MariaDB for ERPNext’s workload patterns.</em></blockquote><pre># Edit configuration file<br>sudo nano /etc/mysql/mariadb.conf.d/50-server.cnf</pre><p><strong>Add these settings under </strong><strong>[mysqld]:</strong></p><pre>[mysqld]<br># Character Set - UTF8MB4 for international support<br>character-set-client-handshake = FALSE<br>character-set-server = utf8mb4<br>collation-server = utf8mb4_unicode_ci</pre><pre># Performance Settings<br>innodb_file_format = Barracuda<br>innodb_file_per_table = 1<br>innodb_large_prefix = 1<br>innodb_buffer_pool_size = 1G<br>max_connections = 200<br>max_allowed_packet = 256M</pre><pre>[mysql]<br>default-character-set = utf8mb4</pre><p><strong>Save, exit, and restart:</strong></p><pre>sudo systemctl restart mariadb</pre><h4>Step 4: Install Redis Server</h4><p>Redis provides fast caching and background job queuing:</p><pre># Install Redis<br>sudo apt-get install -y redis-server</pre><pre># Start and enable<br>sudo systemctl start redis-server<br>sudo systemctl enable redis-server</pre><pre># Test it&#39;s working<br>redis-cli ping  # Should return: PONG</pre><h4>Step 5: Install Node.js 20.x</h4><blockquote><em>Node.js builds ERPNext’s modern, responsive user interface.</em></blockquote><p>ERPNext 16-beta requires Node.js 20 for building frontend assets. We’ll use <strong>NVM</strong> (Node Version Manager) for easy management:</p><pre># Install NVM<br>curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash</pre><pre># Load NVM into your session<br>export NVM_DIR=&quot;$HOME/.nvm&quot;<br>[ -s &quot;$NVM_DIR/nvm.sh&quot; ] &amp;&amp; \. &quot;$NVM_DIR/nvm.sh&quot;</pre><pre># Install Node.js 20<br>nvm install 20<br>nvm use 20<br>nvm alias default 20</pre><pre># Verify<br>node --version  # Should show v20.x.x<br>npm --version</pre><pre># Install Yarn<br>npm install -g yarn<br>yarn --version</pre><h4>Step 6: Install Frappe Bench</h4><blockquote><strong><em>What is Bench?</em></strong><em> It’s a powerful CLI tool that manages ERPNext sites, apps, backups, updates, and more!</em></blockquote><p><strong>Frappe Bench</strong> is your command center for managing ERPNext:</p><pre># Install Bench CLI<br>sudo pip3 install frappe-bench</pre><pre># Verify installation<br>bench --version</pre><h4>Step 7: Initialize Frappe Bench</h4><p>Create your bench environment with Frappe v16-beta:</p><pre># Navigate to home directory<br>cd /home/frappe</pre><pre># Initialize bench (this takes 5-10 minutes)<br>bench init --frappe-branch version-16-beta frappe-bench --verbose</pre><pre># Navigate to bench directory<br>cd frappe-bench</pre><pre># Set proper permissions<br>chmod -R o+rx /home/frappe</pre><p><strong>What’s happening?</strong></p><ul><li>Cloning Frappe Framework</li><li>Setting up Python virtual environment</li><li>Installing dependencies</li><li>Building frontend assets</li></ul><h4>Step 8: Create Your First Site</h4><p>A “site” is an instance of your ERPNext system:</p><pre># Create a new site<br>bench new-site mysite.local</pre><pre># You&#39;ll be prompted for:<br># - MySQL root password (from MariaDB setup)<br># - Administrator password (for ERPNext login - save this!)</pre><blockquote><strong><em>Save Your Password!</em></strong><em> The Administrator password is your master key to ERPNext.</em></blockquote><p><strong>Site Naming Tips:</strong></p><ul><li>Development: mysite.local, dev.local</li><li>Production: erp.yourcompany.com</li></ul><h4>Step 9: Install ERPNext</h4><p>Get ERPNext Application</p><pre># Get ERPNext v16-beta<br>bench get-app --branch version-16-beta erpnext</pre><p>Install on Current Site</p><pre># Install ERPNext application<br>bench --site mysite.local install-app erpnext</pre><p><strong>Installation includes:</strong></p><ul><li>Accounting modules</li><li>Inventory management</li><li>Manufacturing</li><li>Sales &amp; CRM</li><li>Purchasing</li><li>HR basics</li><li>And much more!</li></ul><h4>Step 10: Optional Apps</h4><p>HRMS (Human Resources)</p><pre>bench get-app --branch version-16-beta hrms<br>bench --site mysite.local install-app hrms</pre><p>Payments Integration</p><pre>bench get-app --branch develop payments<br>bench --site mysite.local install-app payments</pre><h3>KSA Compliance</h3><p>For Saudi Arabia businesses:</p><pre>bench get-app https://github.com/lavaloon-eg/ksa_compliance.git<br>bench --site mysite.local install-app ksa_compliance</pre><blockquote><em>🇸🇦 </em><strong><em>KSA Compliance </em></strong><em>— offered by Lavaloon (an Egyptian company), is a free and open-source Frappe application for ZATCA compliance, supporting both Phase 1 and Phase 2.</em></blockquote><h4>Step 11: Test Your Installation</h4><p>Let’s see it in action!</p><pre># Start development server<br>cd /home/frappe/frappe-bench<br>bench start</pre><p><strong>Access ERPNext:</strong></p><ul><li>Browser: <a href="http://your-server-ip:8000/">http://your-server-ip:8000</a></li><li>Username: Administrator</li><li>Password: (your Administrator password)</li></ul><blockquote><em>You should see the ERPNext login screen!</em></blockquote><p><strong>To stop:</strong> Press Ctrl + C in terminal window</p><h4>Step 12: Production Setup</h4><p>For production, we need proper web server and process management:</p><p>Install Nginx and Supervisor</p><pre>sudo apt-get install -y nginx supervisor</pre><p>Configure Production Environment</p><pre># Setup production<br>cd /home/frappe/frappe-bench<br>sudo bench setup production frappe</pre><pre># Answer &#39;yes&#39; to both prompts</pre><p><strong>This configures:</strong></p><ul><li>Nginx as reverse proxy</li><li>Supervisor for process management</li><li>Automatic restarts on failure</li><li>Log rotation</li><li>Proper permissions</li></ul><h4>Enable Your Site</h4><pre># Enable scheduler for background jobs<br>bench --site mysite.local enable-scheduler</pre><pre># Disable maintenance mode<br>bench --site mysite.local set-maintenance-mode off</pre><pre># Set as default site<br>bench use mysite.local</pre><pre># Restart everything<br>sudo supervisorctl reread<br>sudo supervisorctl update<br>sudo supervisorctl restart all<br>sudo systemctl reload nginx</pre><p>Configure Firewall (!Important)</p><pre># Install firewall<br>sudo apt-get install -y ufw</pre><pre># Allow necessary ports<br>sudo ufw allow 22/tcp   # SSH<br>sudo ufw allow 80/tcp   # HTTP<br>sudo ufw allow 443/tcp  # HTTPS</pre><pre># Enable firewall<br>sudo ufw --force enable<br>sudo ufw status</pre><blockquote><strong><em>Security First:</em></strong><em> Always configure your firewall!</em></blockquote><h4>Step 13: Setup SSL (HTTPS)</h4><p>For production, <strong>always use SSL</strong>:</p><h4>Prerequisites:</h4><ul><li>Domain name pointing to your server</li><li>Ports 80 and 443 open</li></ul><h4>Install Certbot</h4><pre>sudo apt-get install -y certbot python3-certbot-nginx</pre><h4>Get SSL Certificate</h4><pre># Replace mysite.local with your actual domain<br>sudo bench setup lets-encrypt mysite.local</pre><pre># Follow the prompts:<br># - Enter email for renewal notifications<br># - Agree to Terms of Service</pre><p><strong>What this does:</strong></p><ul><li>Obtains free SSL certificate from Let’s Encrypt</li><li>Configures Nginx automatically</li><li>Sets up auto-renewal</li><li>Redirects HTTP to HTTPS</li></ul><blockquote><strong><em>Visit your site:</em></strong><em> </em><em>https://yourdomain.com - You should see a secure padlock!</em></blockquote><h3>Post-Installation Setup</h3><h4>Complete the Setup Wizard</h4><ol><li><strong>Language &amp; Country:</strong> Select your preferences</li><li><strong>Company Details:</strong> Enter your business information</li><li><strong>Fiscal Year:</strong> Configure your accounting year</li><li><strong>Company Logo:</strong> Upload your brand logo</li><li><strong>Email Configuration:</strong> Set up email sending</li><li><strong>Currency:</strong> Set default currency</li></ol><h3>Essential First Steps</h3><h4>1. Change Administrator Password</h4><pre>bench --site mysite.local set-admin-password</pre><p>Or via web interface: <strong>User → Administrator → Change Password</strong></p><h4>2. Create User Accounts</h4><p>Navigate to: <strong>Home → User → User → New</strong></p><ul><li>Create accounts for team members</li><li>Assign appropriate roles</li><li>Enable two-factor authentication</li></ul><h4>3. Configure Email</h4><p>Go to: <strong>Settings → Email Account</strong></p><ul><li>Add SMTP settings</li><li>Test email sending</li><li>Configure default sender</li></ul><p>4. Setup Automated Backups</p><pre># Create backup directory<br>mkdir -p /home/frappe/backups</pre><pre># Edit crontab<br>crontab -e</pre><pre># Add daily backup at 2 AM<br>0 2 * * * cd /home/frappe/frappe-bench &amp;&amp; /home/frappe/.local/bin/bench --site mysite.local backup --backup-path /home/frappe/backups &gt;&gt; /home/frappe/backup.log 2&gt;&amp;1</pre><blockquote><strong><em>Backup is Critical:</em></strong><em> Never skip this step!</em></blockquote><h4>Monitoring &amp; Maintenance</h4><h4>Check System Status</h4><pre># Check all services<br>sudo supervisorctl status</pre><pre># View logs<br>tail -f ~/frappe-bench/logs/web.log<br>tail -f ~/frappe-bench/logs/worker.log</pre><h4>Update ERPNext</h4><pre># Backup first!<br>bench --site mysite.local backup</pre><pre># Update all apps<br>cd /home/frappe/frappe-bench<br>bench update</pre><pre># Restart services<br>sudo supervisorctl restart all</pre><h4>Troubleshooting Quick Fixes</h4><h4>Site Not Loading?</h4><pre># Restart services<br>sudo supervisorctl restart all<br>sudo systemctl restart nginx</pre><pre># Check logs<br>tail -50 ~/frappe-bench/logs/error.log</pre><h4>Database Issues?</h4><pre># Restart MariaDB<br>sudo systemctl restart mariadb</pre><pre># Check database connection<br>bench --site mysite.local mariadb</pre><h4>Permission Problems?</h4><pre># Fix permissions<br>cd /home/frappe/frappe-bench<br>sudo chown -R frappe:frappe .</pre><h4>Essential Bench Commands You Frequently Use</h4><pre># Site Management<br>bench list-sites                        # List all sites<br>bench new-site &lt;name&gt;                   # Create site<br>bench backup                            # Backup site<br>bench restore &lt;backup-file&gt;             # Restore backup</pre><pre># App Management<br>bench list-apps                         # List apps<br>bench get-app &lt;app-name&gt;                # Download app<br>bench install-app &lt;app-name&gt;            # Install app</pre><pre># Development<br>bench start                             # Start dev server<br>bench clear-cache                       # Clear cache<br>bench build                             # Build assets</pre><pre># Production<br>sudo supervisorctl restart all          # Restart all<br>bench migrate                           # Run migrations</pre><h4>Conclusion</h4><p><strong>Congratulations!</strong> 🎉 You now have a fully functional ERPNext 16-beta installation on Ubuntu 22.04 LTS!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=484e62f0d480" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>