[GH-ISSUE #20] config file? #3

Closed
opened 2026-05-07 00:17:04 +02:00 by BreizhHardware · 4 comments

Originally created by @aroundmyroom on GitHub (Dec 17, 2022).
Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/20

Originally assigned to: @glenndehaan on GitHub.

Just installed it without docker and its running, but wondering if I do miss the config file? cause in 2 files I had to change IP / site and at the end somewhere in the /modules/unifi.js the username / password. (and/or site / ip as well)

Originally created by @aroundmyroom on GitHub (Dec 17, 2022). Original GitHub issue: https://github.com/glenndehaan/unifi-voucher-site/issues/20 Originally assigned to: @glenndehaan on GitHub. Just installed it without docker and its running, but wondering if I do miss the config file? cause in 2 files I had to change IP / site and at the end somewhere in the /modules/unifi.js the username / password. (and/or site / ip as well)
BreizhHardware 2026-05-07 00:17:04 +02:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@glenndehaan commented on GitHub (Dec 17, 2022):

No you are not missing a config file the application uses environment variables to configure itself. So you can just supply those when launching the app, the variables are described in the example docker compose file.

<!-- gh-comment-id:1356342025 --> @glenndehaan commented on GitHub (Dec 17, 2022): No you are not missing a config file the application uses environment variables to configure itself. So you can just supply those when launching the app, the variables are described in the example docker compose file.
Author
Owner

@aroundmyroom commented on GitHub (Dec 17, 2022):

Ah clear ..

for what's worth

#!/bin/bash
export UNIFI_IP='10.1.1.1'
export UNIFI_PORT='443'
export UNIFI_USERNAME='username'
export UNIFI_PASSWORD='password'
export UNIFI_SITE_ID='default'
export SECURITY_CODE='000'
export VOUCHER_TYPES='480,0,,,;1440,1,,,;10080,1,,,;525600,1,,,;'
export WEBPORT='80'

cd /home/unifi-voucher-site
/root/.nvm/versions/node/v19.3.0/bin/node server.js

Notes: npm start does not work with systemctl (I could not get it working) so I start the application with node server.js.
and now systemctl is working fine.

Would love to have support for SSL so that I can use my own certificates

(using your script on a debian machine with npm 19 replacing my own ugly php script) ;)
(NB. as it is an home LXC server I do not care about usernames or things being root yes/no). stuff is not outside my network available

<!-- gh-comment-id:1356382811 --> @aroundmyroom commented on GitHub (Dec 17, 2022): Ah clear .. for what's worth #!/bin/bash export UNIFI_IP='10.1.1.1' export UNIFI_PORT='443' export UNIFI_USERNAME='username' export UNIFI_PASSWORD='password' export UNIFI_SITE_ID='default' export SECURITY_CODE='000' export VOUCHER_TYPES='480,0,,,;1440,1,,,;10080,1,,,;525600,1,,,;' export WEBPORT='80' cd /home/unifi-voucher-site /root/.nvm/versions/node/v19.3.0/bin/node server.js Notes: npm start does not work with systemctl (I could not get it working) so I start the application with node server.js. and now systemctl is working fine. Would love to have support for SSL so that I can use my own certificates (using your script on a debian machine with npm 19 replacing my own ugly php script) ;) (NB. as it is an home LXC server I do not care about usernames or things being root yes/no). stuff is not outside my network available
Author
Owner

@glenndehaan commented on GitHub (Dec 18, 2022):

I would always recommend using a reverse proxy and not to expose the node process directly. The reverse proxy would then handle the SSL termination and could for example integrate with letsencrypt.

<!-- gh-comment-id:1356754920 --> @glenndehaan commented on GitHub (Dec 18, 2022): I would always recommend using a reverse proxy and not to expose the node process directly. The reverse proxy would then handle the SSL termination and could for example integrate with letsencrypt.
Author
Owner

@aroundmyroom commented on GitHub (Dec 18, 2022):

Agree and can do that I have nginx proxy manager running, but is unnecessary when you run this locally. It's not a strong need, but a nice to have ;)

<!-- gh-comment-id:1356760223 --> @aroundmyroom commented on GitHub (Dec 18, 2022): Agree and can do that I have nginx proxy manager running, but is unnecessary when you run this locally. It's not a strong need, but a nice to have ;)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/unifi-voucher-site#3
No description provided.