Linkwarden is a popular self-hosted password management solution designed for those who prioritize both security and control over their sensitive information. With Docker, you can easily deploy and manage Linkwarden on Ubuntu, ensuring a streamlined setup and efficient operation. This guide will walk you through the process of installing Linkwarden using Docker on an Ubuntu system.
Prerequisites
Before you begin, ensure you have the following:
- Ubuntu Server: An Ubuntu server with at least version 20.04 is recommended.
- Docker: Docker should be installed on your Ubuntu system.
- Docker Compose: This tool will help you define and run multi-container Docker applications.
Commands
sudo curl -L “https://github.com/docker/compose/releases/latest/download/docker-compose-linux-$(uname -m)“ -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
mkdir linkwarden
cd linkwarden
nano docker-compose.yaml
==========================================================================
services:
postgres:
image: postgres:16-alpine
env_file: .env
restart: always
volumes:
– pgdata:/var/lib/postgresql/data
linkwarden:
env_file: .env
environment:
– DATABASE_URL=postgresql://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
restart: always
image: ghcr.io/linkwarden/linkwarden:latest
ports:
– 3000:3000
volumes:
– data:/data/data
depends_on:
– postgres
volumes:
pgdata:
data:
============================================================================
nano .env
NEXTAUTH_SECRET=SENSITIVE_SECRET
NEXTAUTH_URL=http://localhost:3000/api/v1/auth
POSTGRES_PASSWORD=YOUR_POSTGRES_PASSWORD
docker compose up -d