{"id":18479394,"url":"https://github.com/yggverse/next","last_synced_at":"2026-05-08T04:41:54.426Z","repository":{"id":236330346,"uuid":"792376861","full_name":"YGGverse/next","owner":"YGGverse","description":"PHP 8 Server for Nex Protocol","archived":false,"fork":false,"pushed_at":"2024-04-26T15:00:46.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-26T16:06:28.960Z","etag":null,"topics":["1900","composer","nex","nex-php","nex-protocol","nex-server","next"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/YGGverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-26T14:42:57.000Z","updated_at":"2024-04-26T15:00:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"b6a98f66-337b-47ce-807a-7fcb261ac1a6","html_url":"https://github.com/YGGverse/next","commit_stats":null,"previous_names":["yggverse/next"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fnext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fnext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fnext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/YGGverse%2Fnext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/YGGverse","download_url":"https://codeload.github.com/YGGverse/next/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254005904,"owners_count":21998341,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["1900","composer","nex","nex-php","nex-protocol","nex-server","next"],"created_at":"2024-11-06T12:14:32.880Z","updated_at":"2026-05-08T04:41:49.403Z","avatar_url":"https://github.com/YGGverse.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# next\n\nPHP 8 server for different protocols\n\nBased on [Ratchet](https://github.com/ratchetphp/Ratchet) asynchronous socket library\n\n## Features\n\n* Async socket\n* Multi-host\n* Multi-protocol:\n  * [x] [NEX](https://nightfall.city/nex/info/specification.txt)\n  * [ ] [Gemini](https://geminiprotocol.net)\n* Multi-mode:\n  * [x] Static file hosting\n      * [x] filesystem navigation on directory request\n        * [x] optional `gemfeed` file modification date\n        * [x] unicode filenames support\n        * [x] filter hidden context (started with dot)\n        * [ ] sort order settings (currently dir first, asc)\n      * [x] custom index file name\n      * [x] custom failure template\n      * [x] custom data directory location\n  * [x] KevaCoin storage browser\n  * [ ] Custom application\n  * [ ] Reverse proxy\n  * [ ] Stream server\n* Connection event log\n* Simple and flexible server configuration by CLI arguments\n\n## Install\n\n### Environment\n\n``` bash\napt install git composer php-fpm php-mbstring\n```\n\n* for `kevacoin` server `mode`, also required `php-curl` extension\n\n### Stable\n\nProject under development, use [repository](#repository) version!\n\n### Repository\n\n* `git clone https://github.com/YGGverse/next.git`\n* `cd next` - navigate into the project directory\n* `composer update` - grab latest dependencies\n\n## Launch\n\n### Start\n\nCreate as many servers as wanted by providing different `type`, `host`, `port`, `type`, `mode` and other arguments!\n\n* for security reasons, file server prevents any access to the hidden files (started with dot)\n* also, clients can't access any data out the `root` path, that defined on server startup\n\n#### Startup example\n\n``` bash\nphp src/server.php host=127.0.0.1 port=1900 type=nex mode=fs root=/target/dir\n```\n\n* `host` and `port` - optional arguments, read [Arguments documentation](#arguments) for details!\n\n#### Arguments\n\nOptional arguments auto-defined by server protocol `type` selected\n\nSome arguments also defined in [default.json](https://github.com/YGGverse/next/blob/main/default.json) - do not change it without understanding, use [CLI](#cli) instead!\n\n##### CLI\n\nProvide arguments in `key=value` format, separated by space\n\nChildren nodes dependent of parent arguments defined and would be skipped in other combinations!\n\nFollowing list explains `key` dependencies and it `value` options (started with `=`)\n\n* `type` - required, server protocol, also auto-defines default `port`, supported options:\n  * = `nex` - [NEX Protocol](https://nightfall.city/nex/info/specification.txt)\n    * `mode` - optional, server implementation variant, `fs` (filesystem) by default\n      * = `fs` - static files hosting for the `root` location\n        * `root` - **absolute path** to the public directory, where browser navigation starting from\n        * `file` - **file name** that server try to open on directory path requested, disabled by default\n        * `list` - show listing in directory requested (on index `file` not found), enabled by default\n        * `date` - show file modification date (as gemfeed) in directory listing, disabled by default\n      * = `kevacoin` - [KevaCoin](https://github.com/kevacoin-project) storage browser by RPC connection to the wallet (see `kevacoin.conf`)\n        * `rpcscheme` - required, for example `http`\n        * `rpcport` - required, default is `9992`\n        * `rpchost` - required, remote or `localhost`\n        * `rpcuser` - required\n        * `rpcpassword` - required\n        * `namespace` - required, remote or local namespace for data listing (started with `N`)\n* `host` - optional, default is `127.0.0.1` e.g. `localhost` connections only\n* `port` - optional, default value depends of server `type` selected e.g. `1900` for `nex` or `1965` for `gemini`\n* `fail` - optional, **absolute path** to the failure template (e.g. `/path/to/error.gmi`), disabled by default\n* `dump` - optional, `enable` or `disable` server debug feature, enabled by default\n\n### Autostart\n\n#### systemd\n\nFollowing example mean you have `next` server installed into home directory of `next` user (`useradd -m next`)\n\n``` next.service\n# /etc/systemd/system/next.service\n\n[Unit]\nAfter=network.target\n\n[Service]\nType=simple\nUser=next\nGroup=next\nExecStart=/usr/bin/php /home/next/next/src/server.php type=nex mode=fs root=/home/next/public\nStandardOutput=file:/home/next/debug.log\nStandardError=file:/home/next/error.log\nRestart=on-failure\n\n[Install]\nWantedBy=multi-user.target\n```\n\n* `systemctl daemon-reload` - reload systemd configuration\n* `systemctl enable next` - enable service on system startup\n* `systemctl start next` - start server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyggverse%2Fnext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyggverse%2Fnext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyggverse%2Fnext/lists"}