Server Management
Starting the Server
Section titled “Starting the Server”Development
Section titled “Development”mix deps.getmix run --no-haltProduction with a Release
Section titled “Production with a Release”# Build a releaseMIX_ENV=prod mix release
# Start in the background_build/prod/rel/elixircd/bin/elixircd daemon
# Stop_build/prod/rel/elixircd/bin/elixircd stop
# Attach to a running node_build/prod/rel/elixircd/bin/elixircd remoteWith Docker
Section titled “With Docker”docker run -d \ -p 6667:6667 \ -p 6697:6697 \ -v /etc/elixircd:/app/config \ elixircd/elixircd:latestConfiguration File
Section titled “Configuration File”The primary configuration file is config/elixircd.exs (or wherever RELEASE_COOKIE/MIX_ENV points). After editing, reload with:
/rehashREHASH re-reads the configuration file and applies changes to:
- Server name/description/MOTD
- Operator credentials
- Rate limiting settings
- Cloaking settings
- WebIRC entries
MOTD Management
Section titled “MOTD Management”The Message of the Day is stored in a file referenced by the config:
config :elixircd, :server, motd_file: "/etc/elixircd/motd.txt"Edit the file and run /rehash to update the MOTD. Connected users see the new MOTD on their next /motd request or reconnect.
Operator Credential Rotation
Section titled “Operator Credential Rotation”To update an operator password:
-
Generate a new Argon2id hash:
Argon2.hash_pwd_salt("newpassword") -
Update the
passwordfield in the oper config -
Run
/rehash
The old credentials are immediately invalidated. Active operator sessions keep their status until they de-oper or disconnect.
Managing TLS Certificates
Section titled “Managing TLS Certificates”When certificates are renewed:
- Replace certificate and key files at the configured paths
- Restart the server (TLS listener changes require restart)
For Let’s Encrypt with auto-renewal, add a deploy hook:
#!/bin/bashsystemctl restart elixircdSystemd Service
Section titled “Systemd Service”Example systemd unit for production:
[Unit]Description=ElixIRCd IRC ServerAfter=network.target
[Service]Type=forkingUser=elixircdGroup=elixircdWorkingDirectory=/opt/elixircdExecStart=/opt/elixircd/bin/elixircd daemonExecStop=/opt/elixircd/bin/elixircd stopRestart=on-failureRestartSec=5sLimitNOFILE=65536
[Install]WantedBy=multi-user.targetEnable and start:
sudo systemctl enable elixircdsudo systemctl start elixircdLog Files
Section titled “Log Files”ElixIRCd writes logs via Elixir’s Logger. Default output is stdout/stderr captured by systemd or the release logger.
Configure log level in config/runtime.exs or environment:
config :logger, level: :infoAvailable levels: :debug, :info, :warning, :error
Backup and Persistence
Section titled “Backup and Persistence”ElixIRCd uses Mnesia (via Memento) for persistent data storage:
- Registered nicknames and accounts
- Registered channels and their settings
- Access lists, suspend records
Mnesia stores data in the directory specified by MNESIA_BASE or the application’s data directory. To back up:
# Stop the server first, or use Mnesia's online backupcp -r /var/lib/elixircd/Mnesia.elixircd@hostname /backup/Or from an IEx session:
:mnesia.backup('/backup/elixircd-backup')Upgrading
Section titled “Upgrading”- Pull new code or download new release
- Review the changelog for breaking configuration changes
- Run
mix deps.get && mix compile(or rebuild the release) - Restart the server
For zero-downtime upgrades in OTP hot-upgrade scenarios, consult the Elixir/OTP release documentation.
Checking Server Status
Section titled “Checking Server Status”From an IRC operator perspective:
/stats u # Uptime and connection count/lusers # User/channel/server counts/version # Server version and build info/admin # Admin contact infoFrom the system:
# Check if the port is listeningss -tlnp | grep 6697
# Check the processps aux | grep elixircd
# Check memory usage_build/prod/rel/elixircd/bin/elixircd remote# Then in IEx::erlang.memory()