Server Hosting FAQ - calzoneman/sync GitHub Wiki
FAQ
This wiki page provides answers to common questions I get from people about hosting their own servers.
TODO
Dumping some questions I plan to add more detailed answers for
- Can I host CyTube behind a reverse proxy? (yes, with some caveats)
- Can I host CyTube on shared hosting? (no)
- Can I host it on Heroku? (I dunno)
- Troubleshooting (should perhaps be a separate page)
- CSRF session errors caused by bad config
- localhost errors (consider modifying config to remove these defaults)
- common causes of npm errors
- missing www/js/player.js due to npm installation failure, maybe add a sanity check on startup
- EADDRINUSE
- Can't access page (could be caused by process not running, port not bound, firewall etc.)
- Current state of HTTPS mess
What are the limits for user count?
I can get about 2,000 users on one 2GB server. The primary bottleneck is how the users are distributed: 10 users each in 200 channels tends to perform a lot better than 2,000 users all in one channel. If you have sufficiently many channels that you want to split them across multiple servers, it is possible, but the feature is not documented, so please reach out to me.
Can I set up a server with a single channel / disable channel registration?
This not configurable, and would require changes to the code. It is possible to prevent users from registering channels by setting max-channels-per-user
to 0
in config.yaml
, but website administrators will still be able to bypass this limit, and channels will still be linked by /r/channelname
(with an index page at /
).
Can I disable user registration?
As above, this is not a configurable option. However, it is possible to prevent users from registering accounts by setting max-accounts-per-ip
to 0
in config.yaml
.
/r/
to something else?
Can I change the channel path from Yes; set channel-path
in config.yaml
.
Why do I get an error loading socket.io when I use a reverse proxy for HTTPS?
The current configuration format doesn't really support reverse proxying socket.io (however, reverse proxying HTTP is fine) and additionally the configuration format is janky even for allowing passthrough. Basically, you need something like this:
# config.yaml
listen:
- ip: ''
port: 8080
http: true
- ip: ''
port: 8443
https: true
io: true
http:
root-domain: 'sub.example.com'
https:
enabled: true
default-port: 8443
domain: 'https://sub.example.com'
keyfile: 'privkey.pem'
passphrase: ''
certfile: 'fullchain.pem'
cafile: ''
ciphers: 'HIGH:!DSS:!aNULL@STRENGTH'
The reason is because:
- Your website is HTTPS, so for security policy reasons the socket.io endpoint must be HTTPS or browsers will reject the connection
- CyTube inherits socket.io TLS configuration from the
https:
block - Therefore you need a
listener
with bothio: true
andhttps: true
, and you need to sethttps
/enabled: true
and configure the certificate accordingly