home
  • Blog
2.4
  • Getting Started
  • Tutorial
    • Creating Your App
    • Setting Up Tests
    • Routes and Templates
    • The Model Hook
    • Installing Addons
    • Using Ember Data
    • Building a Simple Component
    • Creating a Handlebars Helper
    • Building a Complex Component
    • Services and Utilities
    • Deploying
  • The Object Model
  • Routing
  • Templates
  • Components
  • Controllers
  • Models
  • Application Concerns
  • Testing
  • Ember Inspector
  • Addons and Dependencies
  • Configuring Ember.js
  • Contributing to Ember.js
  • Glossary
Old Guides - You are viewing the guides for Ember v2.4.0.
Go to v5.0.0

Deploying

Edit pencil

To deploy an Ember application simply transfer the output from ember build to a web server. This can be done with standard Unix file transfer tools such as rsync or scp. There are also services that will let you deploy easily.

Deploying with scp

You can deploy your application to any web server by copying the output from ember build to any web server:

ember build
scp -r dist/* myserver.com:/var/www/public/

Deploying to surge.sh

Surge.sh allows you to publish any folder to the web for free. To deploy an Ember application you can simply deploy the folder produced by ember build.

You will need to have the surge cli tool installed:

npm install -g surge

Then you can use the surge command to deploy your application. Note you will also need to provide a copy of index.html with the filename 200.html so that surge can support Ember's client-side routing.

ember build --environment=development
cd dist
cp index.html 200.html
surge

Press return to accept the defaults when deploying the first time. You will be provided with a URL in the form funny-name.surge.sh that you can use for repeated deployments.

So to deploy to the same URL after making changes, perform the same steps, this time providing the URL for your site:

rm -rf dist
ember build --environment=development
cd dist
cp index.html 200.html
surge funny-name.surge.sh

We use --environment=development here so that Mirage will continue to mock fake data. However, normally we would use ember build --environment=production which does more to make your code ready for production.

left arrow
Services and Utilities
We've finished covering Tutorial. Next up: The Object Model - Objects in Ember
right arrow
On this page

  • Deploying with scp
  • Deploying to surge.sh
Team Sponsors Security Legal Branding Community Guidelines
Twitter GitHub Discord Mastodon

If you want help you can contact us by email, open an issue, or get realtime help by joining the Ember Discord.

© Copyright 2023 - Tilde Inc.
Ember.js is free, open source and always will be.


Ember is generously supported by
blue