diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/admin/cli.md | 2 | ||||
-rw-r--r-- | docs/configuration/database.md | 14 | ||||
-rw-r--r-- | docs/configuration/index.md | 2 | ||||
-rw-r--r-- | docs/configuration/letsencrypt.md | 8 | ||||
-rw-r--r-- | docs/installation_guide/binary.md | 9 | ||||
-rw-r--r-- | docs/installation_guide/nginx.md | 5 |
6 files changed, 27 insertions, 13 deletions
diff --git a/docs/admin/cli.md b/docs/admin/cli.md index a65282ceb..7a71f2fcd 100644 --- a/docs/admin/cli.md +++ b/docs/admin/cli.md @@ -31,7 +31,7 @@ Under `Available Commands`, you can see the standard `server` command. But there **Please note -- for all of these commands, you will still need to set the global options correctly so that the CLI tool knows how eg., how to connect to your database, which database to use, which host and account domain to use etc.** -You can set these options using environment variables, passing them as CLI flags (eg., `gotosocial [commands] --host example.org`), or by just pointing the CLI tool towards your config file (eg., `gotosocial [commands] --config-path ./config.yaml`). +You can set these options using environment variables, passing them as CLI flags (eg., `gotosocial [commands] --host example.org`), or by just pointing the CLI tool towards your config file (eg., `gotosocial --config-path ./config.yaml [commands]`). ## gotosocial admin diff --git a/docs/configuration/database.md b/docs/configuration/database.md index 5571843e8..a8d7645e2 100644 --- a/docs/configuration/database.md +++ b/docs/configuration/database.md @@ -8,7 +8,7 @@ By default, GoToSocial will use Postgres, but this is easy to change. SQLite, as the name implies, is the lightest database type that GoToSocial can use. It stores entries in a simple file format, usually in the same directory as the GoToSocial binary itself. SQLite is great for small instances and lower-powered machines like Raspberry Pi, where a dedicated database would be overkill. -To configure GoToSocial to use SQLite, change `db-type` to `sqlite`. The `address` setting will then be a filename instead of an address, so you might want to change it to `sqlite.db` or something similar. +To configure GoToSocial to use SQLite, change `db-type` to `sqlite`. The `address` setting will then be a filename instead of an address, so you will want to change it to `sqlite.db` or something similar. Note that the `:memory:` setting will use an *in-memory database* which will be wiped when your GoToSocial instance stops running. This is for testing only and is absolutely not suitable for running a proper instance, so *don't do this*. @@ -57,7 +57,17 @@ grant all privileges on database gotosocial to gotosocial; db-type: "postgres" # String. Database address or parameters. -# Examples: ["localhost","my.db.host","127.0.0.1","192.111.39.110",":memory:"] +# +# For Postgres, this should be the address or socket at which the database can be reached. +# +# For Sqlite, this should be the path to your sqlite database file. Eg., /opt/gotosocial/sqlite.db. +# If the file doesn't exist at the specified path, it will be created. +# If just a filename is provided (no directory) then the database will be created in the same directory +# as the GoToSocial binary. +# If address is set to :memory: then an in-memory database will be used (no file). +# WARNING: :memory: should NOT BE USED except for testing purposes. +# +# Examples: ["localhost","my.db.host","127.0.0.1","192.111.39.110",":memory:", "sqlite.db"] # Default: "" db-address: "" diff --git a/docs/configuration/index.md b/docs/configuration/index.md index ed36505ec..5aa10df9a 100644 --- a/docs/configuration/index.md +++ b/docs/configuration/index.md @@ -13,7 +13,7 @@ There are three different methods for configuring a GoToSocial instance, which c The easiest way to configure GoToSocial is to pass a configuration file to to the `gotosocial server start` command, for example: ```bash -gotosocial server start --config-path ./config.yaml +gotosocial --config-path ./config.yaml server start ``` The command expects a file in [YAML](https://en.wikipedia.org/wiki/YAML) or [JSON](https://en.wikipedia.org/wiki/JSON) format. diff --git a/docs/configuration/letsencrypt.md b/docs/configuration/letsencrypt.md index 4e3a6d59b..011ab4690 100644 --- a/docs/configuration/letsencrypt.md +++ b/docs/configuration/letsencrypt.md @@ -11,11 +11,11 @@ # Bool. Whether or not letsencrypt should be enabled for the server. # If false, the rest of the settings here will be ignored. -# You should only change this if you want to serve GoToSocial behind a reverse proxy -# like Traefik, HAProxy, or Nginx. +# If you serve GoToSocial behind a reverse proxy like nginx or traefik, leave this turned off. +# If you don't, then turn it on so that you can use https. # Options: [true, false] -# Default: true -letsencrypt-enabled: true +# Default: false +letsencrypt-enabled: false # Int. Port to listen for letsencrypt certificate challenges on. # If letsencrypt is enabled, this port must be reachable or you won't be able to obtain certs. diff --git a/docs/installation_guide/binary.md b/docs/installation_guide/binary.md index 64a7e60ee..173237da0 100644 --- a/docs/installation_guide/binary.md +++ b/docs/installation_guide/binary.md @@ -51,6 +51,7 @@ Now open the file in your text editor of choice so that you can set some importa - Set `db-type` to `sqlite`. - Set `db-address` to `sqlite.db`. - Set `storage-local-base-path` to the storage directory you created above (eg., `/gotosocial/storage`). +- Set `letsencrypt-enabled` to `true`. - Set `letsencrypt-cert-dir` to the certificate storage directory you created above (eg., `/gotosocial/storage/certs`). The above options assume you're using SQLite as your database. If you want to use Postgres instead, see [here](../configuration/database.md) for the config options. @@ -62,7 +63,7 @@ You can now run the binary. Start the GoToSocial server with the following command: ```bash -./gotosocial server start --config-path ./config.yaml +./gotosocial --config-path ./config.yaml server start ``` The server should now start up and you should be able to access the splash page by navigating to your domain in the browser. Note that it might take up to a minute or so for your LetsEncrypt certificates to be created for the first time, so refresh a few times if necessary. @@ -76,7 +77,7 @@ You can use the GoToSocial binary to also create, confirm, and promote your user Run the following command to create a new account: ```bash -./gotosocial admin account create --config-path ./config.yaml --username some_username --email some_email@whatever.org --password SOME_PASSWORD +./gotosocial --config-path ./config.yaml admin account create --username some_username --email some_email@whatever.org --password SOME_PASSWORD ``` In the above command, replace `some_username` with your desired username, `some_email@whatever.org` with the email address you want to associate with your account, and `SOME_PASSWORD` with a secure password. @@ -84,7 +85,7 @@ In the above command, replace `some_username` with your desired username, `some_ Run the following command to confirm the account you just created: ```bash -./gotosocial admin account confirm --config-path ./config.yaml --username some_username +./gotosocial --config-path ./config.yaml admin account confirm --username some_username ``` Replace `some_username` with the username of the account you just created. @@ -92,7 +93,7 @@ Replace `some_username` with the username of the account you just created. If you want your user to have admin rights, you can promote them using a similar command: ```bash -./gotosocial admin account promote --config-path ./config.yaml --username some_username +./gotosocial --config-path ./config.yaml admin account promote --username some_username ``` Replace `some_username` with the username of the account you just created. diff --git a/docs/installation_guide/nginx.md b/docs/installation_guide/nginx.md index 9cf454cad..7d39971a3 100644 --- a/docs/installation_guide/nginx.md +++ b/docs/installation_guide/nginx.md @@ -59,6 +59,7 @@ The file you're about to create should look a bit like this: ```nginx.conf server { listen 80; + listen [::]:80; server_name example.com; location / { proxy_pass http://localhost:8080; @@ -67,6 +68,8 @@ server { } ``` +Note: You can remove the line `listen [::]:80;` if your server is not ipv6 capable or you'd rather not use ipv6. + Change `proxy_pass` to the ip and port that you're actually serving GoToSocial on and change `server_name` to your own domain name. If your domain name is `gotosocial.example.com` then `server_name gotosocial.example.com;` would be the correct value. If you're running GoToSocial on another machine with the local ip of 192.168.178.69 and on port 8080 then `proxy_pass http://192.168.178.69:8080;` would be the correct value. @@ -86,7 +89,7 @@ sudo nginx -t If everything is fine you should get this as output: -``` +```text nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful ``` |