The paper analyzes the legal framework and practical aspects of the formation of the institutional framework to ensure territorial security in the Russian Federation and municipalities. As a key institutional framework to ensure territorial security discussed regional and municipal legal acts primarily targeted programs approved by them on security issues, as well as functioning in the regions and local governments territorial security, subordinate organizations and appropriate coordination structures.