Skip to content

Configuration

TWTom edited this page Jan 6, 2024 · 2 revisions

Configuration Guide for config.yaml

The config.yaml file is used to configure the settings for controlling your Discord drive through SFTP. Below is a sample configuration for the SFTP section:

# this is a one-line comment, for you if you don't know YAML.
SFTP:
  Host: 0.0.0.0
  Port: 8022
  NoAuth: false
  Auths:
    - Username: shrek
      Password: somebodyoncetoldme
    - Username: shrek2
      Password: theworldwasgonnarollme
    - Username: shrek3
      Password: iaintthesharpesttoolintheshed
    - Username: nopwduser
      Password: null  # <- if it's null, it means you can log in this user without password
    - Username: pubkeyuser  # both pubkey and password are provided, can log in with both
      Password: iamapassword
      PubKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEol5/oekZKSwNoNrpMWech21QHPhQF8unDxFj8ThgTpzsbMVsI3FXN5hDb4Sqd00Eedwj1MW6HZsVa4NSJTYnm73hv0CGXFz/KgEwwso8xtZosALI0AKjWL9yAQRrToSN/hbzlsK73lOpCnNRPbL6Sbuw13bddDsI7Qc186RoeN7/G/MKu+3Mm6kGxbq9EPA+LRMGbK2AdO0/KxwXeTGeS5idYsfhJsBPMZjq64bE2Lcjij754DrHEh7M4YUXlzfs7UKAuvuqrY/euthBCS3rWi5MbNYXBUyrzEg02WhJ8cvOlV7HtKiy5PHJzSTFbzlYrcJLflrd3uWXWghF1Dx1
    - Username: purepubkeyuser
      PubKey: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDEol5/oekZKSwNoNrpMWech21QHPhQF8unDxFj8ThgTpzsbMVsI3FXN5hDb4Sqd00Eedwj1MW6HZsVa4NSJTYnm73hv0CGXFz/KgEwwso8xtZosALI0AKjWL9yAQRrToSN/hbzlsK73lOpCnNRPbL6Sbuw13bddDsI7Qc186RoeN7/G/MKu+3Mm6kGxbq9EPA+LRMGbK2AdO0/KxwXeTGeS5idYsfhJsBPMZjq64bE2Lcjij754DrHEh7M4YUXlzfs7UKAuvuqrY/euthBCS3rWi5MbNYXBUyrzEg02WhJ8cvOlV7HtKiy5PHJzSTFbzlYrcJLflrd3uWXWghF1Dx1
    - Username: uselessuser
MongoDB:
  Prefix: mongodb://
  Host: 127.0.0.1
  Port: 27017

SFTP Configuration

  • Host: The IP address or hostname of the SFTP server.
  • Port: The port number on which the SFTP server is running.
  • NoAuth: If set to true, no authentication is required to control your own Discord drive.
  • Auths: List of authentication credentials for users.

Auths Parameters:

  • Username: The username for authentication (string).
  • Password: The password for authentication (string or null for passwordless login).
  • PubKey: The public key for authentication (string or null for password-based login).

Note

If your password is a string of numbers, you should single quote(') the password, like '12349876'.

Example Usage:

  • The nopwduser can be logged in without a password.
  • The pubkeyuser can be logged in with both a password and a public key.
  • The purepubkeyuser uses only a public key for authentication.
  • The uselessuser is provided as an example entry with no specified password or public key.

MongoDB Configuration

As you can see, it's very straightforward.

DiscordFS-SFTP wiki

🏠 Home

🤝 Introduction

⚙️ API Reference

Clone this wiki locally