cocktailpeanut / dalai

The simplest way to run LLaMA on your local machine
https://cocktailpeanut.github.io/dalai
13.09k stars 1.42k forks source link

How to serve for external address? #405

Open zachary62 opened 1 year ago

zachary62 commented 1 year ago

npx dalai serve --host 0.0.0.0 this doesn't work

ghost commented 1 year ago

Please provide details of your configuration, if you are still unable to access your project from external devices, there could be several reasons:

Firewall: Your system or network firewall might be blocking incoming connections. Check your firewall settings and make sure it allows incoming connections to the port your project is running on (usually port 80, 3000, or 8080, depending on the project configuration).

Router Configuration: If you're trying to access your project from a different network or the internet, you might need to set up port forwarding on your router to allow external connections to reach your local machine.

Project Configuration: Ensure that your project is correctly configured to run on the desired port and that there are no conflicts with other services running on your system.

Incorrect Address: Make sure you're using the correct IP address to access your project from external devices. You should use the local IP address of your machine on the network, not the 0.0.0.0 address. You can find your local IP address by running ifconfig (macOS or Linux) or ipconfig (Windows) in your terminal.

DegenComedian commented 1 year ago

I have the same problem, want to let the container listen on interface 0.0.0.0 instead of localhost. Need this to let the container accept traffic from outside.

Have changed the bin/web/index.js but my change is not picked up after I rebuild the image.

httpServer.listen(port, '0.0.0.0', () => {
        console.log(`Server running on http://0.0.0.0:${port}/`)
    })