Skip to content

Commit

Permalink
update admin instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
moisout authored Jan 4, 2024
1 parent e96f5c0 commit c930b94
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 7 deletions.
10 changes: 3 additions & 7 deletions content/3.configuration/3.admin.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ In order to enable it, set the environment variable `VIEWTUBE_ADMIN_USER` to the
Set the environment variable only after you've created the account, otherwise anyone could create that account and receive administrative privileges.
::

## Admin panel
Visit the admin panel by clicking on your profile image and selecting "Admin panel".

![admin-panel.png](/admin-panel.png)

On the admin panel you can see some miscellaneous information and download logs.
In here you can also add videos to be blocked. When such a video is opened, a copyright warning will appear.
::alert{type="info"}
Learn how to use the admin panel in [Features > Admin panel](/features/admin-panel)
::
30 changes: 30 additions & 0 deletions content/3.configuration/4.recovery.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Recovery
This page is a collection of remedies for issues that can occur with ViewTube.

## Lost access to admin account

1. Create a new account you would like to use as an admin
2. Set the environment variable `VIEWTUBE_ADMIN_USER` to your the username of your new account
3. Restart ViewTube

If have registration disabled and cannot create an account, continue reading.

## Disabled registration and lost access to admin account

1. Start a shell session inside the mongodb container
```bash
docker exec -it <YOUR-MONGODB-CONTAINER-NAME-HERE> bash
```
2. Start the mongo shell
```bash
mongosh
```
3. Select the viewtube database
```bash
use viewtube
```
4. Execute the following command to allow registration
```bash
db['server-settings'].updateOne({version:1},{$set: {registrationEnabled:true}})
```
Now you can create a new admin user according to the topic above.
40 changes: 40 additions & 0 deletions content/4.features/4.admin-panel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Admin Panel

Visit the admin panel by clicking on your profile image and selecting "Admin panel".

![admin-panel.png](/admin-panel.png)

## Info

Information about the server and configuration. Only IP adress is shown at the moment, more coming soon.

## Users

Configure options for the instance here. Make sure to restart ViewTube after configuring these options.

### Enable public registration

If this option is disabled, the register form is hidden and registration is blocked. Accounts can only be created by the admin.

### Require login everywhere

Makes the entire ViewTube instance private, requiring a login for every page.

::alert{type="info"}
Look for the following log messages to make sure your preferred configuration is applied.
![Log_Options.png](/Log_Options.png)
::

## Logs

View and download the log files.

![Logs.png](/Logs.png)

## Blocked videos

This option allows adding video IDs that wil be blocked. This option exists in order for public instances to respond to DMCA requests. Make sure to only add the ID of the video, not the entire URL.

If blocked, a video will show the following error when accessed.

![Copyright_block.png](/Copyright_block.png)
Binary file added public/Copyright_block.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Log_Options.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/Logs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c930b94

Please sign in to comment.