You are using an unsupported browser. Please update your browser to the latest version on or before July 31, 2020.
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!


Deployment to DigitalOcean is supported for public full stack applications (for example, node.js), and public generated static sites (for example, React).

If you don't have a project in mind yet but want to try DigitalOcean 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
  • The project is set to public.  Currently, private app deployment is not supported.


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


In API > Tokens / Keys click Generate New Token.




Give your token a name, choose expiry / scope options, and generate it.



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


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


Depending on your project type and dependency setup, Glitch may need to initialize it before deploying. You'll see a button to either prepare the project or set the app up for a first deployment.


Open the Logs at the bottom of the editor–you'll see additional information and instructions here guiding you through the process. 


Click the button to prepare the project or set up App Platform 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 button again.



Once everything is in place you'll see a Deploy to DigitalOcean button which you will use each time you want to deploy.



Click the button to deploy your project. The Glitch Logs will update with progress and any issues that crop up.



In your Glitch project, the app ID will appear in your .env file with the variable name DIGITALOCEAN_APP_ID. Once your deployment is complete, DigitalOcean will return the deployed app URL to your Glitch project, and it will also be added to your .env file as DIGITALOCEAN_APP_URL (you can also get your published app URL in your DigitalOcean dashboard).


The deployment from Glitch will create the application in your DigitalOcean account–you should see it in the Apps section.



You'll also see the build progress update in your DigitalOcean dashboard.


  • 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 DigitalOcean.



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.


Note that if your project is using values from other variables in your .env file, Glitch will not copy those to your DigitalOcean app for security reasons, so you will need to manually enter any environment variables your functionality depends on over in DigitalOcean.

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!
6 out of 6 found this helpful

scroll to top icon