Skip to content

Commit

Permalink
README: Update screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
andreimarcu committed Mar 13, 2020
1 parent 2e0319b commit 3167ab7
Showing 1 changed file with 76 additions and 41 deletions.
117 changes: 76 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

linx-server
linx-server
======
[![Build Status](https://travis-ci.org/andreimarcu/linx-server.svg?branch=master)](https://travis-ci.org/andreimarcu/linx-server)

Expand All @@ -19,14 +19,45 @@ You can see what it looks like using the demo: [https://demo.linx-server.net/](h


### Screenshots
<img width="200" src="https://user-images.githubusercontent.com/4650950/51735725-0033cf00-203d-11e9-8a97-f543330a92ec.png" /> <img width="200" src="https://user-images.githubusercontent.com/4650950/51735724-0033cf00-203d-11e9-8fe0-77442eaa8705.png" /> <img width="200" src="https://user-images.githubusercontent.com/4650950/51735726-0033cf00-203d-11e9-9fca-095a97e46ce8.png" /> <img width="200" src="https://user-images.githubusercontent.com/4650950/51735728-0033cf00-203d-11e9-90e9-4f2d36332fc4.png" />
<img width="730" src="https://user-images.githubusercontent.com/4650950/76579039-03c82680-6488-11ea-8e23-4c927386fbd9.png" />

<img width="180" src="https://user-images.githubusercontent.com/4650950/76578903-771d6880-6487-11ea-8baf-a4a23fef4d26.png" /> <img width="180" src="https://user-images.githubusercontent.com/4650950/76578910-7be21c80-6487-11ea-9a0a-587d59bc5f80.png" /> <img width="180" src="https://user-images.githubusercontent.com/4650950/76578908-7b498600-6487-11ea-8994-ee7b6eb9cdb1.png" /> <img width="180" src="https://user-images.githubusercontent.com/4650950/76578907-7b498600-6487-11ea-8941-8f582bf87fb0.png" />

Get release and run

Getting started
-------------------

#### Using Docker
Example running
```
docker run -p 8080:8080 -v /path/to/meta:/data/meta -v /path/to/files:/data/files andreimarcu/linx-server
```

Example with docker-compose
```
version: '2.2'
services:
linx-server:
container_name: linx-server
image: andreimarcu/linx-server
entrypoint: /usr/local/bin/linx-server -bind=0.0.0.0:8080 -filespath=/data/files/ -metapath=/data/meta/
command: -sitename=Linx -siteurl=https://linx.example.com
volumes:
- /path/to/files:/data/files
- /path/to/meta:/data/meta
network_mode: bridge
ports:
- "8080:8080"
restart: unless-stopped
```
Ideally, you would use a reverse proxy such as nginx or caddy to handle TLS certificates.

#### Using a binary release

1. Grab the latest binary from the [releases](https://github.com/andreimarcu/linx-server/releases)
2. Run ```./linx-server```



Usage
-----
Expand All @@ -38,30 +69,36 @@ maxsize = 4294967296
allowhotlink = true
# etc
```
...and then invoke ```linx-server -config path/to/config.ini```
...and then invoke ```linx-server -config path/to/config.ini```

#### Options
- ```-bind 127.0.0.1:8080``` -- what to bind to (default is 127.0.0.1:8080)
- ```-sitename myLinx``` -- the site name displayed on top (default is inferred from Host header)
- ```-siteurl "https://mylinx.example.org/"``` -- the site url (default is inferred from execution context)
- ```-selifpath "selif"``` -- path relative to site base url (the "selif" in mylinx.example.org/selif/image.jpg) where files are accessed directly (default: selif)
- ```-maxsize 4294967296``` -- maximum upload file size in bytes (default 4GB)
- ```-maxexpiry 86400``` -- maximum expiration time in seconds (default is 0, which is no expiry)
- ```-allowhotlink``` -- Allow file hotlinking
- ```-contentsecuritypolicy "..."``` -- Content-Security-Policy header for pages (default is "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; frame-ancestors 'self';")
- ```-filecontentsecuritypolicy "..."``` -- Content-Security-Policy header for files (default is "default-src 'none'; img-src 'self'; object-src 'self'; media-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors 'self';")
- ```-refererpolicy "..."``` -- Referrer-Policy header for pages (default is "same-origin")
- ```-filereferrerpolicy "..."``` -- Referrer-Policy header for files (default is "same-origin")
- ```-xframeoptions "..." ``` -- X-Frame-Options header (default is "SAMEORIGIN")
- ```-remoteuploads``` -- (optionally) enable remote uploads (/upload?url=https://...)
- ```-nologs``` -- (optionally) disable request logs in stdout
- ```-force-random-filename``` -- (optionally) force the use of random filenames
- ```-custompagespath "custom_pages"``` -- (optionally) specify path to directory containing markdown pages (must end in .md) that will be added to the site navigation (this can be useful for providing contact/support information and so on). For example, custom_pages/My_Page.md will become My Page in the site navigation

|Option|Description
|------|-----------
| ```-bind 127.0.0.1:8080``` | what to bind to (default is 127.0.0.1:8080)
| ```-sitename myLinx``` | the site name displayed on top (default is inferred from Host header)
| ```-siteurl "https://mylinx.example.org/"``` | the site url (default is inferred from execution context)
| ```-selifpath "selif"``` | path relative to site base url (the "selif" in mylinx.example.org/selif/image.jpg) where files are accessed directly (default: selif)
| ```-maxsize 4294967296``` | maximum upload file size in bytes (default 4GB)
| ```-maxexpiry 86400``` | maximum expiration time in seconds (default is 0, which is no expiry)
| ```-allowhotlink``` | Allow file hotlinking
| ```-contentsecuritypolicy "..."``` | Content-Security-Policy header for pages (default is "default-src 'self'; img-src 'self' data:; style-src 'self' 'unsafe-inline'; frame-ancestors 'self';")
| ```-filecontentsecuritypolicy "..."``` | Content-Security-Policy header for files (default is "default-src 'none'; img-src 'self'; object-src 'self'; media-src 'self'; style-src 'self' 'unsafe-inline'; frame-ancestors 'self';")
| ```-refererpolicy "..."``` | Referrer-Policy header for pages (default is "same-origin")
| ```-filereferrerpolicy "..."``` | Referrer-Policy header for files (default is "same-origin")
| ```-xframeoptions "..." ``` | X-Frame-Options header (default is "SAMEORIGIN")
| ```-remoteuploads``` | (optionally) enable remote uploads (/upload?url=https://...)
| ```-nologs``` | (optionally) disable request logs in stdout
| ```-force-random-filename``` | (optionally) force the use of random filenames
| ```-custompagespath "custom_pages"``` | (optionally) specify path to directory containing markdown pages (must end in .md) that will be added to the site navigation (this can be useful for providing contact/support information and so on). For example, custom_pages/My_Page.md will become My Page in the site navigation

#### Require API Keys for uploads
- ```-authfile path/to/authfile``` -- (optionally) require authorization for upload/delete by providing a newline-separated file of scrypted auth keys
- ```-remoteauthfile path/to/remoteauthfile``` -- (optionally) require authorization for remote uploads by providing a newline-separated file of scrypted auth keys
- ```-basicauth``` -- (optionally) allow basic authorization to upload or paste files from browser when `-authfile` is enabled. When uploading, you will be prompted to enter a user and password - leave the user blank and use your auth key as the password

|Option|Description
|------|-----------
| ```-authfile path/to/authfile``` | (optionally) require authorization for upload/delete by providing a newline-separated file of scrypted auth keys
| ```-remoteauthfile path/to/remoteauthfile``` | (optionally) require authorization for remote uploads by providing a newline-separated file of scrypted auth keys
| ```-basicauth``` | (optionally) allow basic authorization to upload or paste files from browser when `-authfile` is enabled. When uploading, you will be prompted to enter a user and password - leave the user blank and use your auth key as the password

A helper utility ```linx-genkey``` is provided which hashes keys to the format required in the auth files.

Expand All @@ -75,14 +112,20 @@ The following storage backends are available:


#### SSL with built-in server
- ```-certfile path/to/your.crt``` -- Path to the ssl certificate (required if you want to use the https server)
- ```-keyfile path/to/your.key``` -- Path to the ssl key (required if you want to use the https server)
|Option|Description
|------|-----------
| ```-certfile path/to/your.crt``` | Path to the ssl certificate (required if you want to use the https server)
| ```-keyfile path/to/your.key``` | Path to the ssl key (required if you want to use the https server)

#### Use with http proxy
- ```-realip``` -- let linx-server know you (nginx, etc) are providing the X-Real-IP and/or X-Forwarded-For headers.
|Option|Description
|------|-----------
| ```-realip``` | let linx-server know you (nginx, etc) are providing the X-Real-IP and/or X-Forwarded-For headers.

#### Use with fastcgi
- ```-fastcgi``` -- serve through fastcgi
|Option|Description
|------|-----------
| ```-fastcgi``` | serve through fastcgi


Cleaning up expired files
Expand All @@ -96,10 +139,12 @@ of scheduled task.
You should be careful to ensure that only one instance of `linx-client` runs at
a time to avoid unexpected behavior. It does not implement any type of locking.

#### Options
- ```-filespath files/``` -- Path to stored uploads (default is files/)
- ```-metapath meta/``` -- Path to stored information about uploads (default is meta/)
- ```-nologs``` -- (optionally) disable deletion logs in stdout

|Option|Description
|------|-----------
| ```-filespath files/``` | Path to stored uploads (default is files/)
| ```-nologs``` | (optionally) disable deletion logs in stdout
| ```-metapath meta/``` | Path to stored information about uploads (default is meta/)


Deployment
Expand Down Expand Up @@ -133,16 +178,6 @@ Run linx-server with the ```-certfile path/to/cert.file``` and ```-keyfile path/
#### 3. Using the built-in http server
Run linx-server normally.

#### 4. Using Docker with the built-in http server
First, build the image:
```docker build -t linx-server .```

You'll need some directories for the persistent storage. For the purposes of this example, we will use `/media/meta` and `/media/files`.

Then, run it:
```docker run -p 8080:8080 -v /media/meta:/data/meta -v /media/files:/data/files linx-server```


Development
-----------
Any help is welcome, PRs will be reviewed and merged accordingly.
Expand Down

0 comments on commit 3167ab7

Please sign in to comment.