While learning Linux server administration, I wanted to set up something more realistic than just installing packages or running test containers.
Something that actually reflects what you'd do on a server, running a real service, managing containers, handling storage and dealing with security-related setup.
So I deployed Nextcloud using Docker and Docker Compose on an Ubuntu 24.04 server VM.
What the setup includes
Services:
- Nextcloud running in Docker
- MariaDB for the database
- Docker Compose to manage the stack
Persistence:
- Database data stored using Docker volumes
- Nextcloud data directory mounted so files persist across restarts
Access & networking:
- HTTPS enabled using a self-signed certificate
- Service accessible locally and over the network
Why I built it
I wanted hands-on experience with things you actually run into when working with Linux servers.
- How multiple containers work together
- How data is stored safely outside containers
- How to work with docker compose
Challenges & fixes
Database persistence
- Made sure MariaDB data survives container restarts by using volumes and testing stop/start scenarios.
HTTPS setup
- HTTPS works using a self-signed certificate, but browsers still show a warning. Good reminder that self-signed certificates are fine for testing, but not ideal for production.
Redis configuration
- Tried adding Redis for Nextcloud, but stopped when the configuration became unclear. Decided to skip it for now instead of adding something I didn’t fully understand.
What I learned
- How to structure a Docker Compose file for a multi-service setup
- How Nextcloud depends on external services like databases
- How Docker volumes work and why they’re important
- The difference between “HTTPS enabled” and “trusted HTTPS”
- When it's better to pause and understand something instead of forcing it to work
What's next?
Possible improvements:
- Setting up proper HTTPS with Let's Encrypt
- Adding Redis once I understand how it fits into the setup
- Improving security and configuration cleanup
- Adding basic monitoring or backups
This project was mainly about learning by doing and understanding how a real service is deployed and maintained on a Linux server.
Top comments (0)