Skip to content
72 changes: 72 additions & 0 deletions docs/accounts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# **Manage Accounts**
Here is a list of things you can do, to manage user accounts. Make sure to replace <span style="color:orange">[USERNAME]</span> accordingly. Usernames are case-sensitive.

Toggling an account is an on/off function. So use the same command to make someone admin/staff/active and to undo it.

---

## **List accounts**
List all accounts which have been created on your instance.
```
docker compose --profile production run --rm shell neodb-manage user --list
```
> **NOTE:** This shows sensitive information like the e-mail address and the fediverse account.

---

## **Create invitation code**
If you set `NEODB_INVITE_ONLY` to `true` in your .env file, only users with an invite code are able to create an account. This is how you can create a code.
```
docker compose --profile production run --rm shell neodb-manage invite --create
```


---

## **Create admin account**
A step-by-step admin account creation. If you already got an account and want to make it admin, skip to the next point.
```
docker compose --profile production run --rm shell neodb-manage createsuperuser
```

---

## **Toggle an existing account to admin**
```
docker compose --profile production run --rm shell neodb-manage user --super [USERNAME]
```
> **NOTE:** Be careful with this. An admin is able to change a lot and - possibly - mess up your instance.

---

## **Toggle an existing account to staff**
A staff account is able to manually merge entries, which already have been marked by users. There is also an option in each entry, to restrict only staff members to further edit this entry.
```
docker compose --profile production run --rm shell neodb-manage user --staff [USERNAME]
```
> **NOTE:** A user account is able to be an admin and a staff member simultaneously. An admin is not able to merge marked entries. To do so, make the admin account a staff member too.

---

## **Deactivate / activate account**
When a user misbehaves, you could deactivate the account. When deactivating an account, the e-mail is kept as "already being used", so the user is not able to create a second account with the same e-mail address. It's basically a ban.
```
docker compose --profile production run --rm shell neodb-manage user --active [USERNAME]
```

---

## **Delete account / remote identity**
Make sure that `takahe-stator` and `neodb-worker` containers are running to complete the deletion.

By username:
```
docker compose --profile production run --rm shell neodb-manage user --delete [USERNAME]
```
By remote identity:
```
docker compose --profile production run --rm shell neodb-manage user --delete [USERNAME]@remote.instance
```
> **NOTE:** You can't undo this, unless you recover a backup of your instance, which also reverts any changes that have been made since the backup.

<br>
28 changes: 4 additions & 24 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ if you are doing debug or development:

## Settings for external item sources

- `SPOTIFY_API_KEY` - base64('CLIENT_ID:SECRET'), see [spotify doc](https://developer.spotify.com/documentation/web-api/tutorials/client-credentials-flow)
- `SPOTIFY_API_KEY` - see [spotify doc](https://developer.spotify.com/documentation/web-api/tutorials/client-credentials-flow)
<br>*Note: The value must be base64 **encoded**. Use `echo -n 'client-id:client-secret' | base64` to generate it.*
- `TMDB_API_V3_KEY` - API v3 key from [TMDB](https://developer.themoviedb.org/)
- `GOOGLE_API_KEY` - API key for [Google Books](https://developers.google.com/books/docs/v1/using)
- `DISCOGS_API_KEY` - personal access token from [Discogs](https://www.discogs.com/settings/developers)
Expand All @@ -71,33 +72,12 @@ set either of these will enable translation

## Other maintenance tasks

Add alias to your shell for easier access
Add alias to your shell for easier access. Not necessary, just for convenience.

```
alias neodb-manage='docker-compose --profile production run --rm shell neodb-manage'
```

Toggle user's active, staff and super user status

```
neodb-manage user --active <username>
neodb-manage user --staff <username>
neodb-manage user --super <username>
```

create a super user; delete a user / remote identity (`takahe-stator` and `neodb-worker` containers must be running to complete the deletion)
```
neodb-manage createsuperuser
neodb-manage user --delete username
neodb-manage user --delete username@remote.instance
```

Create an invite link

```
neodb-manage invite --create
```

Manage user tasks and cron jobs

```
Expand All @@ -111,7 +91,7 @@ Rebuild search index
neodb-manage catalog idx-reindex
```

There are [more commands](usage/catalog.md) available to manage catalog.
There are [more commands](usage/catalog.md) available to manage catalog and take a look at [Manage Accounts](accounts.md) to learn how to create an admin/staff account, create an invitation code and more.


## Run PostgresQL/Redis/Typesense without Docker
Expand Down
6 changes: 4 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,12 @@ You should see the same JSON response as above, and the site is now accessible t

## Register an account and make it admin

Open `https://yourdomain.tld` in your browser and register an account, assuming username `admin`, run the following command to make it super user
Open `https://yourdomain.tld` in your browser and register an account, assuming username is `admin`, run the following command to make it super user

```
docker compose --profile production run --rm shell neodb-manage user --super admin
```
Take a look at [Manage Accounts](accounts.md) for more information.

Now your instance should be ready to serve. More tweaks are available, see [configuration](configuration.md) for options.
## What now?
Now your instance should be ready to serve. More tweaks are available, see [Configuration](configuration.md) for options.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ nav:
- install.md
- upgrade.md
- configuration.md
- accounts.md
- troubleshooting.md
- development.md
- api.md
Expand Down