Skip to content

Commit eff06eb

Browse files
authored
Add Self-host instructions
1 parent 31a91bb commit eff06eb

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,29 @@ You can automatically update the logviewer in your Heroku account whenever chang
3333

3434
To enable autoupdates, fork this repo and [install the Pull app in your fork](https://github.com/apps/pull). Then go to the Deploy tab in your Heroku account, select GitHub and connect your fork. Turn on auto-deploy for the master branch.
3535

36+
## Self-Hosting Setup
37+
38+
There are a couple ways you can go about hosting the logviewer. Below is a simple set of instructions to get started!
39+
40+
First, I recommend setting up a vhost and reverse proxy via nginx for the log viewer. Otherwise you'll be accessing it from <IP_OF_VPS>:<LOGVIEWER_PORT>
41+
A [Guide to setup a reverse proxy](https://www.hostinger.com/tutorials/how-to-set-up-nginx-reverse-proxy/) to help get started.
42+
Next, ensure you're running Python 3.9 or above [A Quick Guide on how to do this](https://linuxize.com/post/how-to-install-python-3-9-on-ubuntu-20-04/), along with ensuring pip (On Ubuntu, generally `sudo apt-get install python3-pip` is sufficient) is installed as well.
43+
44+
Run the following:
45+
`git clone https://github.com/kyb3r/logviewer`
46+
`cd logviewer`
47+
`python3 -m pip install pipenv`
48+
`cp .env.example .env`
49+
50+
Edit the `.env` file and fill in your Mongo connection string. If you wish to customize the bind IP and port, you may do so, but I'll be referencing the default port below (8000)
51+
52+
`pipenv install`
53+
`chmod +x logviewer.sh`
54+
55+
Then to start the app, run `./logviewer.sh`
56+
57+
The app will start by default listening on all interfaces, if unmodified running on port 8000. You can test this is working by navigating to <IP_OF_SERVER>:8000 and should be greeted with the Modmail Logviewer Main Page.
58+
3659
## Discord OAuth2
3760

3861
Protecting your logs with a login (Discord Oauth2 support) is a premium feature, only available to [Patrons](https://patreon.com/kyber).

0 commit comments

Comments
 (0)