Skip to content

Commit

Permalink
docs:
Browse files Browse the repository at this point in the history
* add readme section on using amazon/aws s3 as storage
* mention http/https confusion caused by incorrectly configured cloudflare
* improve custom-font notes
* docker: ftp-server howto
* docker: suggest moving hist-folders into the config path

and switch the idp docker-compose files to use the
main image, in anticipation of v1.11
  • Loading branch information
9001 committed Mar 14, 2024
1 parent 115020b commit e78af02
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 10 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ turn almost any device into a file server with resumable uploads/downloads using
* [upload events](#upload-events) - the older, more powerful approach ([examples](./bin/mtag/))
* [handlers](#handlers) - redefine behavior with plugins ([examples](./bin/handlers/))
* [identity providers](#identity-providers) - replace copyparty passwords with oauth and such
* [using the cloud as storage](#using-the-cloud-as-storage) - connecting to an aws s3 bucket and similar
* [hiding from google](#hiding-from-google) - tell search engines you dont wanna be indexed
* [themes](#themes)
* [complete examples](#complete-examples)
Expand Down Expand Up @@ -356,6 +357,9 @@ upgrade notes
* firefox refuses to connect over https, saying "Secure Connection Failed" or "SEC_ERROR_BAD_SIGNATURE", but the usual button to "Accept the Risk and Continue" is not shown
* firefox has corrupted its certstore; fix this by exiting firefox, then find and delete the file named `cert9.db` somewhere in your firefox profile folder

* copyparty seems to think I am using http, even though the URL is https
* your reverse-proxy is not sending the `X-Forwarded-Proto: https` header; this could be because your reverse-proxy itself is confused. Ensure that none of the intermediates (such as cloudflare) are terminating https before the traffic hits your entrypoint

* i want to learn python and/or programming and am considering looking at the copyparty source code in that occasion
* ```bash
_| _ __ _ _|_
Expand Down Expand Up @@ -1273,6 +1277,17 @@ there is a [docker-compose example](./docs/examples/docker/idp-authelia-traefik)
a more complete example of the copyparty configuration options [look like this](./docs/examples/docker/idp/copyparty.conf)
## using the cloud as storage
connecting to an aws s3 bucket and similar
there is no built-in support for this, but you can use FUSE-software such as [rclone](https://rclone.org/) / [geesefs](https://github.com/yandex-cloud/geesefs) / [JuiceFS](https://juicefs.com/en/) to first mount your cloud storage as a local disk, and then let copyparty use (a folder in) that disk as a volume
you may experience poor upload performance this way, but that can sometimes be fixed by specifying the volflag `sparse` to force the use of sparse files; this has improved the upload speeds from `1.5 MiB/s` to over `80 MiB/s` in one case, but note that you are also more likely to discover funny bugs in your FUSE software this way, so buckle up
someone has also tested geesefs in combination with [gocryptfs](https://nuetzlich.net/gocryptfs/) with surprisingly good results, getting 60 MiB/s upload speeds on a gbit line, but JuiceFS won with 80 MiB/s using its built-in encryption
## hiding from google
tell search engines you dont wanna be indexed, either using the good old [robots.txt](https://www.robotstxt.org/robotstxt.html) or through copyparty settings:
Expand Down
7 changes: 0 additions & 7 deletions docs/TODO.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
a living list of upcoming features / fixes / changes, very roughly in order of priority

* readme / docs
* docker ftp config
* custom-fonts (copy from issue)
* s3 speedfix
* reverseproxy/cloudflare: ensure cloudflare does not terminate https
* docker: suggest putting hists in /cfg/hists/

* download accelerator
* definitely download chunks in parallel
* maybe resumable downloads (chrome-only, jank api)
Expand Down
1 change: 0 additions & 1 deletion docs/examples/docker/basic-docker-compose/copyparty.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

# q, lo: /cfg/log/%Y-%m%d.log # log to file instead of docker

# ftp: 3921 # enable ftp server on port 3921
# p: 3939 # listen on another port
# ipa: 10.89. # only allow connections from 10.89.*
# df: 16 # stop accepting uploads if less than 16 GB free disk space
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ networks:

services:
copyparty:
image: copyparty/ac:idp
image: copyparty/ac
container_name: idp_copyparty
user: "1000:1000" # should match the user/group of your fileshare volumes
volumes:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ volumes:

services:
copyparty:
image: copyparty/ac:idp
image: copyparty/ac
container_name: idp_copyparty
restart: unless-stopped
user: "1000:1000" # should match the user/group of your fileshare volumes
Expand Down
15 changes: 15 additions & 0 deletions docs/rice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,18 @@ if you are introducing a new ttf/woff font, don't forget to declare the font its
src: local('Source Code Pro Regular'), local('SourceCodePro-Regular'), url(deps/scp.woff2) format('woff2');
}
```

and because textboxes don't inherit fonts by default, you can force it like this:

```css
input[type=text], input[type=submit], input[type=button] { font-family: var(--font-main) }
```

and if you want to have a monospace font in the fancy markdown editor, do this:

```css
.EasyMDEContainer .CodeMirror { font-family: var(--font-mono) }
```

NB: `<textarea id="mt">` and `<div id="mtr">` in the regular markdown editor must have the same font; none of the suggestions above will cause any issues but keep it in mind if you're getting creative

22 changes: 22 additions & 0 deletions scripts/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ the recommended way to configure copyparty inside a container is to mount a fold
* but you can also provide arguments to the docker command if you prefer that
* config files must be named `something.conf` to get picked up

also see [docker-specific recommendations](#docker-specific-recommendations)


## editions

Expand Down Expand Up @@ -88,6 +90,26 @@ the following advice is best-effort and not guaranteed to be entirely correct



# docker-specific recommendations

* copyparty will generally create a `.hist` folder at the top of each volume, which contains the filesystem index, thumbnails and such. For performance reasons, but also just to keep things tidy, it might be convenient to store these inside the config folder instead. Add the line `hist: /cfg/hists/` inside the `[global]` section of your `copyparty.conf` to do this


## enabling the ftp server

...is tricky because ftp is a weird protocol and docker is making it worse 🎉

add the following three config entries into the `[global]` section of your `copyparty.conf`:

* `ftp: 3921` to enable the service, listening for connections on port 3921

* `ftp-nat: 127.0.0.1` but replace `127.0.0.1` with the actual external IP of your server; the clients will only be able to connect to this IP, even if the server has multiple IPs

* `ftp-pr: 12000-12099` to restrict the [passive-mode](http://slacksite.com/other/ftp.html#passive) port selection range; this allows up to 100 simultaneous file transfers

then finally update your docker config so that the port-range you specified (12000-12099) is exposed to the internet


# build the images yourself

basically `./make.sh hclean pull img push` but see [devnotes.md](./devnotes.md)

0 comments on commit e78af02

Please sign in to comment.