0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

イントロ

前回Kodboxを紹介しましたが、redisとかMariaDBとか必要で、ちょっと重たいなと感じる人もいるかもしれません。

そんなあなたに紹介したいのがDufs

Dufsのスクリーンショット

簡易的なファイルビュー、アップロード、ダウンロード機能が備わっており、シンプルに使いたい人にはピッタリです。
逆にアップロードやダウンロード機能を止めたい、という場合でも簡単に無効化可能。
Basic認証を追加することも可能で、ユーザー別にディレクトリの権限を分けることも可能です。

Dufsの使い方

環境情報
$ docker version
Client: Docker Engine - Community
 Version:           29.1.3
 API version:       1.52
 Go version:        go1.25.5
 Git commit:        f52814d
 Built:             Fri Dec 12 14:49:51 2025
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          29.1.3
  API version:      1.52 (minimum version 1.44)
  Go version:       go1.25.5
  Git commit:       fbf3ed2
  Built:            Fri Dec 12 14:49:51 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v2.2.0
  GitCommit:        1c4457e00facac03ce1d75f7b6777a7a851e5c41
 runc:
  Version:          1.3.4
  GitCommit:        v1.3.4-0-gd6d73eb8
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

前提条件

  • Docker がインストールされていること
  • Traefik が導入されていること(リバースプロキシサーバー)

手順

  1. compose.ymlを作成します。

    domain.tldは自分の環境に合わせて変更してください。https://dufs.domain.tldでアクセスできるようになります。

    compose.yml
    services:
      dufs:
        image: sigoden/dufs
        container_name: dufs
        restart: always
        volumes:
          - /mnt/storage:/data
          - ./config.yml:/config.yml
        expose:
          - 5000
        command: /data --config /config.yml
        labels:
          traefik.enable: true
          traefik.http.services.dufs.loadbalancer.server.port: 5000
          traefik.http.routers.dufs.rule: Host(`dufs.domain.tld`)
          traefik.http.routers.dufs.entrypoints: websecure
          traefik.http.routers.dufs.tls: true
          traefik.http.routers.dufs.tls.certResolver: cloudflare
          traefik.docker.network: traefik-network
        networks:
          - traefik-network
    
    networks:
      traefik-network:
        external: true
    
  2. config.ymlを作成します。

    config.yml
    bind: 0.0.0.0
    ports: 5000
    
    # 検索など一部の機能は無効化
    allow-all: false
    allow-upload: true
    allow-delete: true
    allow-search: false
    allow-symlink: false
    allow-archive: true
    enable-cors: true
    render-index: false
    render-try-index: true
    render-spa: true
    
    auth:
      # guestユーザーは読み取り専用、adminユーザーは読み書き可能
      # opensslを使ったハッシュパスワードもサポートしている
      - guest:guest@/
      - admin:admin@/:rw
    
  3. コンテナを起動します。

    docker compose up -d
    

    https://dufs.domain.tldにアクセスすると、Dufsの画面が表示されます。

Dufsの感想

  • 良いところ
    • シンプルでセットアップが簡単
    • 軽量で高速に動作する
    • 簡易的なアップロード、フォルダの中身を見たい場合などに最適
    • WebDAVもサポートしている
  • 不満・使いこなせていないところ
    • 大規模なファイル管理には向いていない
      • resticのバックアップに使っていたが00~ffの256フォルダに分かれているとフォルダ一覧でエラーになったりする

以上、Dufsの紹介でした!
ウルトラスーパーシンプルで軽量なファイルマネージャーです。多くのファイルを管理しない、認証は簡易的でいい場合などにはピッタリですので、ぜひお試しあれ

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?