2017-12-20 17:20:44 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# Deployment
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#### #1 - Configurate
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Update the `production`  settings with the IP and domain name where the project will be running.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								**Path —** `./config/environments/production/server.json` .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```js
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  "host": "domain.io", // IP or domain
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  "port": 1337,
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  "autoReload": {
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    "enabled": false
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  },
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								  "admin": {
							 
						 
					
						
							
								
									
										
										
										
											2018-01-09 18:39:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    "path": "/dashboard" // We highly recommend to change the default `/admin`  path for security reasons.
							 
						 
					
						
							
								
									
										
										
										
											2017-12-20 17:20:44 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								  }
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-01-09 18:39:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								**⚠️  If you changed the path to access to the administration, the step #2  is required.**
							 
						 
					
						
							
								
									
										
										
										
											2017-12-20 17:20:44 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-01-09 18:39:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								#### #2 - Setup (optional)
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Run this following command to install the dependencies and build the project with your custom configurations.
							 
						 
					
						
							
								
									
										
										
										
											2017-12-20 17:20:44 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								cd /path/to/the/project
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								npm run setup
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-01-16 16:33:05 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								>  Note: To display the build logs use the --debug option `npm run setup --debug`.
  
						 
					
						
							
								
									
										
										
										
											2017-12-20 17:20:44 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								#### #3 - Launch the server
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								Run the server with the `production`  settings.
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```bash
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								NODE_ENV=production npm start
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								```
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								>  We highly recommend to use [pm2](https://github.com/Unitech/pm2/) to manage your process.
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								### Advanced configurations
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2018-01-09 18:39:50 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								If you want to host the administration on another server than the API, [please take a look at this dedicated section ](../advanced/customize-admin.md#deployment ).