You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
close
Home > FAQ > How do I deploy my Glitch app to DigitalOcean?
How do I deploy my Glitch app to DigitalOcean?
print icon

We’ve made it easy for you to build on Glitch and deploy to DigitalOcean's App Platform as often as you like!

If you don't have a project in mind yet but want to try Digital Ocean deployment out, remix ~hello-digitalocean!

 

In your Glitch project, make sure you have a .env file–if there isn't one already just create a new file and name it: .env

Get a DIGITALOCEAN_ACCESS_TOKEN from your DigitalOcean account.  If you don't already have a DigitalOcean account, click here.

 

 

 

Once the token has been generated, copy and paste it into your Glitch project’s .env file as: DIGITALOCEAN_ACCESS_TOKEN

 

After you do this, a Deploy to DigitalOcean button will magically appear at the top of the project editor!

 



When you are ready to deploy your app, open the Logs at the bottom of the editor–you may see additional instructions here depending on your app setup. Click the Deploy to DigitalOcean button and keep an eye on the log. Glitch may first carry out some setup steps to prepare your project for deployment, then when it's ready you'll see a message instructing you to click the Deploy button again. If your project is already good for deployment it will be sent to Digital Ocean straight away. You can then switch over to your Digital Ocean account.

 

The deployment from Glitch will create the application in your Digital Ocean dashboard–you should see it in the Apps section.

 

 

In your Glitch project, the app ID will appear in your .env file with the variable name DIGITALOCEAN_APP_ID.

 

You'll see the build progress update in your Digital Ocean dashboard. Once your deployment is complete, back in Glitch, hit the Deploy button again. This will return the deployed app URL to your Glitch project, and it will be added to your .env file as DIGITALOCEAN_APP_URL (you can also get your published app URL in your Digital Ocean dashboard before deploying the second time).

 

  • After deploying, you can continue to edit in Glitch - just click the Deploy button any time that you want to push your changes to DigitalOcean's App Platform.

 

Once your app URL is in your Glitch project you'll see a drop-down menu in the preview in your Glitch project. Select DEV for the version you're currently working on in Glitch, and PUB to see the published version of your app on Digital Ocean.

 

 

You can always visit your DigitalOcean dashboard to check the status of any of your apps running on App Platform too.

 

In-progress changes will still appear in real-time on Glitch, but you’ll need to click the Deploy to DigitalOcean button to update your app on App Platform.



Click here to read through DigitalOcean's App Platform documentation.

Got more questions? Check out our Community Forum!
Open 24/7, the forum is where Glitch makers help each other and show off all the rad apps that they have created. It's the friendliest community of coders on the Web!
Feedback
1 out of 1 found this helpful

scroll to top icon