MultiMote / niimblue

🖨 NIIMBOT custom web client/app. Design and print labels with NIIMBOT printers directly from your PC or mobile web browser!
https://niim.mmote.ru
MIT License
82 stars 15 forks source link

Configuration the Port for the Website #40

Closed frober closed 3 weeks ago

frober commented 3 weeks ago

Hello, is it possible to change the Port for the Webserver? I would like to start it on my NAS and the Port 80 is already used.

MultiMote commented 3 weeks ago

How did you run your instance?

For Docker installation:

docker run --name niimblue -p <ANY_PORT_HERE>:80 -d ghcr.io/multimote/niimblue:latest

Keep in mind that you need to configure SSL if you will be accessing by address other than localhost.

More info here:

https://github.com/MultiMote/niimblue/wiki/Running-own-instance-with-Docker

frober commented 3 weeks ago

Thanks for the solution. At the time I don't use docker. I will look at this. To start it directly in the main system, is not possible with the Port as parameter?

MultiMote commented 3 weeks ago

What commands are you using to start the server?

frober commented 3 weeks ago

I don't have installed it yet. I tested your Demo and I like it. Many thanks for your Work.
I thought "yarn dev-check" ist the start command. Ist this not right? Sorry that I use your time. I think that I use the docker solution.

MultiMote commented 3 weeks ago

I thought "yarn dev-check" ist the start command. Ist this not right?

To start development server you should run yarn install to install dependencies and yarn dev to start the server.

By default it listens 127.0.0.1 with port 5173. To change it (for example, to 0.0.0.0:5000) use yarn dev --port 5000 --host 0.0.0.0. Then you should to set up SSL. Otherwise printer connection should not work.

Remember, this is development server. It used for development.

For production installation you should run yarn build and then copy static contents of dist folder to your web server's (apache, nginx, etc.) html root. This application does not contains server side, it consists only of static html/js/css/... files.

frober commented 3 weeks ago

Thank you for your explanation. That helps me and I learned something new. I hadn't seen the wiki, it doesn't show up in the mobile browser. Otherwise I might not have asked. Have a nice Weekend.

MultiMote commented 3 weeks ago

You're welcome. If you have any more questions, I'd be glad to help.