Unfortunately it's not possible to migrate from an SQL Server database to an SQL Compact database. Since you're making this move for performance reasons though, we would instead recommend moving to a local SQL Server. You could use the free SQL Server Express edition. SQL Server Express 2008R2 and newer have a database capacity of 10GB compared to the 4GB of SQL Compact, SQL Server is also more performant than SQL Compact.
Instructions for moving your database can be found in
this article. If you wish to install your scanning service and web server on the same machine as your database, you can follow
this article almost entirely instead, the only difference being the source of your database back up coming from a different machine than your website and key folder backups.