Deployment Options

Zip deployment vs. NoZip deployment

The N2 administration area has a large number of files that can be burdensome to deploy over FTP. Furthermore, some hosting environment impose limitations on the total number of files hosted. To eliminate these small resource files, you can deploy a N2.ZIP file containing these resource files. The server will transparently extract this N2.ZIP file and serve the extracted files to clients on demand.

Caveat: more memory used by the ZIP DLL.

Keeping Production and Development Data in Sync

Once you deploy in production, you may or may not want to move away from using the default SQLite database engine. Either way, take care not to replace your production database with an older development database! We recommend that you periodically replace the database you use in development with copy of your production database so that you can experiment with your current production data. Your development and production instances of N2 do not necessarily need to be using the same database engine. We recommend that you use the import/export feature in the N2 administration area to first export your site to a file, and then import this file in your production setup.

If the file is very large, you might not be able to upload the file to your development instance unless you change some configuration settings. See the related topic: File upload issues.

Architecture Options

Single web server configuration

The simplest option is to deploy N2CMS to a single web server. You can achieve higher scalability and resilience by using a 3rd party solution such as Cloudflare to provide high availability and CDN caching.

Multiple web server configuration

When using N2CMS with multiple web servers, all instances of N2CMS should share the same database and content files. You will also need to keep the site files in sync between all servers. There are two main options here: 

  1. Use a file synchronization tool like Bittorrent Sync or Syncthing to keep the N2 application directories in sync.
  2. Place application files, including the Upload directory, on a file share that is shared across all web servers.