Skip to content

pgweb as a service

Kevin Kelly edited this page Jul 18, 2019 · 2 revisions

To setup pgweb as a service on windows follow these instructions:

  1. Download pgweb here and unzip
  2. Download the Non-Sucking Service Manager (NSSM) https://nssm.cc/download
  3. Extract the zip and go to the nssm.exe which is found in either win64 folder or win32 folder.
  4. Open cmd prompt (or your preferred shell) in the folder
  5. Run the following .\nssm.exe install pgweb This may ask for administrator privileges and you should click yes
  6. You will then have a GUI open and fill out the GUI application tab as follows:
  • Path: <path to folder containing>\pgweb_windows_386.exe This can be found by clicking ... on the right of path and browsing to the pgweb executable you unzipped before
  • Startup directory: Will be auto filled in from the above path if you use ... but you want another directory you can ... to search for your designed folder
  • Arguments: Should be exactly as follows --sessions. This setup defaults to localhost:8081. If you need to bind to different server host or port you can add the following arguments --bind=<yourHost> and --listen=<port>
  • Service name: pgweb
  1. It will now be setup as a process. To get it started go to services and find pgweb. Right click it and press start
  2. pgweb will now be running on localhost:8081. This service will automatically start each time windows boots

Steps to remove the pgweb service

  1. Shut off the pgweb service in service
  2. Run the following .\nssm.exe remove pgweb

Links

Clone this wiki locally