Back

Bad gatewey after upgrading in my appwrite hosted in digitalocean

  • 0
  • Self Hosted
  • Flutter
  • General
Mosh Ontong
12 Apr, 2023, 12:59

After we paste this code

TypeScript
docker run -it --rm \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
    --entrypoint="install" \
    appwrite/appwrite:1.3.0

There are question shoild be fill up:

  1. Choose your server HTTP port: (default:80) - I press enter
  2. Choose your servers HTTPs port (default 445: I press enter
  3. Choose a secret api key:** I enter a new api key**
  4. Enter your appwrite hostname('localhost)': I entered default but the api of my appwrite is "http://167.172.64.61/"
  5. Enter a DNS a record hostname ..... ? I entered
TL;DR
User encountered a "Bad gateway" error after upgrading their appwrite hosted in DigitalOcean. They deleted the app and ran the upgrade command to fix the issue but encountered more errors. They realized that they ran the upgrade command in the wrong folder and there was a nested appwrite folder. They were instructed to check if the .env file has the same variables as the backup and were advised against putting a new secret key. They also encountered an error when running the migrate command and were provided the correct steps to follow in the appwrite documentation. They were instructed to fill in the required details and provided a code snippet to paste. The user provided
Mosh Ontong
12 Apr, 2023, 13:05

And after I fill up those questions this is the result

Drake
12 Apr, 2023, 13:20

Localhost is correct if you don't have a domain yet.

Drake
12 Apr, 2023, 13:21

Did you run the migrate command?

https://appwrite.io/docs/upgrade#migration

Mosh Ontong
12 Apr, 2023, 13:21

Ohh I see i did not see the next step I will try it

Mosh Ontong
12 Apr, 2023, 13:49

sir @Steven I got some error on migrate command

Drake
12 Apr, 2023, 13:52

Wait you shouldn't have put a new secret key

Mosh Ontong
12 Apr, 2023, 13:52

ohh can I revert? what is the default secret key?

Drake
12 Apr, 2023, 13:53

In your appwrite folder, there should be a .env and a backup one. Make sure the .env has the same openssl and mariadb variables as the backup

Mosh Ontong
12 Apr, 2023, 13:53
Mosh Ontong
12 Apr, 2023, 13:53

this is the current files in my appwrite folder

Drake
12 Apr, 2023, 13:54

This isn't good...you shouldn't have a nested appwrite folder...

Drake
12 Apr, 2023, 13:54

Please run ls -la

Mosh Ontong
12 Apr, 2023, 13:54
Drake
12 Apr, 2023, 13:58

Looks like you might have run the upgrade command in the wrong folder

Mosh Ontong
12 Apr, 2023, 13:59

actually my bad I think it is safe to delete it right?

Mosh Ontong
12 Apr, 2023, 14:08

I delete it by the way and I run the upgrade cmd and yeah I fix it

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more