revoltchat / self-hosted

Deploy Revolt using Docker.
1.04k stars 136 forks source link

Default Setup API Errors (Needs documentation) #7

Closed MikePadge closed 3 years ago

MikePadge commented 3 years ago

git clone https://github.com/revoltchat/self-hosted/issues/new cp .env.example .env docker-compose up -d

(Note I do not have a local gui on the server and dns is not setup correctly), but from the same subnet, navigating to it by :5000 loads the revolt login splash screen, but the api is dead.

Resolved by editing /etc/hosts and server hostname. If the server name convention is not explicitly set to match .env settings, revolt does not like this.

BoneRattler commented 3 years ago

Also noted. Pretty sure this will close issue #8 as well.

CadillacCoupeDeVille commented 3 years ago

I ran into the same issue, api seems to be offline could you be more clear please and/or post a snippet of .env and hosts files that illustrate said 'convention' ?

BakungaBronson commented 3 years ago

Same here. Any assistance moving forward would be much appreciated.

CadillacCoupeDeVille commented 3 years ago

alright so after several tries I finally got it to work, in my case I run it from a local virtual machine (a minimal "netinst" Debian 10 in this case)

the ip address of the vm (accessible from the host OS) is let's say 192.168.xx.xx I edited the .env file like this:

# URL to where the Revolt app is publicly accessible
REVOLT_APP_URL=http://192.168.xx.xx:5000
# URL to where the API is publicly accessible
REVOLT_PUBLIC_URL=http://192.168.xx.xx:8000
VITE_API_URL=http://192.168.xx.xx:8000
# URL to where the WebSocket server is publicly accessible
REVOLT_EXTERNAL_WS_URL=ws://192.168.xx.xx:9000
# URL to where Autumn is publicly available
AUTUMN_PUBLIC_URL=http://192.168.xx.xx:3000
# URL to where January is publicly available
JANUARY_PUBLIC_URL=http://192.168.xx.xx:7000

# S3 Endpoint
AUTUMN_S3_ENDPOINT=http://192.168.xx.xx:9000

so instead of http://local.revolt.chat which of course is unknown to the host, I simply replaced it with the vm's assigned ip address

basically what works for me is:

ssh into the vm, then

git clone https://github.com/revoltchat/self-hosted revolt
cd revolt
cp .env.example .env

edit .env and replace http://local.revolt.chat with the vm own IP address assigned from host, 192.168.xx.xx (don't forget about AUTUMN_S3_ENDPOINT too as in the example above) then docker-compose up -d

then open a browser in your host OS and go to 192.168.xx.xx:5000

in top left corner of the page you should get something like this: corner

after all this, apparently it works. haven't tested ALL features yet but it's functional. also I did not edit any hosts file, and I have not tried (yet) to run Revolt from a container without a vm involved

insertish commented 3 years ago

The quick start configuration is intended for your local machine only, you have to configure the environment file to point to whatever external domain (or external / local IP).

I don't think there's anything to fix here?

insertish commented 3 years ago

Closing due to inactivity.