On this page
- What is Redpanda and does it suit a VPS?
- How do you install Redpanda on Ubuntu or Debian?
- How do you size Redpanda for shared vCPUs?
- How do you create topics and move data with rpk?
- How do you require SCRAM logins over TLS?
- Which ports should the firewall allow?
- How do you form a three-node cluster over public IPs?
- How do you upgrade and troubleshoot Redpanda?
- Questions
What is Redpanda and does it suit a VPS?
Redpanda is a streaming engine written in C++ that speaks the Kafka protocol, so existing Kafka clients connect without code changes. It ships as one binary without a JVM, and it carries its own Raft-based metadata, a schema registry and an HTTP proxy. The Community Edition is source-available under the Business Source License; a few features need an enterprise licence key.
The engine is designed to own whole CPU cores and a fixed slice of memory. On a VPS with shared vCPUs that is fine once you tell it so with the overprovisioned setting shown below. Plan on about 2 GB of RAM per core you give it, with fast NVMe storage for the data directory. The processor must support SSE4.2, which every current x86-64 server does. Log in as a sudo user (see your first SSH session).
How do you install Redpanda on Ubuntu or Debian?
Run the repository setup script from the Redpanda package host, install the package and check the versions of the broker and the rpk tool.
sudo apt update && sudo apt install -y curl
curl -1sLf 'https://dl.redpanda.com/nzDYQaUBfDeSbbTl/redpanda/cfg/setup/bash.deb.sh' | sudo -E bash
sudo apt install -y redpanda
apt policy redpanda
rpk versionIf you prefer to read the script before it runs, download it to a file first, read it and then run it with sudo bash. The package installs systemd units for redpanda and redpanda-tuner and a config file at /etc/redpanda/redpanda.yaml.
How do you size Redpanda for shared vCPUs?
Tell Redpanda it shares the host, and cap memory and cores so the operating system keeps room for itself. Open /etc/redpanda/redpanda.yaml and make the rpk section look like this on a 2 vCPU, 4 GB server:
rpk:
overprovisioned: true
additional_start_flags:
- "--smp=2"
- "--memory=3G"
- "--reserve-memory=0M"Then bootstrap the node with its public address and start it:
sudo rpk redpanda mode production
sudo rpk redpanda config bootstrap --self 198.51.100.24 --ips 198.51.100.24
sudo systemctl enable --now redpanda-tuner redpanda
sudo systemctl status redpanda --no-pager
rpk cluster info
rpk cluster healthThe tuner adjusts kernel settings such as the I/O scheduler; some tuners report that they are not supported inside a virtual machine, which is harmless. On a throwaway test box you can use sudo rpk redpanda mode dev-container instead, which relaxes the durability settings.
How do you create topics and move data with rpk?
The rpk command talks to the local node by default, so a round trip takes three short commands.
rpk topic create payments -p 3 -r 1
echo '{"id":"P-1001","amount":42}' | rpk topic produce payments --key P-1001
rpk topic consume payments --num 1
rpk topic describe paymentsThe consumer prints the record as JSON with its partition and offset. Any Kafka client works too: point it at 127.0.0.1:9092 on the server itself. If you already run Apache Kafka, the same topic tools and client settings carry over.
How do you require SCRAM logins over TLS?
Create a superuser first, then give the external listener SASL authentication and a certificate, keeping an open listener on 127.0.0.1 for local tools. Copy a certificate for stream.example.net (from Certbot) into place:
rpk security user create admin -p 'Admin-Long-Secret' --mechanism SCRAM-SHA-256
rpk cluster config set superusers '["admin"]'
rpk security user create payments_app -p 'App-Long-Secret' --mechanism SCRAM-SHA-256
sudo install -d -o redpanda -g redpanda -m 750 /etc/redpanda/certs
sudo cp /etc/letsencrypt/live/stream.example.net/fullchain.pem /etc/letsencrypt/live/stream.example.net/privkey.pem /etc/redpanda/certs/
sudo chown redpanda:redpanda /etc/redpanda/certs/*.pemEdit the redpanda section of redpanda.yaml so the Kafka API has two named listeners:
kafka_api:
- name: local
address: 127.0.0.1
port: 9092
- name: external
address: 0.0.0.0
port: 9094
authentication_method: sasl
advertised_kafka_api:
- name: local
address: 127.0.0.1
port: 9092
- name: external
address: stream.example.net
port: 9094
kafka_api_tls:
- name: external
enabled: true
cert_file: /etc/redpanda/certs/fullchain.pem
key_file: /etc/redpanda/certs/privkey.pem
truststore_file: /etc/ssl/certs/ca-certificates.crt
require_client_auth: falseRestart and grant the application rights on its topic and consumer group:
sudo systemctl restart redpanda
ADM="-X brokers=stream.example.net:9094 -X tls.enabled=true -X user=admin -X pass=Admin-Long-Secret -X sasl.mechanism=SCRAM-SHA-256"
rpk security acl create $ADM --allow-principal User:payments_app --operation read,write,describe --topic payments
rpk security acl create $ADM --allow-principal User:payments_app --operation read --group payments-workers
rpk topic list -X brokers=stream.example.net:9094 -X tls.enabled=true -X user=payments_app -X pass=App-Long-Secret -X sasl.mechanism=SCRAM-SHA-256Which ports should the firewall allow?
Clients need only the external Kafka port. The admin API (9644), the HTTP proxy (8082), the schema registry (8081) and the internal RPC port (33145) stay closed to the public.
sudo ufw allow 22/tcp
sudo ufw allow 9094/tcp
sudo ufw enable
sudo ss -ltnp | grep redpandaThe UFW guide explains rule order if you already have other rules in place. To use the browser-based Redpanda Console, install the redpanda-console package from the same repository, keep it on localhost and reach it through an SSH tunnel.
How do you form a three-node cluster over public IPs?
Bootstrap each node with its own address and the full seed list, open the RPC and admin ports only to the peers and start the nodes. The servers have no private network, so cluster traffic crosses public IPs: firewall it to peer addresses and enable rpc_server_tls with the same certificate files, or route it through a WireGuard tunnel.
# on each node, its own IP after --self
sudo rpk redpanda config bootstrap --self 198.51.100.25 --ips 198.51.100.24,198.51.100.25,198.51.100.26
# firewall on 198.51.100.25, repeat per peer
for ip in 198.51.100.24 198.51.100.26; do
sudo ufw allow proto tcp from $ip to any port 33145
sudo ufw allow proto tcp from $ip to any port 9644
done
sudo systemctl restart redpanda
rpk cluster info
rpk redpanda admin brokers listOnce all three show up, create replicated topics with -r 3. Remember that rpk now needs the SASL flags when it talks to a remote listener.
How do you upgrade and troubleshoot Redpanda?
Upgrade node by node with maintenance mode, which moves partition leadership away before the restart:
rpk redpanda admin brokers list
rpk cluster maintenance enable 1 --wait
sudo apt update && sudo apt install --only-upgrade -y redpanda
sudo systemctl restart redpanda
rpk cluster maintenance disable 1
rpk cluster healthReplace 1 with each node ID in turn and wait for a healthy report between nodes. Read sudo journalctl -u redpanda -e when a node fails to start: a memory error means the --memory flag exceeds what is free, and a seastar message about cores means --smp is higher than the vCPU count. Disk fills up when retention is longer than the volume allows, so set retention.ms or retention.bytes per topic with rpk topic alter-config and watch space as in the usage tutorial.
Plans that fit this guide
Base city prices. Every plan includes a dedicated IPv4 address, IPv6, full root and all 18 images.
| Plan | Fits because | Size | Monthly | Order from |
|---|---|---|---|---|
| A2-4 | single node for development | 2 vCPU, 4 GB RAM, 100 GB NVMe | $14.40/mo | $43.20 for 3 months |
| F4-16 | production node on fast NVMe | 4 vCPU, 16 GB RAM, 384 GB NVMe | $57.60/mo | $57.60 for 1 month |
| I8-16 | member of a busy three-node cluster | 8 vCPU, 16 GB RAM, 350 GB NVMe | $57.60/mo | $57.60 for 1 month |
Questions about Redpanda streaming platform
Do Kafka client libraries work with Redpanda?
Yes. Producers, consumers and most admin calls use the Kafka API unchanged; check the compatibility notes for the less common admin features you rely on.
Can Redpanda run on 1 vCPU?
For testing, yes, with --smp=1 and dev-container mode. For lasting data, give it at least 2 vCPUs and 4 GB.
Where does Redpanda keep its data?
In /var/lib/redpanda/data. Keep that directory on the local NVMe disk and include the YAML config in your backups.
Is there a web interface?
Redpanda Console, a separate package, shows topics, consumer groups and messages. Reach it through an SSH tunnel rather than a public port.
How do I move a single node to a bigger server?
Add the new server as a cluster member, let partitions replicate, then decommission the old one with rpk redpanda admin brokers decommission. See also moving to a larger plan.